GraphicsQualityOptions Class

Allows to specify additional Graphics quality options.

ExpandedInheritance Hierarchy

SystemObject
  Aspose.Words.SavingGraphicsQualityOptions

Namespace:  Aspose.Words.Saving
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 21.5.0

ExpandedSyntax

public class GraphicsQualityOptions

The GraphicsQualityOptions type exposes the following members.

ExpandedConstructors

  NameDescription
Public methodGraphicsQualityOptions
Initializes a new instance of the GraphicsQualityOptions class

ExpandedProperties

  NameDescription
Public propertyCode exampleCompositingMode
Gets or sets a value that specifies how composited images are drawn to this Graphics.
Public propertyCode exampleCompositingQuality
Gets or sets the rendering quality of composited images drawn to this Graphics.
Public propertyCode exampleInterpolationMode
Gets or sets the interpolation mode associated with this Graphics.
Public propertyCode exampleSmoothingMode
Gets or sets the rendering quality for this Graphics.
Public propertyCode exampleStringFormat
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.
Public propertyCode exampleTextRenderingHint
Gets or sets the rendering mode for text associated with this Graphics.

ExpandedMethods

  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)

ExpandedExamples

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);

ExpandedSee Also