Implemented ContourMask (mask for text fields)

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@251 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-04-12 18:11:41 +00:00
parent 42ab8c84c0
commit 958da421d9
5 changed files with 71 additions and 10 deletions
+5 -3
View File
@@ -155,9 +155,11 @@ class ContourMask {
~ContourMask();
/// Load a contour mask
void load(const String& filename);
void load(const Image& image);
/// Unload the mask
void unload();
/// Is a mask loaded?
inline bool ok() const { return width > 0 && height > 0; }
/// Returns the start of a row, when the mask were stretched to size
double rowLeft (double y, RealSize size) const;
@@ -165,8 +167,8 @@ class ContourMask {
double rowRight(double y, RealSize size) const;
private:
UInt width, height;
UInt *lefts, *rights;
int width, height;
int *lefts, *rights;
};
// ----------------------------------------------------------------------------- : Color utility functions