[]
        
(Showing Draft Content)

GrapeCity.Documents.Svg.GcSvgGraphics

GcSvgGraphics Class

Represents a graphics object that can be used to draw on a GcSvgDocument.

Inheritance
GcSvgGraphics
Implements
Namespace: GrapeCity.Documents.Svg
Assembly: DS.Documents.Imaging.dll
Syntax
public class GcSvgGraphics : GcGraphics, IDisposable
Public Class GcSvgGraphics
    Inherits GcGraphics
    Implements IDisposable

Constructors

Name Description
GcSvgGraphics(float, float)

Initializes a new instance of the GcSvgGraphics class.

Properties

Name Description
Description

Gets or sets the description of the SVG document.

EmbedFonts

Gets or sets a value indicating whether fonts used in 'text' elements should be embedded.

Changing this property only affects subsequent calls to DrawTextLayout(TextLayout, PointF), DrawString(string, TextFormat, PointF) and DrawString(string, TextFormat, RectangleF, TextAlignment, ParagraphAlignment, bool) methods. Already rendered text is not affected.

This property is ignored if DrawTextAsPath is true.

The default is false.

Height

Gets or sets the height of the image, in device-independent pixels (1/96ths of an inch).

IDSuffix

Gets or sets a string to be appended to the auto-generated ID values.

ImageRendering

Gets or sets a hint to the implementation about how to make speed vs. quality tradeoffs as it performs image processing.

Setting this property affects the subsequent calls of the DrawImage methods. It does not affect the previous calls.

The default is Auto.
OwnImages

Gets or sets a value indicating whether the images drawn with DrawImage methods should be disposed when disposing the resulting GcSvgDocument.

Setting this property affects the subsequent calls of the DrawImage methods. It does not affect the previous calls.

The default is false.
PreciseCharPositions

Gets or sets a value indicating whether the positions are set for each individual character within the 'text' element.

Setting this property to true makes the resulting SVG file larger but provides more precise positioning of individual characters.

Changing this property only affects subsequent calls to DrawTextLayout(TextLayout, PointF), DrawString(string, TextFormat, PointF) and DrawString(string, TextFormat, RectangleF, TextAlignment, ParagraphAlignment, bool) methods. Already rendered text is not affected.

This property is ignored if DrawTextAsPath is true.

The default is false.

Resolution

Gets the resolution of the current graphics, which is always 96 DPI for GcSvgGraphics.

ShapeRendering

Gets or sets a hint to the implementation about what tradeoffs to make as it renders vector graphics elements.

Setting this property affects the subsequent calls of the Draw/Fill methods. It does not affect the previous calls.

The default is Auto.
Title

Gets or sets the title of the SVG document.

Transform

Gets or sets the transformation matrix of the current graphics.

Width

Gets or sets the width of the image, in device-independent pixels (1/96ths of an inch).

Methods

Name Description
ApplyLicenseKey(string)

Applies a license key to the current instance of GcSvgGraphics.

A license key is required to use the ToSvgDocument() method.

Dispose(bool)

Performs cleanup operations on managed and unmanaged resources.

GetInterpolationMode()

For internal use.

InternalCreateClipRegion(IPath)

For internal use.

InternalCreateClipRegion(RectangleF)

For internal use.

InternalCreatePath()

For internal use.

InternalDrawEllipse(RectangleF, Pen)

For internal use.

InternalDrawImage(RectangleF, IImage, float)

For internal use.

InternalDrawLine(PointF, PointF, Pen)

For internal use.

InternalDrawLines(PointF[], Pen)

For internal use.

InternalDrawPath(IPath, Pen)

For internal use.

InternalDrawPolygon(PointF[], Pen)

For internal use.

InternalDrawRectangle(RectangleF, Pen)

For internal use.

InternalDrawRoundRect(RectangleF, float, float, Pen)

For internal use.

InternalDrawTextLayout(TextLayout, PointF)

For internal use.

InternalDrawTextLayoutAsPath(TextLayout, PointF)

Draws a TextLayout at a specified location using graphic primitives.

InternalFillEllipse(RectangleF, Brush, RectangleF?, Matrix3x2?)

For internal use.

InternalFillEllipse(RectangleF, Color)

For internal use.

InternalFillPath(IPath, Brush, RectangleF?, Matrix3x2?)

For internal use.

InternalFillPath(IPath, Color)

For internal use.

InternalFillPolygon(PointF[], Brush, FillMode, RectangleF?, Matrix3x2?)

For internal use.

InternalFillPolygon(PointF[], Color, FillMode)

For internal use.

InternalFillRectangle(RectangleF, Brush, RectangleF?, Matrix3x2?)

For internal use.

InternalFillRectangle(RectangleF, Color)

For internal use.

InternalFillRoundRect(RectangleF, float, float, Brush, RectangleF?, Matrix3x2?)

For internal use.

InternalFillRoundRect(RectangleF, float, float, Color)

For internal use.

InternalRemoveClip(IClipRegion)

For internal use.

InternalSetClip(IClipRegion)

For internal use.

IsInterpolationModeSupported(InterpolationMode)

Indicates whether this graphics implementation supports a specified interpolation mode.

The following interpolation modes are supported by GcSvgGraphics:

PopGroup()

Ends the group that was created by the last PushGroup(List<SvgCustomAttribute>) call.

PopTransparencyLayer()

Stops redirecting drawing operations to the transparency layer that was created by the last PushTransparencyLayer(RectangleF?, float) call.

PushGroup(List<SvgCustomAttribute>)

Starts a group ('g') element with custom attributes in the SVG document. Call the PopGroup() method to end the group.

PushTransparencyLayer(RectangleF?, float)

Adds a transparency layer to the GcSvgGraphics so that it receives all subsequent drawing operations until PopTransparencyLayer() is called.

SetInterpolationMode(InterpolationMode)

For internal use.

SetLicenseKey(string)

Sets the license key.

A license key is required to use the ToSvgDocument() method.

ToSvgDocument()

Generates a GcSvgDocument from this graphics, and clears its command list afterwards.

Note that if a license key has not been applied (see SetLicenseKey(string) and ApplyLicenseKey(string) methods), only a few calls of ToSvgDocument() are allowed, after which an exception will be thrown.