VectSharp
2.2.1
A light library for C# vector graphics
|
Represents an abstract drawing surface. More...
Public Member Functions | |
void | FillPath (GraphicsPath path, Brush fillColour, 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) |
Intersect the current clipping path with the specified GraphicsPath. More... | |
void | SetClippingPath (double leftX, double topY, double width, double height) |
Intersect the current clipping path with the specified rectangle. More... | |
void | SetClippingPath (Point topLeft, Size size) |
Intersect the current clipping path with the specified rectangle. More... | |
void | Rotate (double angle) |
Rotate the coordinate system around the origin. More... | |
void | RotateAt (double angle, Point pivot) |
Rotate the coordinate system around a pivot point. More... | |
void | Transform (double a, double b, double c, double d, double e, double f) |
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) |
Translate the coordinate system origin. More... | |
void | Translate (Point delta) |
Translate the coordinate system origin. More... | |
void | Scale (double scaleX, double scaleY) |
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) |
Draws a Graphics object on the current Graphics object. More... | |
void | DrawGraphics (Point origin, Graphics graphics, IFilter filter) |
Draws a Graphics object on the current Graphics object, applying the specified filter . More... | |
void | DrawGraphics (double originX, double originY, Graphics graphics, IFilter filter) |
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 | FillText (Point origin, 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, 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 (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 | 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
and . More... | |
Size | MeasureText (IEnumerable< FormattedText > text) |
Measure a formatted text string. See also
. 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, RasterImage > | RasterisationMethod = 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... | |
Represents an abstract drawing surface.
Definition at line 261 of file Graphics.cs.
void VectSharp.Graphics.CopyToIGraphicsContext | ( | IGraphicsContext | destinationContext | ) |
Copy the current graphics to an instance of a class implementing IGraphicsContext.
destinationContext | The IGraphicsContext on which the graphics are to be copied. |
Definition at line 599 of file Graphics.cs.
void VectSharp.Graphics.DrawGraphics | ( | double | originX, |
double | originY, | ||
Graphics | graphics | ||
) |
Draws a Graphics object on the current Graphics object.
originX | The horizontal coordinate at which to place the origin of graphics . |
originY | The vertical coordinate at which to place the origin of graphics . |
graphics | The Graphics object to draw on the current Graphics object. |
Definition at line 820 of file Graphics.cs.
void VectSharp.Graphics.DrawGraphics | ( | double | originX, |
double | originY, | ||
Graphics | graphics, | ||
IFilter | filter | ||
) |
Draws a Graphics object on the current Graphics object, applying the specified filter .
originX | The horizontal coordinate at which to place the origin of graphics . |
originY | The vertical coordinate at which to place the origin of graphics . |
graphics | The Graphics object to draw on the current Graphics object. |
filter | An IFilter object, representing the filter to apply to the graphics object. |
Definition at line 852 of file Graphics.cs.
Draws a Graphics object on the current Graphics object, applying the specified filter .
origin | The point at which to place the origin of graphics . |
graphics | The Graphics object to draw on the current Graphics object. |
filter | An IFilter object, representing the filter to apply to the graphics object. |
Definition at line 831 of file Graphics.cs.
void VectSharp.Graphics.DrawRasterImage | ( | double | x, |
double | y, | ||
double | width, | ||
double | height, | ||
RasterImage | image, | ||
string | tag = null |
||
) |
Draw a raster image.
x | The horizontal coordinate of the top-left corner of the rectangle delimiting the destination area of the image. |
y | The vertical coordinate of the top-left corner of the rectangle delimiting the destination area of the image. |
width | The width of the rectangle delimiting the destination area of the image. |
height | The height of the rectangle delimiting the destination area of the image. |
image | The image to draw. |
tag | A tag to identify the drawn image. |
Definition at line 504 of file Graphics.cs.
void VectSharp.Graphics.DrawRasterImage | ( | double | x, |
double | y, | ||
RasterImage | image, | ||
string | tag = null |
||
) |
Draw a raster image.
x | The horizontal coordinate of the top-left corner of the rectangle delimiting the destination area of the image. |
y | The vertical coordinate of the top-left corner of the rectangle delimiting the destination area of the image. |
image | The image to draw. |
tag | A tag to identify the drawn image. |
Definition at line 479 of file Graphics.cs.
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.
sourceX | The horizontal coordinate of the top-left corner of the rectangle delimiting the source area of the image. |
sourceY | The vertical coordinate of the top-left corner of the rectangle delimiting the source area of the image. |
sourceWidth | The width of the rectangle delimiting the source area of the image. |
sourceHeight | The height of the rectangle delimiting the source area of the image. |
destinationX | The horizontal coordinate of the top-left corner of the rectangle delimiting the destination area of the image. |
destinationY | The vertical coordinate of the top-left corner of the rectangle delimiting the destination area of the image. |
destinationWidth | The width of the rectangle delimiting the destination area of the image. |
destinationHeight | The height of the rectangle delimiting the destination area of the image. |
image | The image to draw. |
tag | A tag to identify the drawn image. |
Definition at line 467 of file Graphics.cs.
void VectSharp.Graphics.DrawRasterImage | ( | Point | position, |
RasterImage | image, | ||
string | tag = null |
||
) |
Draw a raster image.
position | The the top-left corner of the rectangle delimiting the destination area of the image. |
image | The image to draw. |
tag | A tag to identify the drawn image. |
Definition at line 490 of file Graphics.cs.
void VectSharp.Graphics.DrawRasterImage | ( | Point | position, |
Size | size, | ||
RasterImage | image, | ||
string | tag = null |
||
) |
Draw a raster image.
position | The the top-left corner of the rectangle delimiting the destination area of the image. |
size | The size of the rectangle delimiting the destination area of the image. |
image | The image to draw. |
tag | A tag to identify the drawn image. |
Definition at line 516 of file Graphics.cs.
void VectSharp.Graphics.FillPath | ( | GraphicsPath | path, |
Brush | fillColour, | ||
string | tag = null |
||
) |
Fill a GraphicsPath.
path | The GraphicsPath to fill. |
fillColour | The Brush with which to fill the GraphicsPath. |
tag | A tag to identify the filled path. |
Definition at line 276 of file Graphics.cs.
void VectSharp.Graphics.FillRectangle | ( | double | leftX, |
double | topY, | ||
double | width, | ||
double | height, | ||
Brush | fillColour, | ||
string | tag = null |
||
) |
Fill a rectangle.
leftX | The horizontal coordinate of the top-left corner of the rectangle. |
topY | The vertical coordinate of the top-left corner of the rectangle. |
width | The width of the rectangle. |
height | The height of the rectangle. |
fillColour | The colour with which to fill the rectangle. |
tag | A tag to identify the filled rectangle. |
Definition at line 415 of file Graphics.cs.
void VectSharp.Graphics.FillRectangle | ( | Point | topLeft, |
Size | size, | ||
Brush | fillColour, | ||
string | tag = null |
||
) |
Fill a rectangle.
topLeft | The top-left corner of the rectangle. |
size | The size of the rectangle. |
fillColour | The colour with which to fill the rectangle. |
tag | A tag to identify the filled rectangle. |
Definition at line 401 of file Graphics.cs.
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.
originX | The horizontal coordinate of the text origin. |
originY | The vertical coordinate of the text origin. See textBaseline . |
text | The FormattedText to draw. |
fillColour | The default Brush to use to fill the text. This can be overridden by each text element. |
textBaseline | The text baseline (determines what originY represents). |
tag | A tag to identify the filled text. |
Definition at line 485 of file Graphics.Text.cs.
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.
originX | The horizontal coordinate of the text origin. |
originY | The vertical coordinate of the text origin. See textBaseline . |
text | The string to draw. |
font | The font with which to draw the text. |
fillColour | The Brush to use to fill the text. |
textBaseline | The text baseline (determines what originY represents). |
tag | A tag to identify the filled text. |
Definition at line 57 of file Graphics.Text.cs.
void VectSharp.Graphics.FillText | ( | Point | origin, |
IEnumerable< FormattedText > | text, | ||
Brush | fillColour, | ||
TextBaselines | textBaseline = TextBaselines.Top , |
||
string | tag = null |
||
) |
Fill a formatted text string.
origin | The text origin. See textBaseline . |
text | The FormattedText to draw. |
fillColour | The default Brush to use to fill the text. This can be overridden by each text element. |
textBaseline | The text baseline (determines what the vertical component of origin represents). |
tag | A tag to identify the filled text. |
Definition at line 392 of file Graphics.Text.cs.
void VectSharp.Graphics.FillText | ( | Point | origin, |
string | text, | ||
Font | font, | ||
Brush | fillColour, | ||
TextBaselines | textBaseline = TextBaselines.Top , |
||
string | tag = null |
||
) |
Fill a text string.
origin | The text origin. See textBaseline . |
text | The string to draw. |
font | The font with which to draw the text. |
fillColour | The Brush to use to fill the text. |
textBaseline | The text baseline (determines what the vertical component of origin represents). |
tag | A tag to identify the filled text. |
Definition at line 37 of file Graphics.Text.cs.
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.
path | The GraphicsPath along which the text will flow. |
text | The string to draw. |
font | The font with which to draw the text. |
fillColour | The Brush to use to fill the text. |
reference | The (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). |
anchor | The anchor in the text string that will correspond to the point specified by the reference . |
textBaseline | The text baseline (determines which the position of the text in relation to the path . |
tag | A tag to identify the filled text. |
Definition at line 125 of file Graphics.Text.cs.
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.
originX | The horizontal coordinate of the text origin. |
originY | The vertical coordinate of the text origin. See textBaseline . |
text | The FormattedText whose underline will be drawn. |
fillColour | The default Brush to use to fill the underline. This can be overridden by each text element. |
textBaseline | The text baseline (determines what originY represents). |
tag | A tag to identify the filled underlined. |
Definition at line 707 of file Graphics.Text.cs.
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.
originX | The horizontal coordinate of the text origin. |
originY | The vertical coordinate of the text origin. See textBaseline . |
text | The string whose underline will be draw. |
font | The font with which to draw the text. |
fillColour | The Brush to use to fill the underline. |
textBaseline | The text baseline (determines what originY represents). |
tag | A tag to identify the filled underline. |
Definition at line 639 of file Graphics.Text.cs.
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.
origin | The text origin. See textBaseline . |
text | The FormattedText whose underline will be drawn. |
fillColour | The default Brush to use to fill the underline. This can be overridden by each text element. |
textBaseline | The text baseline (determines what the vertical component of origin represents). |
tag | A tag to identify the filled underlined. |
Definition at line 720 of file Graphics.Text.cs.
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.
origin | The text origin. See textBaseline . |
text | The string whose underline will be draw. |
font | The font with which to draw the text. |
fillColour | The Brush to use to fill the underline. |
textBaseline | The text baseline (determines what the vertical component of origin represents). |
tag | A tag to identify the filled underline. |
Definition at line 653 of file Graphics.Text.cs.
Rectangle VectSharp.Graphics.GetBounds | ( | ) |
Computes the rectangular bounds of the region affected by the drawing operations performed on the Graphics object.
Definition at line 1313 of file Graphics.cs.
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.
resolution | The resolution that will be used to linearise curve segments. |
Definition at line 1257 of file Graphics.cs.
Size VectSharp.Graphics.MeasureText | ( | IEnumerable< FormattedText > | text | ) |
Measure a formatted text string. See also
.
text | The collection of FormattedText objects to measure. |
Definition at line 622 of file Graphics.Text.cs.
Measure a text string. See also
and .
text | The string to measure. |
font | The font to use to measure the string. |
Definition at line 611 of file Graphics.Text.cs.
void VectSharp.Graphics.Restore | ( | ) |
Restore the previous transform state (rotation, translation scale).
Definition at line 532 of file Graphics.cs.
void VectSharp.Graphics.Rotate | ( | double | angle | ) |
Rotate the coordinate system around the origin.
angle | The angle (in radians) by which to rotate the coordinate system. |
Definition at line 332 of file Graphics.cs.
void VectSharp.Graphics.RotateAt | ( | double | angle, |
Point | pivot | ||
) |
Rotate the coordinate system around a pivot point.
angle | The angle (in radians) by which to rotate the coordinate system. |
pivot | The pivot around which the coordinate system is to be rotated. |
Definition at line 342 of file Graphics.cs.
void VectSharp.Graphics.Save | ( | ) |
Save the current transform state (rotation, translation, scale).
Definition at line 524 of file Graphics.cs.
void VectSharp.Graphics.Scale | ( | double | scaleX, |
double | scaleY | ||
) |
Scale the coordinate system with respect to the origin.
scaleX | The horizontal scale. |
scaleY | The vertical scale. |
Definition at line 389 of file Graphics.cs.
void VectSharp.Graphics.SetClippingPath | ( | double | leftX, |
double | topY, | ||
double | width, | ||
double | height | ||
) |
Intersect the current clipping path with the specified rectangle.
leftX | The horizontal coordinate of the top-left corner of the rectangle. |
topY | The vertical coordinate of the top-left corner of the rectangle. |
width | The width of the rectangle. |
height | The height of the rectangle. |
Definition at line 313 of file Graphics.cs.
void VectSharp.Graphics.SetClippingPath | ( | GraphicsPath | path | ) |
Intersect the current clipping path with the specified GraphicsPath.
path | The GraphicsPath to intersect with the current clipping path. |
Definition at line 301 of file Graphics.cs.
Intersect the current clipping path with the specified rectangle.
topLeft | The top-left corner of the rectangle. |
size | The size of the rectangle. |
Definition at line 323 of file Graphics.cs.
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.
path | The GraphicsPath to stroke. |
strokeColour | The Brush with which to stroke the GraphicsPath. |
lineWidth | The width of the line with which the path is stroked. |
lineCap | The line cap to use to stroke the path. |
lineJoin | The line join to use to stroke the path. |
lineDash | The line dash to use to stroke the path. |
tag | A tag to identify the stroked path. |
Definition at line 292 of file Graphics.cs.
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.
leftX | The horizontal coordinate of the top-left corner of the rectangle. |
topY | The vertical coordinate of the top-left corner of the rectangle. |
width | The width of the rectangle. |
height | The height of the rectangle. |
strokeColour | The colour with which to stroke the rectangle. |
lineWidth | The width of the line with which the rectangle is stroked. |
lineCap | The line cap to use to stroke the rectangle. |
lineJoin | The line join to use to stroke the rectangle. |
lineDash | The line dash to use to stroke the rectangle. |
tag | A tag to identify the filled rectangle. |
Definition at line 449 of file Graphics.cs.
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.
topLeft | The top-left corner of the rectangle. |
size | The size of the rectangle. |
strokeColour | The colour with which to stroke the rectangle. |
lineWidth | The width of the line with which the rectangle is stroked. |
lineCap | The line cap to use to stroke the rectangle. |
lineJoin | The line join to use to stroke the rectangle. |
lineDash | The line dash to use to stroke the rectangle. |
tag | A tag to identify the filled rectangle. |
Definition at line 431 of file Graphics.cs.
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.
originX | The horizontal coordinate of the text origin. |
originY | The vertical coordinate of the text origin. See textBaseline . |
text | The FormattedText to draw. |
strokeColour | The default Brush with which to stroke the text. |
lineWidth | The width of the line with which the text is stroked. |
lineCap | The line cap to use to stroke the text. |
lineJoin | The line join to use to stroke the text. |
lineDash | The line dash to use to stroke the text. |
textBaseline | The text baseline (determines what originY represents). |
tag | A tag to identify the stroked text. |
Definition at line 599 of file Graphics.Text.cs.
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.
originX | The horizontal coordinate of the text origin. |
originY | The vertical coordinate of the text origin. See textBaseline . |
text | The string to draw. |
font | The font with which to draw the text. |
strokeColour | The Brush with which to stroke the text. |
lineWidth | The width of the line with which the text is stroked. |
lineCap | The line cap to use to stroke the text. |
lineJoin | The line join to use to stroke the text. |
lineDash | The line dash to use to stroke the text. |
textBaseline | The text baseline (determines what originY represents). |
tag | A tag to identify the stroked text. |
Definition at line 104 of file Graphics.Text.cs.
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.
origin | The text origin. See textBaseline . |
text | The FormattedText to draw. |
strokeColour | The default Brush with which to stroke the text. |
lineWidth | The width of the line with which the text is stroked. |
lineCap | The line cap to use to stroke the text. |
lineJoin | The line join to use to stroke the text. |
lineDash | The line dash to use to stroke the text. |
textBaseline | The text baseline (determines what the vertical component of origin represents). |
tag | A tag to identify the stroked text. |
Definition at line 502 of file Graphics.Text.cs.
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.
origin | The text origin. See textBaseline . |
text | The string to draw. |
font | The font with which to draw the text. |
strokeColour | The Brush with which to stroke the text. |
lineWidth | The width of the line with which the text is stroked. |
lineCap | The line cap to use to stroke the text. |
lineJoin | The line join to use to stroke the text. |
lineDash | The line dash to use to stroke the text. |
textBaseline | The text baseline (determines what the vertical component of origin represents). |
tag | A tag to identify the stroked text. |
Definition at line 80 of file Graphics.Text.cs.
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.
path | The GraphicsPath along which the text will flow. |
text | The string to draw. |
font | The font with which to draw the text. |
strokeColour | The Brush with which to stroke the text. |
lineWidth | The width of the line with which the text is stroked. |
lineCap | The line cap to use to stroke the text. |
lineJoin | The line join to use to stroke the text. |
lineDash | The line dash to use to stroke the text. |
reference | The (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). |
anchor | The anchor in the text string that will correspond to the point specified by the reference . |
textBaseline | The text baseline (determines which the position of the text in relation to the path . |
tag | A tag to identify the stroked text. |
Definition at line 262 of file Graphics.Text.cs.
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.
originX | The horizontal coordinate of the text origin. |
originY | The vertical coordinate of the text origin. See textBaseline . |
text | The FormattedText to draw. |
strokeColour | The default Brush with which to stroke the underline. |
lineWidth | The width of the line with which the underline is stroked. |
lineCap | The line cap to use to stroke the underline. |
lineJoin | The line join to use to stroke the underline. |
lineDash | The line dash to use to stroke the underline. |
textBaseline | The text baseline (determines what originY represents). |
tag | A tag to identify the stroked underline. |
Definition at line 817 of file Graphics.Text.cs.
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.
originX | The horizontal coordinate of the text origin. |
originY | The vertical coordinate of the text origin. See textBaseline . |
text | The string whose underline will be drawn. |
font | The font with which to draw the text. |
strokeColour | The Brush with which to stroke the underline. |
lineWidth | The width of the line with which the underline is stroked. |
lineCap | The line cap to use to stroke the underline. |
lineJoin | The line join to use to stroke the underline. |
lineDash | The line dash to use to stroke the underline. |
textBaseline | The text baseline (determines what originY represents). |
tag | A tag to identify the stroked underline. |
Definition at line 673 of file Graphics.Text.cs.
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.
origin | The text origin. See textBaseline . |
text | The FormattedText to draw. |
strokeColour | The default Brush with which to stroke the underline. |
lineWidth | The width of the line with which the underline is stroked. |
lineCap | The line cap to use to stroke the underline. |
lineJoin | The line join to use to stroke the underline. |
lineDash | The line dash to use to stroke the underline. |
textBaseline | The text baseline (determines what the vertical component of origin represents). |
tag | A tag to identify the stroked underline. |
Definition at line 834 of file Graphics.Text.cs.
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.
origin | The text origin. See textBaseline . |
text | The string whose underline will be drawn. |
font | The font with which to draw the text. |
strokeColour | The Brush with which to stroke the underline. |
lineWidth | The width of the line with which the underline is stroked. |
lineCap | The line cap to use to stroke the underline. |
lineJoin | The line join to use to stroke the underline. |
lineDash | The line dash to use to stroke the underline. |
textBaseline | The text baseline (determines what the vertical component of origin represents). |
tag | A tag to identify the stroked underline. |
Definition at line 691 of file Graphics.Text.cs.
void VectSharp.Graphics.Transform | ( | double | a, |
double | b, | ||
double | c, | ||
double | d, | ||
double | e, | ||
double | f | ||
) |
Transform the coordinate system with the specified transformation matrix [ [a, c, e], [b, d, f], [0, 0, 1] ].
a | The first element of the first column. |
b | The second element of the first column. |
c | The first element of the second column. |
d | The second element of the second column. |
e | The first element of the third column. |
f | The second element of the third column. |
Definition at line 359 of file Graphics.cs.
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.
transformationFunction | An arbitrary transformation function. |
linearisationResolution | The resolution that will be used to linearise curve segments. |
Definition at line 930 of file Graphics.cs.
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.
transformationFunction | An arbitrary transformation function. |
linearisationResolution | The resolution that will be used to linearise curve segments. |
maxSegmentLength | The maximum length of line segments. |
Definition at line 1128 of file Graphics.cs.
void VectSharp.Graphics.Translate | ( | double | x, |
double | y | ||
) |
Translate the coordinate system origin.
x | The horizontal translation. |
y | The vertical translation. |
Definition at line 370 of file Graphics.cs.
void VectSharp.Graphics.Translate | ( | Point | delta | ) |
Translate the coordinate system origin.
delta | The new origin point. |
Definition at line 379 of file Graphics.cs.
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.
region | The region of the Graphics to rasterise. |
scale | The scale at which the image is rasterised. |
interpolate | Determines whether the resulting RasterImage should be interpolated or not. |
output | When this method returns, this will contain the rasterised image (or null if the image could not be rasterised. |
true
if the image could be rasterised; false
if it could not be rasterised.Definition at line 1404 of file Graphics.cs.
|
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 1394 of file Graphics.cs.
|
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 266 of file Graphics.cs.