From 8638fd96caad45421597cddf6875fb543ae80a6e Mon Sep 17 00:00:00 2001 From: Patrick Ziegler Date: Fri, 23 Jan 2026 18:17:25 +0100 Subject: [PATCH] [Win32] Update JavaDoc in GC.setXORMode() regarding limitation with GDI+ Enabling advanced mode causes SWT to switch from GDI to the GDI+. With GDI+, certain features, such as XOR, are not supported. This limitation should be documented. Closes https://github.com/eclipse-platform/eclipse.platform.swt/issues/2984 --- .../Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java | 7 +++++++ 1 file changed, 7 insertions(+) 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 2f5c2385e41..836758a3862 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 @@ -5695,6 +5695,13 @@ private void setLineWidthInPixels(int lineWidth) { * and the destination, and if the argument is false, * puts the receiver in a drawing mode where the destination color * is replaced with the source color value. + *

+ * IMPORTANT: GDI+ has no direct support for raster + * operations (ROPs). This means that advanced graphics must be + * disabled when using XOR mode. More specifically, this + * means that all operations that require advanced mode (e.g. + * {@link Transform}) can't be used in combination with XOR mode. + *

* * @param xor if true, then xor mode is used, otherwise source copy mode is used *