Added crop image function.

Fixed 'difference' symbol type.


git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@574 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
coppro
2007-07-14 03:16:45 +00:00
parent c212c56806
commit a75366234f
6 changed files with 50 additions and 8 deletions
+17
View File
@@ -180,6 +180,23 @@ class EnlargeImage : public GeneratedImage {
double border_size;
};
// ----------------------------------------------------------------------------- : CropImage
/// Crop an image at a certain point, to a certain size
class CropImage : public GeneratedImage {
public:
inline CropImage(const GeneratedImageP& image, double width, double height, double offset_x, double offset_y)
: image(image), width(width), height(height), offset_x(offset_x), offset_y(offset_y)
{}
virtual Image generate(const Options& opt) const;
virtual ImageCombine combine() const;
virtual bool operator == (const GeneratedImage& that) const;
private:
GeneratedImageP image;
double width, height;
double offset_x, offset_y;
};
// ----------------------------------------------------------------------------- : DropShadowImage
/// Add a drop shadow to an image