Advance Graphics Mode in SWT.GC
In KEmulator 0.7.7, I add rotation control to the Canvas, but it results in bugs on Infos Show!
1. the XOR Pen is disabled.
2. gc.drawRectangle with negative width/height has no efffect.
finally, i find out the reason — the advanced graphics subsystem of GC.
Normally, we can use GC.setAdvanced(boolean advanced) to switched into advanced mode. but the advanced graphics subsystem is invoked automatically when any one of the alpha, antialias, patterns, interpolation, paths, clipping or transformation operations in the receiver is requested. Refer to follows:
setAlpha setAntialias setBackgroundPattern setClipping(Path) setForegroundPattern setInterpolation setTextAntialias setTransformSo, before the Infos painting(drawRectangle/XOR ), use GC.setAdvanced(false) to return normal graphics subsystem.
(the XOR rect comes back!)
none
Comment by MDC — September 2, 2007 @ 5:00 am