com.aspose.words
Class GraphicsQualityOptions

java.lang.Object
    extended by com.aspose.words.GraphicsQualityOptions

public class GraphicsQualityOptions 
extends java.lang.Object

Allows to specify additional java.awt.RenderingHints.

Example:

Shows how to set render quality options when converting documents to image formats.
Document doc = new Document(getMyDir() + "SaveOptions.MyriadPro.docx");

GraphicsQualityOptions qualityOptions = new GraphicsQualityOptions();
qualityOptions.getRenderingHints().put(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); // SmoothingMode
qualityOptions.getRenderingHints().put(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON); // TextRenderingHint
qualityOptions.getRenderingHints().put(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY); // CompositingMode
qualityOptions.getRenderingHints().put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY); // CompositingQuality
qualityOptions.getRenderingHints().put(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR); // InterpolationMode
qualityOptions.getRenderingHints().put(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON); // StringFormat

ImageSaveOptions saveOptions = new ImageSaveOptions(SaveFormat.JPEG);
saveOptions.setGraphicsQualityOptions(qualityOptions);

doc.save(getArtifactsDir() + "SaveOptions.GraphicsQuality.jpeg", saveOptions);

Constructor Summary
GraphicsQualityOptions()
          
 
Method Summary
java.awt.RenderingHintsgetRenderingHints()
           Gets current java.awt.RenderingHints to view or to add new hints.
voidsetRenderingHints(java.awt.RenderingHints renderingHints)
           Overwrites current java.awt.RenderingHints.
 

Constructor Detail

GraphicsQualityOptions

public GraphicsQualityOptions()

Method Detail

getRenderingHints

public java.awt.RenderingHints getRenderingHints()
Gets current java.awt.RenderingHints to view or to add new hints.

setRenderingHints

public void setRenderingHints(java.awt.RenderingHints renderingHints)
Overwrites current java.awt.RenderingHints.

See Also:
          Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
          Aspose.Words Support Forum - our preferred method of support.