Provide advanced graphical options under SWT
Closed this issue · 8 comments
mro commented
Originally reported on Google Code with ID 189
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
Reported by berthold.daum
on 2010-08-21 18:44:46
- _Attachment: [ZPSWTCanvas.java](https://storage.googleapis.com/google-code-attachments/piccolo2d/issue-189/comment-0/ZPSWTCanvas.java)_ - _Attachment: [ZPSWTPath.java](https://storage.googleapis.com/google-code-attachments/piccolo2d/issue-189/comment-0/ZPSWTPath.java)_
mro commented
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.
Reported by heuermh
on 2010-08-24 02:43:52
- Status changed:
Accepted
- Labels added: Type-Enhancement, Priority-Medium, Effort-Medium, Toolkit-Piccolo2D.Java, OpSys-All, Component-SWT, Milestone-1.3.1
mro commented
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.
Reported by heuermh
on 2010-08-27 16:50:05
mro commented
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.
Reported by heuermh
on 2010-12-21 22:21:34
- Status changed:
Started
- Labels added: Milestone-2.0
- Labels removed: Milestone-1.3.1
mro commented
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-piccolo.txt?r=1094
Reported by heuermh
on 2010-12-21 22:44:18
mro commented
Reported by heuermh
on 2010-12-21 22:55:56
- Status changed:
Accepted
mro commented
>>> Are you allowing these changes to be re-licensed under Piccolo2D.Java's license?
<<<
Yes, I do.
Reported by berthold.daum
on 2010-12-22 10:15:29
mro commented
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.
Reported by heuermh
on 2012-08-31 23:08:48
mro commented
Reported by heuermh
on 2013-11-26 21:11:16
- Labels added: Milestone-2.1
- Labels removed: Milestone-2.0