Added ScriptableImage plus the beginnings of dependency stuff

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@58 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2006-10-29 16:23:31 +00:00
parent 368082ade2
commit f46b0b6b7b
22 changed files with 533 additions and 18 deletions
+15 -6
View File
@@ -37,6 +37,14 @@ void resample(const Image& imgIn, Image& imgOut);
/// that rectangle is resampledinto the entire output image
void resample_and_clip(const Image& imgIn, Image& imgOut, wxRect rect);
/// How to preserve the aspect ratio of an image when rescaling
enum PreserveAspect
{ ASPECT_STRETCH ///< don't preserve
, ASPECT_BORDER ///< put borders around the image to make it the right shape
, ASPECT_FIT ///< generate a smaller image if needed
};
// ----------------------------------------------------------------------------- : Image rotation
/// Rotates an image counter clockwise
@@ -45,14 +53,12 @@ Image rotate_image(const Image& image, int angle);
// ----------------------------------------------------------------------------- : Blending
/// Blends two images together, using a horizontal gradient
/// Blends two images together using some linear gradient
/** The result is stored in img1
* To the left the color is that of img1, to the right of img2
* The two coordinates give the two points between which the images are blended
* Coordinates are given in the range [0..1);
*/
void hblend(Image& img1, const Image& img2);
/// Blends two images together, using a vertical gradient
void vblend(Image& img1, const Image& img2);
void linear_blend(Image& img1, const Image& img2, double x1,double y1, double x2,double y2);
/// Blends two images together, using a third image as a mask
/** The result is stored in img1
@@ -61,6 +67,9 @@ void vblend(Image& img1, const Image& img2);
*/
void mask_blend(Image& img1, const Image& img2, const Image& mask);
/// Use the red channel of img2 as alpha channel for img1
void set_alpha(Image& img1, const Image& img2);
// ----------------------------------------------------------------------------- : Combining
/// Ways in which images can be combined, similair to what Photoshop supports