VectSharp 2.6.1
A light library for C# vector graphics
Loading...
Searching...
No Matches
VectSharp.Graphics Class Reference

Represents an abstract drawing surface. More...

Public Member Functions

void FillPath (GraphicsPath path, Brush fillColour, string tag=null)
 Fill a GraphicsPath. More...
 
void FillPath (GraphicsPath path, Brush fillColour, FillRule fillRule, string tag=null)
 Fill a GraphicsPath. More...
 
void StrokePath (GraphicsPath path, Brush strokeColour, double lineWidth=1, LineCaps lineCap=LineCaps.Butt, LineJoins lineJoin=LineJoins.Miter, LineDash? lineDash=null, string tag=null)
 Stroke a GraphicsPath. More...
 
void SetClippingPath (GraphicsPath path, string tag=null)
 Intersect the current clipping path with the specified GraphicsPath. More...
 
void SetClippingPath (double leftX, double topY, double width, double height, string tag=null)
 Intersect the current clipping path with the specified rectangle. More...
 
void SetClippingPath (Point topLeft, Size size, string tag=null)
 Intersect the current clipping path with the specified rectangle. More...
 
void Rotate (double angle, string tag=null)
 Rotate the coordinate system around the origin. More...
 
void RotateAt (double angle, Point pivot, string tag=null)
 Rotate the coordinate system around a pivot point. More...
 
void Transform (double a, double b, double c, double d, double e, double f, string tag=null)
 Transform the coordinate system with the specified transformation matrix [ [a, c, e], [b, d, f], [0, 0, 1] ]. More...
 
void Translate (double x, double y, string tag=null)
 Translate the coordinate system origin. More...
 
void Translate (Point delta, string tag=null)
 Translate the coordinate system origin. More...
 
void Scale (double scaleX, double scaleY, string tag=null)
 Scale the coordinate system with respect to the origin. More...
 
void FillRectangle (Point topLeft, Size size, Brush fillColour, string tag=null)
 Fill a rectangle. More...
 
void FillRectangle (double leftX, double topY, double width, double height, Brush fillColour, string tag=null)
 Fill a rectangle. More...
 
void StrokeRectangle (Point topLeft, Size size, Brush strokeColour, double lineWidth=1, LineCaps lineCap=LineCaps.Butt, LineJoins lineJoin=LineJoins.Miter, LineDash? lineDash=null, string tag=null)
 Stroke a rectangle. More...
 
void StrokeRectangle (double leftX, double topY, double width, double height, Brush strokeColour, double lineWidth=1, LineCaps lineCap=LineCaps.Butt, LineJoins lineJoin=LineJoins.Miter, LineDash? lineDash=null, string tag=null)
 Stroke a rectangle. More...
 
void DrawRasterImage (int sourceX, int sourceY, int sourceWidth, int sourceHeight, double destinationX, double destinationY, double destinationWidth, double destinationHeight, RasterImage image, string tag=null)
 Draw a raster image. More...
 
void DrawRasterImage (double x, double y, RasterImage image, string tag=null)
 Draw a raster image. More...
 
void DrawRasterImage (Point position, RasterImage image, string tag=null)
 Draw a raster image. More...
 
void DrawRasterImage (double x, double y, double width, double height, RasterImage image, string tag=null)
 Draw a raster image. More...
 
void DrawRasterImage (Point position, Size size, RasterImage image, string tag=null)
 Draw a raster image. More...
 
void Save ()
 Save the current transform state (rotation, translation, scale). More...
 
void Restore ()
 Restore the previous transform state (rotation, translation scale). More...
 
void CopyToIGraphicsContext (IGraphicsContext destinationContext)
 Copy the current graphics to an instance of a class implementing IGraphicsContext. More...
 
void DrawGraphics (Point origin, Graphics graphics)
 Draws a Graphics object on the current Graphics object. More...
 
void DrawGraphics (double originX, double originY, Graphics graphics, string tag)
 Draws a Graphics object on the current Graphics object, prepending the supplied tag to the tags contained in the Graphics object being drawn. More...
 
void DrawGraphics (Point origin, Graphics graphics, string tag)
 Draws a Graphics object on the current Graphics object, prepending the supplied tag to the tags contained in the Graphics object being drawn. More...
 
void DrawGraphics (double originX, double originY, Graphics graphics)
 Draws a Graphics object on the current Graphics object. More...
 
void DrawGraphics (Point origin, Graphics graphics, IFilter filter, string tag=null)
 Draws a Graphics object on the current Graphics object, applying the specified filter . More...
 
void DrawGraphics (double originX, double originY, Graphics graphics, IFilter filter, string tag=null)
 Draws a Graphics object on the current Graphics object, applying the specified filter . More...
 
Graphics Transform (Func< Point, Point > transformationFunction, double linearisationResolution)
 Creates a new Graphics object in which all the graphics actions have been transformed using an arbitrary transformation function. Raster images are replaced by grey rectangles. More...
 
Graphics Transform (Func< Point, Point > transformationFunction, double linearisationResolution, double maxSegmentLength)
 Creates a new Graphics object in which all the graphics actions have been transformed using an arbitrary transformation function. Raster images are replaced by grey rectangles. More...
 
Graphics Linearise (double resolution)
 Creates a new Graphics object by linearising all of the elements of the current instance, i.e. replacing curve segments with series of line segments that approximate them. Raster images are left unchanged. More...
 
Rectangle GetBounds ()
 Computes the rectangular bounds of the region affected by the drawing operations performed on the Graphics object. More...
 
bool TryRasterise (Rectangle region, double scale, bool interpolate, out RasterImage output)
 Tries to rasterise specified region of this Graphics object using the default rasterisation method. More...
 
void Crop (Rectangle region)
 Removes graphics actions that fall completely outside of the specified region . More...
 
void Crop (Point topLeft, Size size)
 Removes graphics actions that fall completely outside of the specified region. More...
 
IEnumerable< string > GetTags ()
 Gets all the tags that have been defined in the Graphics. More...
 
void FillText (Point origin, string text, Font font, Brush fillColour, TextBaselines textBaseline=TextBaselines.Top, string tag=null)
 Fill a text string. More...
 
void FillText (Point origin, string text, Font font, Brush fillColour, TextSpacing spacing, TextBaselines textBaseline=TextBaselines.Top, string tag=null)
 Fill a text string. More...
 
void FillText (double originX, double originY, string text, Font font, Brush fillColour, TextBaselines textBaseline=TextBaselines.Top, string tag=null)
 Fill a text string. More...
 
void FillText (double originX, double originY, string text, Font font, Brush fillColour, TextSpacing spacing, TextBaselines textBaseline=TextBaselines.Top, string tag=null)
 Fill a text string. More...
 
void StrokeText (Point origin, string text, Font font, Brush strokeColour, TextBaselines textBaseline=TextBaselines.Top, double lineWidth=1, LineCaps lineCap=LineCaps.Butt, LineJoins lineJoin=LineJoins.Miter, LineDash? lineDash=null, string tag=null)
 Stroke a text string. More...
 
void StrokeText (Point origin, string text, Font font, Brush strokeColour, TextSpacing spacing, TextBaselines textBaseline=TextBaselines.Top, double lineWidth=1, LineCaps lineCap=LineCaps.Butt, LineJoins lineJoin=LineJoins.Miter, LineDash? lineDash=null, string tag=null)
 Stroke a text string. More...
 
void StrokeText (double originX, double originY, string text, Font font, Brush strokeColour, TextBaselines textBaseline=TextBaselines.Top, double lineWidth=1, LineCaps lineCap=LineCaps.Butt, LineJoins lineJoin=LineJoins.Miter, LineDash? lineDash=null, string tag=null)
 Stroke a text string. More...
 
void StrokeText (double originX, double originY, string text, Font font, Brush strokeColour, TextSpacing spacing, TextBaselines textBaseline=TextBaselines.Top, double lineWidth=1, LineCaps lineCap=LineCaps.Butt, LineJoins lineJoin=LineJoins.Miter, LineDash? lineDash=null, string tag=null)
 Stroke a text string. More...
 
void FillTextOnPath (GraphicsPath path, string text, Font font, Brush fillColour, double reference=0, TextAnchors anchor=TextAnchors.Left, TextBaselines textBaseline=TextBaselines.Top, string tag=null)
 Fill a text string along a GraphicsPath. More...
 
void StrokeTextOnPath (GraphicsPath path, string text, Font font, Brush strokeColour, double reference=0, TextAnchors anchor=TextAnchors.Left, TextBaselines textBaseline=TextBaselines.Top, double lineWidth=1, LineCaps lineCap=LineCaps.Butt, LineJoins lineJoin=LineJoins.Miter, LineDash? lineDash=null, string tag=null)
 Stroke a text string along a GraphicsPath. More...
 
void FillText (Point origin, IEnumerable< FormattedText > text, Brush fillColour, TextBaselines textBaseline=TextBaselines.Top, string tag=null)
 Fill a formatted text string. More...
 
void FillText (double originX, double originY, IEnumerable< FormattedText > text, Brush fillColour, TextBaselines textBaseline=TextBaselines.Top, string tag=null)
 Fill a formatted text string. More...
 
void StrokeText (Point origin, IEnumerable< FormattedText > text, Brush strokeColour, TextBaselines textBaseline=TextBaselines.Top, double lineWidth=1, LineCaps lineCap=LineCaps.Butt, LineJoins lineJoin=LineJoins.Miter, LineDash? lineDash=null, string tag=null)
 Stroke a formatted text string. More...
 
void StrokeText (double originX, double originY, IEnumerable< FormattedText > text, Brush strokeColour, TextBaselines textBaseline=TextBaselines.Top, double lineWidth=1, LineCaps lineCap=LineCaps.Butt, LineJoins lineJoin=LineJoins.Miter, LineDash? lineDash=null, string tag=null)
 Stroke a formatted text string. More...
 
Size MeasureText (string text, Font font)
 Measure a text string. See also

See also
Font.MeasureText(string), Font.MeasureTextAdvanced(string)

and . More...

 
Size MeasureText (IEnumerable< FormattedText > text)
 Measure a formatted text string. See also

See also
FormattedTextExtensions.Measure(IEnumerable<FormattedText>)

. More...

 
void FillTextUnderline (double originX, double originY, string text, Font font, Brush fillColour, TextBaselines textBaseline=TextBaselines.Top, string tag=null)
 Fills the underline of the specified text string. More...
 
void FillTextUnderline (Point origin, string text, Font font, Brush fillColour, TextBaselines textBaseline=TextBaselines.Top, string tag=null)
 Fills the underline of the specified text string. More...
 
void StrokeTextUnderline (double originX, double originY, string text, Font font, Brush strokeColour, TextBaselines textBaseline=TextBaselines.Top, double lineWidth=1, LineCaps lineCap=LineCaps.Butt, LineJoins lineJoin=LineJoins.Miter, LineDash? lineDash=null, string tag=null)
 Stroke the underline of the specified text string. More...
 
void StrokeTextUnderline (Point origin, string text, Font font, Brush strokeColour, TextBaselines textBaseline=TextBaselines.Top, double lineWidth=1, LineCaps lineCap=LineCaps.Butt, LineJoins lineJoin=LineJoins.Miter, LineDash? lineDash=null, string tag=null)
 Stroke the underline of the specified text string. More...
 
void FillTextUnderline (double originX, double originY, IEnumerable< FormattedText > text, Brush fillColour, TextBaselines textBaseline=TextBaselines.Top, string tag=null)
 Fill the underline of the specified formatted text string. More...
 
void FillTextUnderline (Point origin, IEnumerable< FormattedText > text, Brush fillColour, TextBaselines textBaseline=TextBaselines.Top, string tag=null)
 Fill the underline of the specified formatted text string. More...
 
void StrokeTextUnderline (double originX, double originY, IEnumerable< FormattedText > text, Brush strokeColour, TextBaselines textBaseline=TextBaselines.Top, double lineWidth=1, LineCaps lineCap=LineCaps.Butt, LineJoins lineJoin=LineJoins.Miter, LineDash? lineDash=null, string tag=null)
 Stroke the underline of the specified formatted text string. More...
 
void StrokeTextUnderline (Point origin, IEnumerable< FormattedText > text, Brush strokeColour, TextBaselines textBaseline=TextBaselines.Top, double lineWidth=1, LineCaps lineCap=LineCaps.Butt, LineJoins lineJoin=LineJoins.Miter, LineDash? lineDash=null, string tag=null)
 Stroke the underline of the specified formatted text string. More...
 

Static Public Attributes

static Func< Graphics, Rectangle, double, bool, RasterImageRasterisationMethod = null
 A method that is used to rasterise a region of a Graphics object. Set this to null if you wish to use the default rasterisation methods (implemented by either VectSharp.Raster, or VectSharp.Raster.ImageSharp). You will have to provide your own implementation of this method if neither VectSharp.Raster nor VectSharp.Raster.ImageSharp are referenced by your project. The first argument of this method is the Graphics to be rasterised, the second is a Rectangle representing the region to rasterise, the third is a double representing the scale, and the third is a boolean value indicating whether the resulting RasterImage should be interpolated. More...
 

Properties

static UnbalancedStackActions UnbalancedStackAction = UnbalancedStackActions.Throw [get, set]
 Determines how an unbalanced graphics state stack (which occurs if the number of calls to Save and Restore is not equal) will be treated. The default is UnbalancedStackActions.Throw. More...
 
FillRule DefaultFillRule = FillRule.NonZeroWinding [get, set]
 The default fill rule. More...
 
bool UseUniqueTags = true [get, set]
 Determines whether unique tags should be used for graphics actions that create multiple objects (e.g. drawing text). More...
 

Detailed Description

Represents an abstract drawing surface.

Definition at line 279 of file Graphics.cs.

Member Function Documentation

◆ CopyToIGraphicsContext()

void VectSharp.Graphics.CopyToIGraphicsContext ( IGraphicsContext  destinationContext)

Copy the current graphics to an instance of a class implementing IGraphicsContext.

Parameters
destinationContextThe IGraphicsContext on which the graphics are to be copied.

Definition at line 667 of file Graphics.cs.

◆ Crop() [1/2]

void VectSharp.Graphics.Crop ( Point  topLeft,
Size  size 
)

Removes graphics actions that fall completely outside of the specified region.

Parameters
topLeftThe top-left corner of the area to preserve.
sizeThe size of the area to preserve.

Definition at line 1700 of file Graphics.cs.

◆ Crop() [2/2]

void VectSharp.Graphics.Crop ( Rectangle  region)

Removes graphics actions that fall completely outside of the specified region .

Parameters
regionThe area to preserve.

Definition at line 1611 of file Graphics.cs.

◆ DrawGraphics() [1/6]

void VectSharp.Graphics.DrawGraphics ( double  originX,
double  originY,
Graphics  graphics 
)

Draws a Graphics object on the current Graphics object.

Parameters
originXThe horizontal coordinate at which to place the origin of graphics .
originYThe vertical coordinate at which to place the origin of graphics .
graphicsThe Graphics object to draw on the current Graphics object.

Definition at line 951 of file Graphics.cs.

◆ DrawGraphics() [2/6]

void VectSharp.Graphics.DrawGraphics ( double  originX,
double  originY,
Graphics  graphics,
IFilter  filter,
string  tag = null 
)

Draws a Graphics object on the current Graphics object, applying the specified filter .

Parameters
originXThe horizontal coordinate at which to place the origin of graphics .
originYThe vertical coordinate at which to place the origin of graphics .
graphicsThe Graphics object to draw on the current Graphics object.
filterAn IFilter object, representing the filter to apply to the graphics object.
tagA tag to identify the filter.

Definition at line 993 of file Graphics.cs.

◆ DrawGraphics() [3/6]

void VectSharp.Graphics.DrawGraphics ( double  originX,
double  originY,
Graphics  graphics,
string  tag 
)

Draws a Graphics object on the current Graphics object, prepending the supplied tag to the tags contained in the Graphics object being drawn.

Parameters
originXThe horizontal coordinate at which to place the origin of graphics .
originYThe vertical coordinate at which to place the origin of graphics .
graphicsThe Graphics object to draw on the current Graphics object.
tagThe tag to prepend to the tags contained in the graphics object.

Definition at line 894 of file Graphics.cs.

◆ DrawGraphics() [4/6]

void VectSharp.Graphics.DrawGraphics ( Point  origin,
Graphics  graphics 
)

Draws a Graphics object on the current Graphics object.

Parameters
originThe point at which to place the origin of graphics .
graphicsThe Graphics object to draw on the current Graphics object.

Definition at line 875 of file Graphics.cs.

◆ DrawGraphics() [5/6]

void VectSharp.Graphics.DrawGraphics ( Point  origin,
Graphics  graphics,
IFilter  filter,
string  tag = null 
)

Draws a Graphics object on the current Graphics object, applying the specified filter .

Parameters
originThe point at which to place the origin of graphics .
graphicsThe Graphics object to draw on the current Graphics object.
filterAn IFilter object, representing the filter to apply to the graphics object.
tagA tag to identify the filter.

Definition at line 963 of file Graphics.cs.

◆ DrawGraphics() [6/6]

void VectSharp.Graphics.DrawGraphics ( Point  origin,
Graphics  graphics,
string  tag 
)

Draws a Graphics object on the current Graphics object, prepending the supplied tag to the tags contained in the Graphics object being drawn.

Parameters
originThe point at which to place the origin of graphics .
graphicsThe Graphics object to draw on the current Graphics object.
tagThe tag to prepend to the tags contained in the graphics object.

Definition at line 905 of file Graphics.cs.

◆ DrawRasterImage() [1/5]

void VectSharp.Graphics.DrawRasterImage ( double  x,
double  y,
double  width,
double  height,
RasterImage  image,
string  tag = null 
)

Draw a raster image.

Parameters
xThe horizontal coordinate of the top-left corner of the rectangle delimiting the destination area of the image.
yThe vertical coordinate of the top-left corner of the rectangle delimiting the destination area of the image.
widthThe width of the rectangle delimiting the destination area of the image.
heightThe height of the rectangle delimiting the destination area of the image.
imageThe image to draw.
tagA tag to identify the drawn image.

Definition at line 572 of file Graphics.cs.

◆ DrawRasterImage() [2/5]

void VectSharp.Graphics.DrawRasterImage ( double  x,
double  y,
RasterImage  image,
string  tag = null 
)

Draw a raster image.

Parameters
xThe horizontal coordinate of the top-left corner of the rectangle delimiting the destination area of the image.
yThe vertical coordinate of the top-left corner of the rectangle delimiting the destination area of the image.
imageThe image to draw.
tagA tag to identify the drawn image.

Definition at line 547 of file Graphics.cs.

◆ DrawRasterImage() [3/5]

void VectSharp.Graphics.DrawRasterImage ( int  sourceX,
int  sourceY,
int  sourceWidth,
int  sourceHeight,
double  destinationX,
double  destinationY,
double  destinationWidth,
double  destinationHeight,
RasterImage  image,
string  tag = null 
)

Draw a raster image.

Parameters
sourceXThe horizontal coordinate of the top-left corner of the rectangle delimiting the source area of the image.
sourceYThe vertical coordinate of the top-left corner of the rectangle delimiting the source area of the image.
sourceWidthThe width of the rectangle delimiting the source area of the image.
sourceHeightThe height of the rectangle delimiting the source area of the image.
destinationXThe horizontal coordinate of the top-left corner of the rectangle delimiting the destination area of the image.
destinationYThe vertical coordinate of the top-left corner of the rectangle delimiting the destination area of the image.
destinationWidthThe width of the rectangle delimiting the destination area of the image.
destinationHeightThe height of the rectangle delimiting the destination area of the image.
imageThe image to draw.
tagA tag to identify the drawn image.

Definition at line 535 of file Graphics.cs.

◆ DrawRasterImage() [4/5]

void VectSharp.Graphics.DrawRasterImage ( Point  position,
RasterImage  image,
string  tag = null 
)

Draw a raster image.

Parameters
positionThe the top-left corner of the rectangle delimiting the destination area of the image.
imageThe image to draw.
tagA tag to identify the drawn image.

Definition at line 558 of file Graphics.cs.

◆ DrawRasterImage() [5/5]

void VectSharp.Graphics.DrawRasterImage ( Point  position,
Size  size,
RasterImage  image,
string  tag = null 
)

Draw a raster image.

Parameters
positionThe the top-left corner of the rectangle delimiting the destination area of the image.
sizeThe size of the rectangle delimiting the destination area of the image.
imageThe image to draw.
tagA tag to identify the drawn image.

Definition at line 584 of file Graphics.cs.

◆ FillPath() [1/2]

void VectSharp.Graphics.FillPath ( GraphicsPath  path,
Brush  fillColour,
FillRule  fillRule,
string  tag = null 
)

Fill a GraphicsPath.

Parameters
pathThe GraphicsPath to fill.
fillColourThe Brush with which to fill the GraphicsPath.
fillRuleThe FillRule that determines which parts of the path are filled.
tagA tag to identify the filled path.

Definition at line 311 of file Graphics.cs.

◆ FillPath() [2/2]

void VectSharp.Graphics.FillPath ( GraphicsPath  path,
Brush  fillColour,
string  tag = null 
)

Fill a GraphicsPath.

Parameters
pathThe GraphicsPath to fill.
fillColourThe Brush with which to fill the GraphicsPath.
tagA tag to identify the filled path.

Definition at line 299 of file Graphics.cs.

◆ FillRectangle() [1/2]

void VectSharp.Graphics.FillRectangle ( double  leftX,
double  topY,
double  width,
double  height,
Brush  fillColour,
string  tag = null 
)

Fill a rectangle.

Parameters
leftXThe horizontal coordinate of the top-left corner of the rectangle.
topYThe vertical coordinate of the top-left corner of the rectangle.
widthThe width of the rectangle.
heightThe height of the rectangle.
fillColourThe colour with which to fill the rectangle.
tagA tag to identify the filled rectangle.

Definition at line 483 of file Graphics.cs.

◆ FillRectangle() [2/2]

void VectSharp.Graphics.FillRectangle ( Point  topLeft,
Size  size,
Brush  fillColour,
string  tag = null 
)

Fill a rectangle.

Parameters
topLeftThe top-left corner of the rectangle.
sizeThe size of the rectangle.
fillColourThe colour with which to fill the rectangle.
tagA tag to identify the filled rectangle.

Definition at line 469 of file Graphics.cs.

◆ FillText() [1/6]

void VectSharp.Graphics.FillText ( double  originX,
double  originY,
IEnumerable< FormattedText text,
Brush  fillColour,
TextBaselines  textBaseline = TextBaselines.Top,
string  tag = null 
)

Fill a formatted text string.

Parameters
originXThe horizontal coordinate of the text origin.
originYThe vertical coordinate of the text origin. See textBaseline .
textThe FormattedText to draw.
fillColourThe default Brush to use to fill the text. This can be overridden by each text element.
textBaselineThe text baseline (determines what originY represents).
tagA tag to identify the filled text.

Definition at line 638 of file Graphics.Text.cs.

◆ FillText() [2/6]

void VectSharp.Graphics.FillText ( double  originX,
double  originY,
string  text,
Font  font,
Brush  fillColour,
TextBaselines  textBaseline = TextBaselines.Top,
string  tag = null 
)

Fill a text string.

Parameters
originXThe horizontal coordinate of the text origin.
originYThe vertical coordinate of the text origin. See textBaseline .
textThe string to draw.
fontThe font with which to draw the text.
fillColourThe Brush to use to fill the text.
textBaselineThe text baseline (determines what originY represents).
tagA tag to identify the filled text.

Definition at line 79 of file Graphics.Text.cs.

◆ FillText() [3/6]

void VectSharp.Graphics.FillText ( double  originX,
double  originY,
string  text,
Font  font,
Brush  fillColour,
TextSpacing  spacing,
TextBaselines  textBaseline = TextBaselines.Top,
string  tag = null 
)

Fill a text string.

Parameters
originXThe horizontal coordinate of the text origin.
originYThe vertical coordinate of the text origin. See textBaseline .
textThe string to draw.
fontThe font with which to draw the text.
fillColourThe Brush to use to fill the text.
spacingSpacing parameters to use for the text.
textBaselineThe text baseline (determines what originY represents).
tagA tag to identify the filled text.

Definition at line 103 of file Graphics.Text.cs.

◆ FillText() [4/6]

void VectSharp.Graphics.FillText ( Point  origin,
IEnumerable< FormattedText text,
Brush  fillColour,
TextBaselines  textBaseline = TextBaselines.Top,
string  tag = null 
)

Fill a formatted text string.

Parameters
originThe text origin. See textBaseline .
textThe FormattedText to draw.
fillColourThe default Brush to use to fill the text. This can be overridden by each text element.
textBaselineThe text baseline (determines what the vertical component of origin represents).
tagA tag to identify the filled text.

Definition at line 509 of file Graphics.Text.cs.

◆ FillText() [5/6]

void VectSharp.Graphics.FillText ( Point  origin,
string  text,
Font  font,
Brush  fillColour,
TextBaselines  textBaseline = TextBaselines.Top,
string  tag = null 
)

Fill a text string.

Parameters
originThe text origin. See textBaseline .
textThe string to draw.
fontThe font with which to draw the text.
fillColourThe Brush to use to fill the text.
textBaselineThe text baseline (determines what the vertical component of origin represents).
tagA tag to identify the filled text.

Definition at line 34 of file Graphics.Text.cs.

◆ FillText() [6/6]

void VectSharp.Graphics.FillText ( Point  origin,
string  text,
Font  font,
Brush  fillColour,
TextSpacing  spacing,
TextBaselines  textBaseline = TextBaselines.Top,
string  tag = null 
)

Fill a text string.

Parameters
originThe text origin. See textBaseline .
textThe string to draw.
fontThe font with which to draw the text.
fillColourThe Brush to use to fill the text.
spacingSpacing parameters to use for the text.
textBaselineThe text baseline (determines what the vertical component of origin represents).
tagA tag to identify the filled text.

Definition at line 57 of file Graphics.Text.cs.

◆ FillTextOnPath()

void VectSharp.Graphics.FillTextOnPath ( GraphicsPath  path,
string  text,
Font  font,
Brush  fillColour,
double  reference = 0,
TextAnchors  anchor = TextAnchors.Left,
TextBaselines  textBaseline = TextBaselines.Top,
string  tag = null 
)

Fill a text string along a GraphicsPath.

Parameters
pathThe GraphicsPath along which the text will flow.
textThe string to draw.
fontThe font with which to draw the text.
fillColourThe Brush to use to fill the text.
referenceThe (relative) starting point on the path starting from which the text should be drawn (0 is the start of the path, 1 is the end of the path).
anchorThe anchor in the text string that will correspond to the point specified by the reference .
textBaselineThe text baseline (determines which the position of the text in relation to the path .
tagA tag to identify the filled text.

Definition at line 232 of file Graphics.Text.cs.

◆ FillTextUnderline() [1/4]

void VectSharp.Graphics.FillTextUnderline ( double  originX,
double  originY,
IEnumerable< FormattedText text,
Brush  fillColour,
TextBaselines  textBaseline = TextBaselines.Top,
string  tag = null 
)

Fill the underline of the specified formatted text string.

Parameters
originXThe horizontal coordinate of the text origin.
originYThe vertical coordinate of the text origin. See textBaseline .
textThe FormattedText whose underline will be drawn.
fillColourThe default Brush to use to fill the underline. This can be overridden by each text element.
textBaselineThe text baseline (determines what originY represents).
tagA tag to identify the filled underlined.

Definition at line 908 of file Graphics.Text.cs.

◆ FillTextUnderline() [2/4]

void VectSharp.Graphics.FillTextUnderline ( double  originX,
double  originY,
string  text,
Font  font,
Brush  fillColour,
TextBaselines  textBaseline = TextBaselines.Top,
string  tag = null 
)

Fills the underline of the specified text string.

Parameters
originXThe horizontal coordinate of the text origin.
originYThe vertical coordinate of the text origin. See textBaseline .
textThe string whose underline will be draw.
fontThe font with which to draw the text.
fillColourThe Brush to use to fill the underline.
textBaselineThe text baseline (determines what originY represents).
tagA tag to identify the filled underline.

Definition at line 834 of file Graphics.Text.cs.

◆ FillTextUnderline() [3/4]

void VectSharp.Graphics.FillTextUnderline ( Point  origin,
IEnumerable< FormattedText text,
Brush  fillColour,
TextBaselines  textBaseline = TextBaselines.Top,
string  tag = null 
)

Fill the underline of the specified formatted text string.

Parameters
originThe text origin. See textBaseline .
textThe FormattedText whose underline will be drawn.
fillColourThe default Brush to use to fill the underline. This can be overridden by each text element.
textBaselineThe text baseline (determines what the vertical component of origin represents).
tagA tag to identify the filled underlined.

Definition at line 921 of file Graphics.Text.cs.

◆ FillTextUnderline() [4/4]

void VectSharp.Graphics.FillTextUnderline ( Point  origin,
string  text,
Font  font,
Brush  fillColour,
TextBaselines  textBaseline = TextBaselines.Top,
string  tag = null 
)

Fills the underline of the specified text string.

Parameters
originThe text origin. See textBaseline .
textThe string whose underline will be draw.
fontThe font with which to draw the text.
fillColourThe Brush to use to fill the underline.
textBaselineThe text baseline (determines what the vertical component of origin represents).
tagA tag to identify the filled underline.

Definition at line 848 of file Graphics.Text.cs.

◆ GetBounds()

Rectangle VectSharp.Graphics.GetBounds ( )

Computes the rectangular bounds of the region affected by the drawing operations performed on the Graphics object.

Returns
The smallest rectangle that contains all the elements drawn on the Graphics.

Definition at line 1458 of file Graphics.cs.

◆ GetTags()

IEnumerable< string > VectSharp.Graphics.GetTags ( )

Gets all the tags that have been defined in the Graphics.

Returns
An IEnumerable<T> of strings that, when enumerated, returns all the tags that have been defined in the Graphics.

Definition at line 1710 of file Graphics.cs.

◆ Linearise()

Graphics VectSharp.Graphics.Linearise ( double  resolution)

Creates a new Graphics object by linearising all of the elements of the current instance, i.e. replacing curve segments with series of line segments that approximate them. Raster images are left unchanged.

Parameters
resolutionThe resolution that will be used to linearise curve segments.
Returns
A new Graphics object containing the linearised elements.

Definition at line 1401 of file Graphics.cs.

◆ MeasureText() [1/2]

Size VectSharp.Graphics.MeasureText ( IEnumerable< FormattedText text)

Measure a formatted text string. See also

See also
FormattedTextExtensions.Measure(IEnumerable<FormattedText>)

.

Parameters
textThe collection of FormattedText objects to measure.
Returns
The size of the measured text .

Definition at line 817 of file Graphics.Text.cs.

◆ MeasureText() [2/2]

Size VectSharp.Graphics.MeasureText ( string  text,
Font  font 
)

Measure a text string. See also

See also
Font.MeasureText(string), Font.MeasureTextAdvanced(string)

and .

Parameters
textThe string to measure.
fontThe font to use to measure the string.
Returns
The size of the measured text .

Definition at line 799 of file Graphics.Text.cs.

◆ Restore()

void VectSharp.Graphics.Restore ( )

Restore the previous transform state (rotation, translation scale).

Definition at line 600 of file Graphics.cs.

◆ Rotate()

void VectSharp.Graphics.Rotate ( double  angle,
string  tag = null 
)

Rotate the coordinate system around the origin.

Parameters
angleThe angle (in radians) by which to rotate the coordinate system.
tagA tag to identify the transform.

Definition at line 375 of file Graphics.cs.

◆ RotateAt()

void VectSharp.Graphics.RotateAt ( double  angle,
Point  pivot,
string  tag = null 
)

Rotate the coordinate system around a pivot point.

Parameters
angleThe angle (in radians) by which to rotate the coordinate system.
pivotThe pivot around which the coordinate system is to be rotated.
tagA tag to identify the transform.

Definition at line 386 of file Graphics.cs.

◆ Save()

void VectSharp.Graphics.Save ( )

Save the current transform state (rotation, translation, scale).

Definition at line 592 of file Graphics.cs.

◆ Scale()

void VectSharp.Graphics.Scale ( double  scaleX,
double  scaleY,
string  tag = null 
)

Scale the coordinate system with respect to the origin.

Parameters
scaleXThe horizontal scale.
scaleYThe vertical scale.
tagA tag to identify the transform.

Definition at line 457 of file Graphics.cs.

◆ SetClippingPath() [1/3]

void VectSharp.Graphics.SetClippingPath ( double  leftX,
double  topY,
double  width,
double  height,
string  tag = null 
)

Intersect the current clipping path with the specified rectangle.

Parameters
leftXThe horizontal coordinate of the top-left corner of the rectangle.
topYThe vertical coordinate of the top-left corner of the rectangle.
widthThe width of the rectangle.
heightThe height of the rectangle.
tagA tag to identify the clipping path.

Definition at line 354 of file Graphics.cs.

◆ SetClippingPath() [2/3]

void VectSharp.Graphics.SetClippingPath ( GraphicsPath  path,
string  tag = null 
)

Intersect the current clipping path with the specified GraphicsPath.

Parameters
pathThe GraphicsPath to intersect with the current clipping path.
tagA tag to identify the clipping path.

Definition at line 341 of file Graphics.cs.

◆ SetClippingPath() [3/3]

void VectSharp.Graphics.SetClippingPath ( Point  topLeft,
Size  size,
string  tag = null 
)

Intersect the current clipping path with the specified rectangle.

Parameters
topLeftThe top-left corner of the rectangle.
sizeThe size of the rectangle.
tagA tag to identify the clipping path.

Definition at line 365 of file Graphics.cs.

◆ StrokePath()

void VectSharp.Graphics.StrokePath ( GraphicsPath  path,
Brush  strokeColour,
double  lineWidth = 1,
LineCaps  lineCap = LineCaps.Butt,
LineJoins  lineJoin = LineJoins.Miter,
LineDash lineDash = null,
string  tag = null 
)

Stroke a GraphicsPath.

Parameters
pathThe GraphicsPath to stroke.
strokeColourThe Brush with which to stroke the GraphicsPath.
lineWidthThe width of the line with which the path is stroked.
lineCapThe line cap to use to stroke the path.
lineJoinThe line join to use to stroke the path.
lineDashThe line dash to use to stroke the path.
tagA tag to identify the stroked path.

Definition at line 331 of file Graphics.cs.

◆ StrokeRectangle() [1/2]

void VectSharp.Graphics.StrokeRectangle ( double  leftX,
double  topY,
double  width,
double  height,
Brush  strokeColour,
double  lineWidth = 1,
LineCaps  lineCap = LineCaps.Butt,
LineJoins  lineJoin = LineJoins.Miter,
LineDash lineDash = null,
string  tag = null 
)

Stroke a rectangle.

Parameters
leftXThe horizontal coordinate of the top-left corner of the rectangle.
topYThe vertical coordinate of the top-left corner of the rectangle.
widthThe width of the rectangle.
heightThe height of the rectangle.
strokeColourThe colour with which to stroke the rectangle.
lineWidthThe width of the line with which the rectangle is stroked.
lineCapThe line cap to use to stroke the rectangle.
lineJoinThe line join to use to stroke the rectangle.
lineDashThe line dash to use to stroke the rectangle.
tagA tag to identify the filled rectangle.

Definition at line 517 of file Graphics.cs.

◆ StrokeRectangle() [2/2]

void VectSharp.Graphics.StrokeRectangle ( Point  topLeft,
Size  size,
Brush  strokeColour,
double  lineWidth = 1,
LineCaps  lineCap = LineCaps.Butt,
LineJoins  lineJoin = LineJoins.Miter,
LineDash lineDash = null,
string  tag = null 
)

Stroke a rectangle.

Parameters
topLeftThe top-left corner of the rectangle.
sizeThe size of the rectangle.
strokeColourThe colour with which to stroke the rectangle.
lineWidthThe width of the line with which the rectangle is stroked.
lineCapThe line cap to use to stroke the rectangle.
lineJoinThe line join to use to stroke the rectangle.
lineDashThe line dash to use to stroke the rectangle.
tagA tag to identify the filled rectangle.

Definition at line 499 of file Graphics.cs.

◆ StrokeText() [1/6]

void VectSharp.Graphics.StrokeText ( double  originX,
double  originY,
IEnumerable< FormattedText text,
Brush  strokeColour,
TextBaselines  textBaseline = TextBaselines.Top,
double  lineWidth = 1,
LineCaps  lineCap = LineCaps.Butt,
LineJoins  lineJoin = LineJoins.Miter,
LineDash lineDash = null,
string  tag = null 
)

Stroke a formatted text string.

Parameters
originXThe horizontal coordinate of the text origin.
originYThe vertical coordinate of the text origin. See textBaseline .
textThe FormattedText to draw.
strokeColourThe default Brush with which to stroke the text.
lineWidthThe width of the line with which the text is stroked.
lineCapThe line cap to use to stroke the text.
lineJoinThe line join to use to stroke the text.
lineDashThe line dash to use to stroke the text.
textBaselineThe text baseline (determines what originY represents).
tagA tag to identify the stroked text.

Definition at line 787 of file Graphics.Text.cs.

◆ StrokeText() [2/6]

void VectSharp.Graphics.StrokeText ( double  originX,
double  originY,
string  text,
Font  font,
Brush  strokeColour,
TextBaselines  textBaseline = TextBaselines.Top,
double  lineWidth = 1,
LineCaps  lineCap = LineCaps.Butt,
LineJoins  lineJoin = LineJoins.Miter,
LineDash lineDash = null,
string  tag = null 
)

Stroke a text string.

Parameters
originXThe horizontal coordinate of the text origin.
originYThe vertical coordinate of the text origin. See textBaseline .
textThe string to draw.
fontThe font with which to draw the text.
strokeColourThe Brush with which to stroke the text.
lineWidthThe width of the line with which the text is stroked.
lineCapThe line cap to use to stroke the text.
lineJoinThe line join to use to stroke the text.
lineDashThe line dash to use to stroke the text.
textBaselineThe text baseline (determines what originY represents).
tagA tag to identify the stroked text.

Definition at line 181 of file Graphics.Text.cs.

◆ StrokeText() [3/6]

void VectSharp.Graphics.StrokeText ( double  originX,
double  originY,
string  text,
Font  font,
Brush  strokeColour,
TextSpacing  spacing,
TextBaselines  textBaseline = TextBaselines.Top,
double  lineWidth = 1,
LineCaps  lineCap = LineCaps.Butt,
LineJoins  lineJoin = LineJoins.Miter,
LineDash lineDash = null,
string  tag = null 
)

Stroke a text string.

Parameters
originXThe horizontal coordinate of the text origin.
originYThe vertical coordinate of the text origin. See textBaseline .
textThe string to draw.
fontThe font with which to draw the text.
strokeColourThe Brush with which to stroke the text.
spacingSpacing parameters to use for the text.
lineWidthThe width of the line with which the text is stroked.
lineCapThe line cap to use to stroke the text.
lineJoinThe line join to use to stroke the text.
lineDashThe line dash to use to stroke the text.
textBaselineThe text baseline (determines what originY represents).
tagA tag to identify the stroked text.

Definition at line 209 of file Graphics.Text.cs.

◆ StrokeText() [4/6]

void VectSharp.Graphics.StrokeText ( Point  origin,
IEnumerable< FormattedText text,
Brush  strokeColour,
TextBaselines  textBaseline = TextBaselines.Top,
double  lineWidth = 1,
LineCaps  lineCap = LineCaps.Butt,
LineJoins  lineJoin = LineJoins.Miter,
LineDash lineDash = null,
string  tag = null 
)

Stroke a formatted text string.

Parameters
originThe text origin. See textBaseline .
textThe FormattedText to draw.
strokeColourThe default Brush with which to stroke the text.
lineWidthThe width of the line with which the text is stroked.
lineCapThe line cap to use to stroke the text.
lineJoinThe line join to use to stroke the text.
lineDashThe line dash to use to stroke the text.
textBaselineThe text baseline (determines what the vertical component of origin represents).
tagA tag to identify the stroked text.

Definition at line 655 of file Graphics.Text.cs.

◆ StrokeText() [5/6]

void VectSharp.Graphics.StrokeText ( Point  origin,
string  text,
Font  font,
Brush  strokeColour,
TextBaselines  textBaseline = TextBaselines.Top,
double  lineWidth = 1,
LineCaps  lineCap = LineCaps.Butt,
LineJoins  lineJoin = LineJoins.Miter,
LineDash lineDash = null,
string  tag = null 
)

Stroke a text string.

Parameters
originThe text origin. See textBaseline .
textThe string to draw.
fontThe font with which to draw the text.
strokeColourThe Brush with which to stroke the text.
lineWidthThe width of the line with which the text is stroked.
lineCapThe line cap to use to stroke the text.
lineJoinThe line join to use to stroke the text.
lineDashThe line dash to use to stroke the text.
textBaselineThe text baseline (determines what the vertical component of origin represents).
tagA tag to identify the stroked text.

Definition at line 128 of file Graphics.Text.cs.

◆ StrokeText() [6/6]

void VectSharp.Graphics.StrokeText ( Point  origin,
string  text,
Font  font,
Brush  strokeColour,
TextSpacing  spacing,
TextBaselines  textBaseline = TextBaselines.Top,
double  lineWidth = 1,
LineCaps  lineCap = LineCaps.Butt,
LineJoins  lineJoin = LineJoins.Miter,
LineDash lineDash = null,
string  tag = null 
)

Stroke a text string.

Parameters
originThe text origin. See textBaseline .
textThe string to draw.
fontThe font with which to draw the text.
strokeColourThe Brush with which to stroke the text.
spacingSpacing parameters to use for the text.
lineWidthThe width of the line with which the text is stroked.
lineCapThe line cap to use to stroke the text.
lineJoinThe line join to use to stroke the text.
lineDashThe line dash to use to stroke the text.
textBaselineThe text baseline (determines what the vertical component of origin represents).
tagA tag to identify the stroked text.

Definition at line 155 of file Graphics.Text.cs.

◆ StrokeTextOnPath()

void VectSharp.Graphics.StrokeTextOnPath ( GraphicsPath  path,
string  text,
Font  font,
Brush  strokeColour,
double  reference = 0,
TextAnchors  anchor = TextAnchors.Left,
TextBaselines  textBaseline = TextBaselines.Top,
double  lineWidth = 1,
LineCaps  lineCap = LineCaps.Butt,
LineJoins  lineJoin = LineJoins.Miter,
LineDash lineDash = null,
string  tag = null 
)

Stroke a text string along a GraphicsPath.

Parameters
pathThe GraphicsPath along which the text will flow.
textThe string to draw.
fontThe font with which to draw the text.
strokeColourThe Brush with which to stroke the text.
lineWidthThe width of the line with which the text is stroked.
lineCapThe line cap to use to stroke the text.
lineJoinThe line join to use to stroke the text.
lineDashThe line dash to use to stroke the text.
referenceThe (relative) starting point on the path starting from which the text should be drawn (0 is the start of the path, 1 is the end of the path).
anchorThe anchor in the text string that will correspond to the point specified by the reference .
textBaselineThe text baseline (determines which the position of the text in relation to the path .
tagA tag to identify the stroked text.

Definition at line 374 of file Graphics.Text.cs.

◆ StrokeTextUnderline() [1/4]

void VectSharp.Graphics.StrokeTextUnderline ( double  originX,
double  originY,
IEnumerable< FormattedText text,
Brush  strokeColour,
TextBaselines  textBaseline = TextBaselines.Top,
double  lineWidth = 1,
LineCaps  lineCap = LineCaps.Butt,
LineJoins  lineJoin = LineJoins.Miter,
LineDash lineDash = null,
string  tag = null 
)

Stroke the underline of the specified formatted text string.

Parameters
originXThe horizontal coordinate of the text origin.
originYThe vertical coordinate of the text origin. See textBaseline .
textThe FormattedText to draw.
strokeColourThe default Brush with which to stroke the underline.
lineWidthThe width of the line with which the underline is stroked.
lineCapThe line cap to use to stroke the underline.
lineJoinThe line join to use to stroke the underline.
lineDashThe line dash to use to stroke the underline.
textBaselineThe text baseline (determines what originY represents).
tagA tag to identify the stroked underline.

Definition at line 1028 of file Graphics.Text.cs.

◆ StrokeTextUnderline() [2/4]

void VectSharp.Graphics.StrokeTextUnderline ( double  originX,
double  originY,
string  text,
Font  font,
Brush  strokeColour,
TextBaselines  textBaseline = TextBaselines.Top,
double  lineWidth = 1,
LineCaps  lineCap = LineCaps.Butt,
LineJoins  lineJoin = LineJoins.Miter,
LineDash lineDash = null,
string  tag = null 
)

Stroke the underline of the specified text string.

Parameters
originXThe horizontal coordinate of the text origin.
originYThe vertical coordinate of the text origin. See textBaseline .
textThe string whose underline will be drawn.
fontThe font with which to draw the text.
strokeColourThe Brush with which to stroke the underline.
lineWidthThe width of the line with which the underline is stroked.
lineCapThe line cap to use to stroke the underline.
lineJoinThe line join to use to stroke the underline.
lineDashThe line dash to use to stroke the underline.
textBaselineThe text baseline (determines what originY represents).
tagA tag to identify the stroked underline.

Definition at line 871 of file Graphics.Text.cs.

◆ StrokeTextUnderline() [3/4]

void VectSharp.Graphics.StrokeTextUnderline ( Point  origin,
IEnumerable< FormattedText text,
Brush  strokeColour,
TextBaselines  textBaseline = TextBaselines.Top,
double  lineWidth = 1,
LineCaps  lineCap = LineCaps.Butt,
LineJoins  lineJoin = LineJoins.Miter,
LineDash lineDash = null,
string  tag = null 
)

Stroke the underline of the specified formatted text string.

Parameters
originThe text origin. See textBaseline .
textThe FormattedText to draw.
strokeColourThe default Brush with which to stroke the underline.
lineWidthThe width of the line with which the underline is stroked.
lineCapThe line cap to use to stroke the underline.
lineJoinThe line join to use to stroke the underline.
lineDashThe line dash to use to stroke the underline.
textBaselineThe text baseline (determines what the vertical component of origin represents).
tagA tag to identify the stroked underline.

Definition at line 1045 of file Graphics.Text.cs.

◆ StrokeTextUnderline() [4/4]

void VectSharp.Graphics.StrokeTextUnderline ( Point  origin,
string  text,
Font  font,
Brush  strokeColour,
TextBaselines  textBaseline = TextBaselines.Top,
double  lineWidth = 1,
LineCaps  lineCap = LineCaps.Butt,
LineJoins  lineJoin = LineJoins.Miter,
LineDash lineDash = null,
string  tag = null 
)

Stroke the underline of the specified text string.

Parameters
originThe text origin. See textBaseline .
textThe string whose underline will be drawn.
fontThe font with which to draw the text.
strokeColourThe Brush with which to stroke the underline.
lineWidthThe width of the line with which the underline is stroked.
lineCapThe line cap to use to stroke the underline.
lineJoinThe line join to use to stroke the underline.
lineDashThe line dash to use to stroke the underline.
textBaselineThe text baseline (determines what the vertical component of origin represents).
tagA tag to identify the stroked underline.

Definition at line 889 of file Graphics.Text.cs.

◆ Transform() [1/3]

void VectSharp.Graphics.Transform ( double  a,
double  b,
double  c,
double  d,
double  e,
double  f,
string  tag = null 
)

Transform the coordinate system with the specified transformation matrix [ [a, c, e], [b, d, f], [0, 0, 1] ].

Parameters
aThe first element of the first column.
bThe second element of the first column.
cThe first element of the second column.
dThe second element of the second column.
eThe first element of the third column.
fThe second element of the third column.
tagA tag to identify the transform.

Definition at line 424 of file Graphics.cs.

◆ Transform() [2/3]

Graphics VectSharp.Graphics.Transform ( Func< Point, Point transformationFunction,
double  linearisationResolution 
)

Creates a new Graphics object in which all the graphics actions have been transformed using an arbitrary transformation function. Raster images are replaced by grey rectangles.

Parameters
transformationFunctionAn arbitrary transformation function.
linearisationResolutionThe resolution that will be used to linearise curve segments.
Returns
A new Graphics object in which all graphics actions have been linearised and transformed using the transformationFunction .

Definition at line 1072 of file Graphics.cs.

◆ Transform() [3/3]

Graphics VectSharp.Graphics.Transform ( Func< Point, Point transformationFunction,
double  linearisationResolution,
double  maxSegmentLength 
)

Creates a new Graphics object in which all the graphics actions have been transformed using an arbitrary transformation function. Raster images are replaced by grey rectangles.

Parameters
transformationFunctionAn arbitrary transformation function.
linearisationResolutionThe resolution that will be used to linearise curve segments.
maxSegmentLengthThe maximum length of line segments.
Returns
A new Graphics object in which all graphics actions have been linearised and transformed using the transformationFunction .

Definition at line 1271 of file Graphics.cs.

◆ Translate() [1/2]

void VectSharp.Graphics.Translate ( double  x,
double  y,
string  tag = null 
)

Translate the coordinate system origin.

Parameters
xThe horizontal translation.
yThe vertical translation.
tagA tag to identify the transform.

Definition at line 436 of file Graphics.cs.

◆ Translate() [2/2]

void VectSharp.Graphics.Translate ( Point  delta,
string  tag = null 
)

Translate the coordinate system origin.

Parameters
deltaThe new origin point.
tagA tag to identify the transform.

Definition at line 446 of file Graphics.cs.

◆ TryRasterise()

bool VectSharp.Graphics.TryRasterise ( Rectangle  region,
double  scale,
bool  interpolate,
out RasterImage  output 
)

Tries to rasterise specified region of this Graphics object using the default rasterisation method.

Parameters
regionThe region of the Graphics to rasterise.
scaleThe scale at which the image is rasterised.
interpolateDetermines whether the resulting RasterImage should be interpolated or not.
outputWhen this method returns, this will contain the rasterised image (or null if the image could not be rasterised.
Returns
true if the image could be rasterised; false if it could not be rasterised.

Definition at line 1566 of file Graphics.cs.

Member Data Documentation

◆ RasterisationMethod

Func<Graphics, Rectangle, double, bool, RasterImage> VectSharp.Graphics.RasterisationMethod = null
static

A method that is used to rasterise a region of a Graphics object. Set this to null if you wish to use the default rasterisation methods (implemented by either VectSharp.Raster, or VectSharp.Raster.ImageSharp). You will have to provide your own implementation of this method if neither VectSharp.Raster nor VectSharp.Raster.ImageSharp are referenced by your project. The first argument of this method is the Graphics to be rasterised, the second is a Rectangle representing the region to rasterise, the third is a double representing the scale, and the third is a boolean value indicating whether the resulting RasterImage should be interpolated.

Definition at line 1556 of file Graphics.cs.

Property Documentation

◆ DefaultFillRule

FillRule VectSharp.Graphics.DefaultFillRule = FillRule.NonZeroWinding
getset

The default fill rule.

Definition at line 291 of file Graphics.cs.

◆ UnbalancedStackAction

UnbalancedStackActions VectSharp.Graphics.UnbalancedStackAction = UnbalancedStackActions.Throw
staticgetset

Determines how an unbalanced graphics state stack (which occurs if the number of calls to Save and Restore is not equal) will be treated. The default is UnbalancedStackActions.Throw.

Definition at line 284 of file Graphics.cs.

◆ UseUniqueTags

bool VectSharp.Graphics.UseUniqueTags = true
getset

Determines whether unique tags should be used for graphics actions that create multiple objects (e.g. drawing text).

Definition at line 319 of file Graphics.cs.


The documentation for this class was generated from the following files: