Added 'angle' property for choice fields

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@315 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-04-30 23:16:38 +00:00
parent 944d0d03b3
commit 5c910e3059
6 changed files with 13 additions and 12 deletions
+5 -8
View File
@@ -83,13 +83,10 @@ struct Rotate270 {
// ----------------------------------------------------------------------------- : Interface
Image rotate_image(const Image& image, int angle) {
if (angle == 90) {
return rotate_image_impl<Rotate90>(image);
} else if (angle == 180){
return rotate_image_impl<Rotate180>(image);
} else if (angle == 270){
return rotate_image_impl<Rotate270>(image);
} else{
return image;
switch (angle % 360) {
case 90: return rotate_image_impl<Rotate90> (image);
case 180: return rotate_image_impl<Rotate180>(image);
case 270: return rotate_image_impl<Rotate270>(image);
default: return image;
}
}