This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 256851

Summary: Antialiasing and horizontal/vertical offset values in SceneExporter
Product: platform Reporter: acarubelli
Component: GraphAssignee: issues@platform <issues>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.1   
Hardware: PC   
OS: Windows 10 x64   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: adds the possibility of antialiasing and x,y offset to exported images

Description acarubelli 2015-11-28 22:05:47 UTC
Created attachment 157542 [details]
adds the possibility of antialiasing and x,y offset to exported images

Method createImage of class org.netbeans.api.visual.export.SceneExporter does not allow to use antialiasing when exporting a BufferedImage of the Scene.
The same method, when exporting the visible area of a Scene which is inside a scrollable component, always exports the portion of the scene starting at coordinates 0,0.

The attached patch adds an additional version of the createImage method which has three new parameters:
-antialiased (boolean) : if true antialiasing is enabled in the exported image
-xoffset (int): if visibleAreaOnly is true, the horizontal portion of the Scene exported starts at the value of this parameter.
-yoffset (int): if visibleAreaOnly is true, the vertical portion of the Scene exported starts at the value of this parameter

parameters xoffset and yoffset do not affect the final result if parameter visibleAreaOnly is false.

Two classes are modified by the patch:
org.netbeans.api.visual.export.SceneExporter
org.netbeans.modules.visual.export.Scene2Image

In both classes an overloaded version of an existing method has been added, no change to existing implementation.