Class SvgGraph
Provides methods for drawing primitives to the SVG document.
Inheritance
Inherited Members
Namespace: Syncfusion.Windows.Forms.Chart.SvgBase
Assembly: Syncfusion.Chart.Base.dll
Syntax
public class SvgGraph
Constructors
SvgGraph()
Initializes a new instance of the SvgGraph class.
Declaration
public SvgGraph()
SvgGraph(Boolean)
Initializes a new instance of the SvgGraph class.
Declaration
public SvgGraph(bool generateDefault)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | generateDefault | if set to |
Properties
Document
Gets the SvgDocument.
Declaration
public SvgDocument Document { get; }
Property Value
Type | Description |
---|---|
SvgDocument | The document. |
Transform
Gets or sets the world transformation for this SvgGraph.
Declaration
public Matrix Transform { get; set; }
Property Value
Type |
---|
System.Drawing.Drawing2D.Matrix |
Methods
Clear(Color)
Clears the specified color.
Declaration
public void Clear(Color color)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Color | color | The color. |
DrawDocument(Graphics)
Draws the document to the specified System.Drawing.Graphics.
Declaration
public void DrawDocument(Graphics g)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | g | The System.Drawing.Graphics. |
DrawEllipse(Pen, Single, Single, Single, Single)
Draws the ellipse.
Declaration
public void DrawEllipse(Pen pen, float x, float y, float width, float height)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Pen | pen | The System.Drawing.Pen. |
System.Single | x | The x coordinare of ellipse. |
System.Single | y | The y coordinare of ellipse. |
System.Single | width | The width of ellipse. |
System.Single | height | The height of ellipse. |
DrawImage(Image, Single, Single, Single, Single)
Draws the image.
Declaration
public void DrawImage(Image img, float x, float y, float width, float height)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Image | img | The System.Drawing.Image. |
System.Single | x | The x coordinare of image. |
System.Single | y | The y coordinare of image. |
System.Single | width | The width of image. |
System.Single | height | The height of image. |
DrawLine(Pen, Single, Single, Single, Single)
Draws the line.
Declaration
public void DrawLine(Pen pen, float x1, float y1, float x2, float y2)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Pen | pen | The System.Drawing.Pen. |
System.Single | x1 | The x coordinate of start point. |
System.Single | y1 | The y coordinate of start point. |
System.Single | x2 | The x coordinate of end point. |
System.Single | y2 | The y coordinate of end point. |
DrawLines(Pen, PointF[])
Draws the lines.
Declaration
public void DrawLines(Pen pen, PointF[] points)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Pen | pen | The System.Drawing.Pen. |
System.Drawing.PointF[] | points | The array of System.Drawing.PointF. |
DrawPath(Pen, GraphicsPath)
Draws the path.
Declaration
public void DrawPath(Pen pen, GraphicsPath gp)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Pen | pen | The System.Drawing.Pen. |
System.Drawing.Drawing2D.GraphicsPath | gp | The System.Drawing.Drawing2D.GraphicsPath. |
DrawPolygon(Pen, PointF[])
Draws the polygon.
Declaration
public void DrawPolygon(Pen pen, PointF[] points)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Pen | pen | The System.Drawing.Pen. |
System.Drawing.PointF[] | points | The array of System.Drawing.PointF. |
DrawRectangle(Pen, Single, Single, Single, Single)
Draws the rectangle.
Declaration
public void DrawRectangle(Pen pen, float x, float y, float width, float height)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Pen | pen | The System.Drawing.Pen. |
System.Single | x | The x coordinare of rectangle. |
System.Single | y | The y coordinare of rectangle. |
System.Single | width | The width of rectangle. |
System.Single | height | The height of rectangle. |
DrawString(String, Font, Brush, Single, Single)
Draws the string.
Declaration
public void DrawString(string text, Font font, Brush br, float x, float y)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | The text. |
System.Drawing.Font | font | The System.Drawing.Font. |
System.Drawing.Brush | br | The System.Drawing.Brush. |
System.Single | x | The x coordinate of text. |
System.Single | y | The y coordinate of text. |
FillEllipse(Brush, Single, Single, Single, Single)
Fills the ellipse.
Declaration
public void FillEllipse(Brush br, float x, float y, float width, float height)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Brush | br | The System.Drawing.Brush. |
System.Single | x | The x coordinare of ellipse. |
System.Single | y | The y coordinare of ellipse. |
System.Single | width | The width of ellipse. |
System.Single | height | The height of ellipse. |
FillPath(Brush, GraphicsPath)
Fills the path.
Declaration
public void FillPath(Brush br, GraphicsPath gp)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Brush | br | The System.Drawing.Brush. |
System.Drawing.Drawing2D.GraphicsPath | gp | The System.Drawing.Drawing2D.GraphicsPath. |
FillPolygon(Brush, PointF[])
Fills the polygon.
Declaration
public void FillPolygon(Brush br, PointF[] points)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Brush | br | The System.Drawing.Brush. |
System.Drawing.PointF[] | points | The array of System.Drawing.PointF. |
FillRectangle(Brush, Single, Single, Single, Single)
Fills the rectangle.
Declaration
public void FillRectangle(Brush br, float x, float y, float width, float height)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Brush | br | The System.Drawing.Brush. |
System.Single | x | The x coordinare of rectangle. |
System.Single | y | The y coordinare of rectangle. |
System.Single | width | The width of rectangle. |
System.Single | height | The height of rectangle. |
LoadDocument(String)
Loads the document from the file.
Declaration
public void LoadDocument(string filename)
Parameters
Type | Name | Description |
---|---|---|
System.String | filename | The filename. |
ResetClip()
Resets the clip.
Declaration
public void ResetClip()
SaveDocument(Stream)
Saves the document to the stream.
Declaration
public void SaveDocument(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | The stream. |
SaveDocument(String)
Saves the document to the file.
Declaration
public void SaveDocument(string filename)
Parameters
Type | Name | Description |
---|---|---|
System.String | filename | The filename. |
SetClip(GraphicsPath)
Sets the clip.
Declaration
public void SetClip(GraphicsPath gp)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Drawing2D.GraphicsPath | gp | The gp. |
TranslateTransform(Single, Single)
Changes the origin of the coordinate system.
Declaration
public void TranslateTransform(float dx, float dy)
Parameters
Type | Name | Description |
---|---|---|
System.Single | dx | The horizontal offset. |
System.Single | dy | The vertival offset. |