Re: Visual Lib and Retina
Eirik Bakke <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.openide.devel |
|---|---|
| Message-ID | <D36753F9.567B9%[email protected]> |
Drawing on a Graphics2D object supplied by a JComponent's paint() method works well with retina--the full device resolution gets used for fonts and antialiasing, and individual device pixels can be addressed by specifying "half-pixel" coordinates in floats (e.g. use line width 0.5 to get a line that covers a single retina device pixel). To paint on an _offscreen_ image in a way that's Retina-compatible, you can use Graphics2D.getGraphicsConfiguration().createCompatibleImage(width, height,Transparency.TRANSLUCENT). -- Eirik From: Dmitry Avtonomov <[email protected]<mailto:[email protected]>> Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Date: Sunday, May 22, 2016 at 8:21 AM To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Subject: [platform-dev] Re: Visual Lib and Retina If all you need is a canvas to just draw lines and shapes why not simply use a BufferedImage? On May 22, 2016 07:28, "lanthale" <[email protected]<mailto:[email protected]>> wrote: From an outside perspective I see many issues with Java2D in Netbeans RCP (not in JDK Swing) and retina. What I want to create is more a drawing canvas where I draw different lines with a defined shape on a canvas. Those lines have no link between each other. Thank you allot for your feedback. I think I will go with javafx. I replaced already allot of code because of retina issues with javafx and therefore I think it doesn't mather to implement the drawing code in javafx. I think I will make a feasability study and afterwards will decide but actually all speaks against netbeans rcp visual lib. cheers, Clemens