VectSharp 2.6.1
A light library for C# vector graphics
|
This interface should be implemented by classes intended to provide graphics output capability to a Graphics object. More...
Public Member Functions | |
void | Save () |
Save the current transform state (rotation, translation, scale). This should be implemented as a LIFO stack. | |
void | Restore () |
Restore the previous transform state (rotation, translation, scale). This should be implemented as a LIFO stack. | |
void | Translate (double x, double y) |
Translate the coordinate system origin. More... | |
void | Rotate (double angle) |
Rotate the coordinate system around the origin. More... | |
void | Scale (double scaleX, double scaleY) |
Scale the coordinate system with respect to the origin. 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 | FillText (string text, double x, double y) |
Fill a text string using the current Font and TextBaseline. More... | |
void | StrokeText (string text, double x, double y) |
Stroke the outline of a text string using the current Font and TextBaseline. More... | |
void | MoveTo (double x, double y) |
Change the current point without drawing a line from the previous point. If necessary, start a new figure. More... | |
void | LineTo (double x, double y) |
Draw a line from the previous point to the specified point. More... | |
void | Close () |
Close the current figure. | |
void | Stroke () |
Stroke the current path using the current StrokeStyle, LineWidth, LineCap, LineJoin and LineDash. | |
void | SetClippingPath () |
Set the current clipping path as the intersection of the previous clipping path and the current path. | |
void | SetFillStyle ((int r, int g, int b, double a) style) |
Set the current FillStyle. More... | |
void | SetFillStyle (Brush style) |
Set the current FillStyle. More... | |
void | SetStrokeStyle ((int r, int g, int b, double a) style) |
Set the current StrokeStyle. More... | |
void | SetStrokeStyle (Brush style) |
Set the current StrokeStyle. More... | |
void | CubicBezierTo (double p1X, double p1Y, double p2X, double p2Y, double p3X, double p3Y) |
Add to the current figure a cubic Bezier from the current point to a destination point, with two control points. More... | |
void | Rectangle (double x0, double y0, double width, double height) |
Add a rectangle figure to the current path. More... | |
void | Fill (FillRule fillRule) |
Fill the current path using the current FillStyle. More... | |
void | SetLineDash (LineDash dash) |
Set the current line dash pattern. More... | |
void | DrawRasterImage (int sourceX, int sourceY, int sourceWidth, int sourceHeight, double destinationX, double destinationY, double destinationWidth, double destinationHeight, RasterImage image) |
Draw a raster image. More... | |
void | DrawFilteredGraphics (Graphics graphics, IFilter filter) |
Draws a Graphics object, applying the specified filter . More... | |
Properties | |
double | Width [get] |
Width of the graphic surface. More... | |
double | Height [get] |
Height of the graphic surface. More... | |
Font | Font [get, set] |
The current font. More... | |
TextBaselines | TextBaseline [get, set] |
The current text baseline. More... | |
Brush | FillStyle [get] |
Current brush used to fill paths. More... | |
Brush | StrokeStyle [get] |
Current brush used to stroke paths. More... | |
double | LineWidth [get, set] |
Current line width used to stroke paths. More... | |
LineCaps | LineCap [set] |
Current line cap used to stroke paths. More... | |
LineJoins | LineJoin [set] |
Current line join used to stroke paths. More... | |
string | Tag [get, set] |
The current tag. How this can be used depends on each implementation. More... | |
This interface should be implemented by classes intended to provide graphics output capability to a Graphics object.
Definition at line 36 of file Graphics.cs.
void VectSharp.IGraphicsContext.CubicBezierTo | ( | double | p1X, |
double | p1Y, | ||
double | p2X, | ||
double | p2Y, | ||
double | p3X, | ||
double | p3Y | ||
) |
Add to the current figure a cubic Bezier from the current point to a destination point, with two control points.
p1X | The horizontal coordinate of the first control point. |
p1Y | The vertical coordinate of the first control point. |
p2X | The horizontal coordinate of the second control point. |
p2Y | The vertical coordinate of the second control point. |
p3X | The horizontal coordinate of the destination point. |
p3Y | The vertical coordinate of the destination point. |
void VectSharp.IGraphicsContext.DrawRasterImage | ( | int | sourceX, |
int | sourceY, | ||
int | sourceWidth, | ||
int | sourceHeight, | ||
double | destinationX, | ||
double | destinationY, | ||
double | destinationWidth, | ||
double | destinationHeight, | ||
RasterImage | image | ||
) |
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. |
void VectSharp.IGraphicsContext.Fill | ( | FillRule | fillRule | ) |
void VectSharp.IGraphicsContext.FillText | ( | string | text, |
double | x, | ||
double | y | ||
) |
Fill a text string using the current Font and TextBaseline.
text | The string to draw. |
x | The horizontal coordinate of the text origin. |
y | The vertical coordinate of the text origin. |
void VectSharp.IGraphicsContext.LineTo | ( | double | x, |
double | y | ||
) |
Draw a line from the previous point to the specified point.
x | The horizontal coordinate of the point. |
y | The vertical coordinate of the point. |
void VectSharp.IGraphicsContext.MoveTo | ( | double | x, |
double | y | ||
) |
Change the current point without drawing a line from the previous point. If necessary, start a new figure.
x | The horizontal coordinate of the point. |
y | The vertical coordinate of the point. |
void VectSharp.IGraphicsContext.Rectangle | ( | double | x0, |
double | y0, | ||
double | width, | ||
double | height | ||
) |
Add a rectangle figure to the current path.
x0 | The horizontal coordinate of the top-left corner of the rectangle. |
y0 | The vertical coordinate of the top-left corner of the rectangle. |
width | The width of corner of the rectangle. |
height | The height of corner of the rectangle. |
void VectSharp.IGraphicsContext.Rotate | ( | double | angle | ) |
Rotate the coordinate system around the origin.
angle | The angle (in radians) by which to rotate the coordinate system. |
void VectSharp.IGraphicsContext.Scale | ( | double | scaleX, |
double | scaleY | ||
) |
Scale the coordinate system with respect to the origin.
scaleX | The horizontal scale. |
scaleY | The vertical scale. |
void VectSharp.IGraphicsContext.SetFillStyle | ( | (int r, int g, int b, double a) | style | ) |
Set the current FillStyle.
style | A ValueTuple<Int32, Int32, Int32, Double> containing component information for the colour. For r, g, and b, range: [0, 255]; for a, range: [0, 1]. |
void VectSharp.IGraphicsContext.SetFillStyle | ( | Brush | style | ) |
Set the current FillStyle.
style | The new fill style. |
void VectSharp.IGraphicsContext.SetLineDash | ( | LineDash | dash | ) |
Set the current line dash pattern.
dash | The line dash pattern. |
void VectSharp.IGraphicsContext.SetStrokeStyle | ( | (int r, int g, int b, double a) | style | ) |
Set the current StrokeStyle.
style | A ValueTuple<Int32, Int32, Int32, Double> containing component information for the colour. For r, g, and b, range: [0, 255]; for a, range: [0, 1]. |
void VectSharp.IGraphicsContext.SetStrokeStyle | ( | Brush | style | ) |
Set the current StrokeStyle.
style | The new stroke style. |
void VectSharp.IGraphicsContext.StrokeText | ( | string | text, |
double | x, | ||
double | y | ||
) |
Stroke the outline of a text string using the current Font and TextBaseline.
text | The string to draw. |
x | The horizontal coordinate of the text origin. |
y | The vertical coordinate of the text origin. |
void VectSharp.IGraphicsContext.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. |
void VectSharp.IGraphicsContext.Translate | ( | double | x, |
double | y | ||
) |
Translate the coordinate system origin.
x | The horizontal translation. |
y | The vertical translation. |
|
get |
Current brush used to fill paths.
Definition at line 147 of file Graphics.cs.
|
getset |
The current font.
Definition at line 92 of file Graphics.cs.
|
get |
Height of the graphic surface.
Definition at line 46 of file Graphics.cs.
|
set |
Current line cap used to stroke paths.
Definition at line 212 of file Graphics.cs.
|
set |
Current line join used to stroke paths.
Definition at line 217 of file Graphics.cs.
|
getset |
Current line width used to stroke paths.
Definition at line 207 of file Graphics.cs.
|
get |
Current brush used to stroke paths.
Definition at line 164 of file Graphics.cs.
|
getset |
The current tag. How this can be used depends on each implementation.
Definition at line 228 of file Graphics.cs.
|
getset |
The current text baseline.
Definition at line 97 of file Graphics.cs.
|
get |
Width of the graphic surface.
Definition at line 41 of file Graphics.cs.