GraphicsQualityOptions

GraphicsQualityOptions class

Allows to specify additional Graphics quality options.

public class GraphicsQualityOptions

Constructors

Name Description
GraphicsQualityOptions() The default constructor.

Properties

Name Description
CompositingMode { get; set; } Gets or sets a value that specifies how composited images are drawn to this Graphics.
CompositingQuality { get; set; } Gets or sets the rendering quality of composited images drawn to this Graphics.
InterpolationMode { get; set; } Gets or sets the interpolation mode associated with this Graphics.
SmoothingMode { get; set; } Gets or sets the rendering quality for this Graphics.
StringFormat { get; set; } Gets or sets text layout information (such as alignment, orientation and tab stops) display manipulations (such as ellipsis insertion and national digit substitution) and OpenType features.
TextRenderingHint { get; set; } Gets or sets the rendering mode for text associated with this Graphics.
UseTileFlipMode { get; set; } Gets or sets a flag indicating whether WrapMode is TileFlipXY.

Examples

Shows how to set render quality options while converting documents to image formats.

Document doc = new Document(MyDir + "Rendering.docx");

GraphicsQualityOptions qualityOptions = new GraphicsQualityOptions
{
    SmoothingMode = SmoothingMode.AntiAlias,
    TextRenderingHint = TextRenderingHint.ClearTypeGridFit,
    CompositingMode = CompositingMode.SourceOver,
    CompositingQuality = CompositingQuality.HighQuality,
    InterpolationMode = InterpolationMode.High,
    StringFormat = StringFormat.GenericTypographic
};

ImageSaveOptions saveOptions = new ImageSaveOptions(SaveFormat.Jpeg);
saveOptions.GraphicsQualityOptions = qualityOptions;

doc.Save(ArtifactsDir + "ImageSaveOptions.GraphicsQuality.jpg", saveOptions);

See Also