Be explicit about type of angles: either Radians or Degrees.

Angles are always doubles.
Internally use radians as much as possible.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1605 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2011-01-09 14:49:59 +00:00
parent a59248ae95
commit 53bbcfe9a9
38 changed files with 248 additions and 195 deletions
+3 -3
View File
@@ -36,7 +36,7 @@ class GeneratedImage : public ScriptValue {
mutable int width, height; ///< Width to force the image to, or 0 to keep the width of the input
///< In that case, width and height will be later set to the actual size
double zoom; ///< Zoom factor to use, when width=height=0
int angle; ///< Angle to rotate image by afterwards
Radians angle; ///< Angle to rotate image by afterwards
PreserveAspect preserve_aspect;
bool saturate;
Package* package; ///< Package to load images from
@@ -264,13 +264,13 @@ class FlipImageVertical : public SimpleFilterImage {
/// Rotate an image
class RotateImage : public SimpleFilterImage {
public:
inline RotateImage(const GeneratedImageP& image, double angle)
inline RotateImage(const GeneratedImageP& image, Radians angle)
: SimpleFilterImage(image), angle(angle)
{}
virtual Image generate(const Options& opt) const;
virtual bool operator == (const GeneratedImage& that) const;
private:
double angle;
Radians angle;
};
// ----------------------------------------------------------------------------- : EnlargeImage