mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-17 04:21:00 +01:00
* Clear pixmap contents of empty mask. The contents of a new pixmaps is undefined
git-svn-id: trunk@30134 -
This commit is contained in:
parent
c0ca12b0b3
commit
e999be5449
@ -442,7 +442,13 @@ begin
|
|||||||
|
|
||||||
if ARawImage.IsMasked(False)
|
if ARawImage.IsMasked(False)
|
||||||
then Drawable := gdk_bitmap_create_from_data(nil, ImgMask, ImgWidth, ImgHeight)
|
then Drawable := gdk_bitmap_create_from_data(nil, ImgMask, ImgWidth, ImgHeight)
|
||||||
else Drawable := gdk_pixmap_new(nil, ImgWidth, ImgHeight, 1);
|
else begin
|
||||||
|
Drawable := gdk_pixmap_new(nil, ImgWidth, ImgHeight, 1);
|
||||||
|
// clear drawable, the contents of a new pixmap are indefined
|
||||||
|
GC := gdk_gc_new(Drawable);
|
||||||
|
gdk_draw_rectangle(Drawable, GC, 1, 0, 0, ImgWidth, ImgHeight);
|
||||||
|
gdk_gc_unref(GC);
|
||||||
|
end;
|
||||||
|
|
||||||
GdiMaskObject := NewGDIObject(gdiBitmap);
|
GdiMaskObject := NewGDIObject(gdiBitmap);
|
||||||
GdiMaskObject^.Depth := 1;
|
GdiMaskObject^.Depth := 1;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user