choice images work

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@63 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2006-10-31 15:15:26 +00:00
parent 1ffaa5bd58
commit e2220a5a97
7 changed files with 103 additions and 17 deletions
+4 -3
View File
@@ -50,15 +50,16 @@ class ScriptableImage {
inline operator bool() const { return script; }
/// Generate an image, doesn't cache, and doesn't scale
ScriptImageP generate(Context& ctx) const;
/** Image files are loaded from the given package */
ScriptImageP generate(Context& ctx, Package&) const;
/// Generate an image, scaling it and optionally saturating it
ScriptImageP generate(Context& ctx, UInt width, UInt height, PreserveAspect preserve_aspect = ASPECT_STRETCH, bool saturate = false) const;
ScriptImageP generate(Context& ctx, Package&, UInt width, UInt height, PreserveAspect preserve_aspect = ASPECT_STRETCH, bool saturate = false) const;
/// Update and return the cached image
/** Only recomputes the image if it is out of date, or the size doesn't match.
* If width==height==0 then doesn't resample.
*/
ScriptImageP update(Context& ctx, UInt width = 0, UInt height = 0, PreserveAspect preserve_aspect = ASPECT_STRETCH, bool saturate = false);
ScriptImageP update(Context& ctx, Package&, UInt width = 0, UInt height = 0, PreserveAspect preserve_aspect = ASPECT_STRETCH, bool saturate = false);
/// Is the cached image up to date?
bool upToDate(Context& ctx, Age age) const;