Status: New
Owner: ----

New issue 245 by SWTGraphics2D.fill wrong color used

What steps will reproduce the problem?
1. Add a rectangle shape with no stroke but valid paint color.

What is the expected output? What do you see instead?
A simple filled rectangle with the paint color should be shown. However, nothing is shown.

What version of the product are you using? On what operating system?
Piccolo version: Current subversion trunk
SWT version: 3.1
OS: Debian testing

Please provide any additional information below.
PPath.paint calls setPaint on the Graphics2D object (which is actually SWTGraphics2D). This call sets the foreground color of the SWT GC object. For filling however, it is required to set the background color of the GC.

I have the feeling that the color/background -> foreground/background mapping in SWTGraphics2D is generally wrong. The colors have different meanings in AWT and SWT. In AWT the background color has only a meaning for clearRect which in SWT it is meant for filling operations.

Piccolo2D Developers Group:

Reply via email to