google-code-export / piccolo2d

Automatically exported from code.google.com/p/piccolo2d
2 stars 1 forks source link

Provide advanced graphical options under SWT #189

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Wishlist:
1. Line width
2. Transparency
3. Antialiasing

Although it is possible to add most of these options by subclassing, 
it would be nice to offer them out of the box.
For transparency, a change in PSWTGraphics2D (1.3) is necessary, though (bd1):

    public void setTransparency(float transparency) { // bd1
        gc.setAlpha((int) (transparency*255f));
    }

I have attached the classes ZPSWTCanvas and ZPSWTPath that add options for 
linewidth, transparency, and antialiasing

Original issue reported on code.google.com by berthold...@gmail.com on 21 Aug 2010 at 6:44

Attachments:

GoogleCodeExporter commented 9 years ago
If these changes can be made without breaking binary compatibility, and I 
haven't fully reviewed them yet, then they can go into the 1.3.1 milestone.  If 
not, they will have to wait for 2.0.

Original comment by heue...@gmail.com on 24 Aug 2010 at 2:43

GoogleCodeExporter commented 9 years ago
In writing the example for Issue 187, I noticed that setStroke is missing and 
setStrokePaint is misnamed setStrokeColor.  Thought I should add those todos 
here.

Original comment by heue...@gmail.com on 27 Aug 2010 at 4:50

GoogleCodeExporter commented 9 years ago
On further review, these changes will have to wait for 2.0.  I will commit the 
patch plus changes refereed to in comment #2 to svn trunk. 

Original comment by heue...@gmail.com on 21 Dec 2010 at 10:21

GoogleCodeExporter commented 9 years ago
Attached ZPSWTCanvas.java and ZPSWTPath.java are licensed GPL version 2 or 
later.  Are you allowing these changes to be re-licensed under Piccolo2D.Java's 
license?

http://code.google.com/p/piccolo2d/source/browse/piccolo2d.java/trunk/license-pi
ccolo.txt?r=1094

Original comment by heue...@gmail.com on 21 Dec 2010 at 10:44

GoogleCodeExporter commented 9 years ago

Original comment by heue...@gmail.com on 21 Dec 2010 at 10:55

GoogleCodeExporter commented 9 years ago
>>> Are you allowing these changes to be re-licensed under Piccolo2D.Java's 
license? <<<

Yes, I do.

Original comment by berthold...@gmail.com on 22 Dec 2010 at 10:15

GoogleCodeExporter commented 9 years ago
Added transparency support similar to attached.

$ svn commit -m "Issue 189 ; adding transparency support for SWTGraphics2D and 
PSWTPath" swt swt-examples
Committed revision 1181.

Line width is there in SWTGraphics2D but PSWTPath doesn't take advantage of it. 
 Its PEN_WIDTH is always 1.0f.  More work would be required to implement that 
change properly.

Original comment by heue...@gmail.com on 31 Aug 2012 at 11:08

GoogleCodeExporter commented 9 years ago

Original comment by heue...@gmail.com on 26 Nov 2013 at 9:11