diff options
author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2002-05-02 02:08:55 +0000 |
---|---|---|
committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2002-05-02 02:08:55 +0000 |
commit | 8c80409e6e784006af024c7f3266a21c35877c46 (patch) | |
tree | bca9358fd948e8a4d93eb6c7aab5813150c80f54 /graphics | |
parent | 45e22a596381db165ba8456436fb51ea5acf8ebd (diff) | |
download | ports-8c80409e6e784006af024c7f3266a21c35877c46.tar.gz ports-8c80409e6e784006af024c7f3266a21c35877c46.zip |
Notes
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/sdl_image/files/patch-ad | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/graphics/sdl_image/files/patch-ad b/graphics/sdl_image/files/patch-ad new file mode 100644 index 000000000000..b3a49176b14e --- /dev/null +++ b/graphics/sdl_image/files/patch-ad @@ -0,0 +1,79 @@ +--- IMG_xcf.c.orig Mon Apr 29 03:01:48 2002 ++++ IMG_xcf.c Mon Apr 29 03:17:07 2002 +@@ -166,6 +166,7 @@ + + Uint32 offset_x; + Uint32 offset_y; ++ int visible : 1; + } xcf_layer; + + typedef struct { +@@ -179,6 +180,7 @@ + Uint32 color; + Uint32 opacity; + int selection : 1; ++ int visible : 1; + } xcf_channel; + + typedef struct { +@@ -245,7 +247,9 @@ + prop->id = SDL_ReadBE32 (src); + prop->length = SDL_ReadBE32 (src); + ++#if 0 + printf ("%.8X: %s: %d\n", SDL_RWtell (src), prop->id < 25 ? prop_names [prop->id] : "unknown", prop->length); ++#endif + + switch (prop->id) { + case PROP_COLORMAP: +@@ -265,6 +269,9 @@ + case PROP_COLOR: + SDL_RWread (src, &prop->data, prop->length, 1); + break; ++ case PROP_VISIBLE: ++ prop->data.visible = SDL_ReadBE32 (src); ++ break; + default: + // SDL_RWread (src, &prop->data, prop->length, 1); + SDL_RWseek (src, prop->length, SEEK_CUR); +@@ -332,6 +339,8 @@ + if (prop.id == PROP_OFFSETS) { + l->offset_x = prop.data.offset.x; + l->offset_y = prop.data.offset.y; ++ } else if (prop.id == PROP_VISIBLE) { ++ l->visible = prop.data.visible ? 1 : 0; + } + } while (prop.id != PROP_END); + +@@ -371,6 +380,9 @@ + case PROP_SELECTION: + l->selection = 1; + break; ++ case PROP_VISIBLE: ++ l->visible = prop.data.visible ? 1 : 0; ++ break; + default: + } + } while (prop.id != PROP_END); +@@ -724,9 +736,10 @@ + rd.y = layer->offset_y; + rd.w = layer->width; + rd.h = layer->height; +- free_xcf_layer (layer); + +- SDL_BlitSurface (lays, &rs, surface, &rd); ++ if (layer->visible) ++ SDL_BlitSurface (lays, &rs, surface, &rd); ++ free_xcf_layer (layer); + } + + SDL_FreeSurface (lays); +@@ -756,7 +769,7 @@ + } + for (i = 0; i < chnls; i++) { + // printf ("CNLBLT %i\n", i); +- if (!channel [i]->selection) { ++ if (!channel [i]->selection && channel [i]->visible) { + create_channel_surface (chs, head->image_type, channel [i]->color, channel [i]->opacity); + SDL_BlitSurface (chs, NULL, surface, NULL); + } |