diff options
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java index cdc8f3c321..a89ddf86f9 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java @@ -612,6 +612,9 @@ static long createGdipFont(long hDC, long hFont, long graphics, long fontCollect * </ul> */ static long createAlphaTextureBrush(long brush, int alpha) { + if (Gdip.Brush_GetType(brush) != Gdip.BrushTypeTextureFill) { + return Gdip.Brush_Clone(brush); + } long hatchImage = Gdip.TextureBrush_GetImage(brush); if (hatchImage == 0) SWT.error(SWT.ERROR_CANNOT_BE_ZERO); long transparentHatchImage = Gdip.Image_Clone(hatchImage); |