Images are now cached as wxBitmap, not wxImage. This should improve performance.

Fixed some more corner cases of rotation+zoom.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@630 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-08-25 21:24:28 +00:00
parent 741b987d54
commit 52ec7b38c0
38 changed files with 413 additions and 165 deletions
+6 -6
View File
@@ -216,17 +216,17 @@ void ChoiceStyle::initImage() {
script.addInstruction(I_RET);
}
bool ChoiceStyle::update(Context& ctx) {
int ChoiceStyle::update(Context& ctx) {
// Don't update the choice images, leave that to invalidate()
bool change = Style ::update(ctx)
| font .update(ctx)
| mask_filename.update(ctx);
int change = Style ::update(ctx)
| font .update(ctx) * CHANGE_OTHER
| mask_filename.update(ctx) * CHANGE_MASK;
if (!choice_images_initialized) {
// we only want to do this once because it is rather slow, other updates are handled by dependencies
choice_images_initialized = true;
FOR_EACH(ci, choice_images) {
if (ci.second.update(ctx)) {
change = true;
change |= CHANGE_OTHER;
// TODO : remove this thumbnail
}
}
@@ -253,7 +253,7 @@ void ChoiceStyle::invalidate(Context& ctx) {
thumbnails_status[i] = THUMB_CHANGED;
}
}
if (change) tellListeners(false);
if (change) tellListeners(CHANGE_OTHER);
}
void ChoiceStyle::loadMask(Package& pkg) {