Class SvgGraphics
Inheritance
System.Object
SvgGraphics
Implements
FastReport.IGraphics
Assembly: FastReport.dll
Syntax
public class SvgGraphics : IGraphics, IDisposable
Constructors
SvgGraphics(XmlDocument)
Initialize a new Graphics for SVG, it's rendered to xml, layer by layer, not one image,
set the Size of this graphics in Size property
Declaration
public SvgGraphics(XmlDocument xmlDocument)
Parameters
Properties
Attributes
For setting namespace, clear all attributes on setting, therefore use this property before setting other svg options
Declaration
public IEnumerable<KeyValuePair<string, string>> Attributes { get; set; }
Property Value
| Type |
Description |
| System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.String>> |
|
Clip
Declaration
public Region Clip { get; set; }
Property Value
| Type |
Description |
| System.Drawing.Region |
|
CompositingQuality
Declaration
public CompositingQuality CompositingQuality { get; set; }
Property Value
| Type |
Description |
| System.Drawing.Drawing2D.CompositingQuality |
|
DpiX
Declaration
public float DpiX { get; }
Property Value
| Type |
Description |
| System.Single |
|
DpiY
Declaration
public float DpiY { get; }
Property Value
| Type |
Description |
| System.Single |
|
EmbeddedImages
Declaration
public bool EmbeddedImages { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
Graphics
Declaration
public Graphics Graphics { get; }
Property Value
| Type |
Description |
| System.Drawing.Graphics |
|
ImageFilePrefix
Declaration
public string ImageFilePrefix { get; set; }
Property Value
| Type |
Description |
| System.String |
|
InterpolationMode
Declaration
public InterpolationMode InterpolationMode { get; set; }
Property Value
| Type |
Description |
| System.Drawing.Drawing2D.InterpolationMode |
|
IsClipEmpty
Declaration
public bool IsClipEmpty { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
PageUnit
Declaration
public GraphicsUnit PageUnit { get; set; }
Property Value
| Type |
Description |
| System.Drawing.GraphicsUnit |
|
PrefixStyle
Sets or gets prefix for style and object ids
Declaration
public string PrefixStyle { get; set; }
Property Value
| Type |
Description |
| System.String |
|
Size
Declaration
public SizeF Size { get; set; }
Property Value
| Type |
Description |
| System.Drawing.SizeF |
|
SmoothingMode
Declaration
public SmoothingMode SmoothingMode { get; set; }
Property Value
| Type |
Description |
| System.Drawing.Drawing2D.SmoothingMode |
|
Declaration
public SVGImageFormat SvgImageFormat { get; set; }
Property Value
TextRenderingHint
Declaration
public TextRenderingHint TextRenderingHint { get; set; }
Property Value
| Type |
Description |
| System.Drawing.Text.TextRenderingHint |
|
Declaration
public Matrix Transform { get; set; }
Property Value
| Type |
Description |
| System.Drawing.Drawing2D.Matrix |
|
ViewBox
Declaration
public RectangleF ViewBox { get; set; }
Property Value
| Type |
Description |
| System.Drawing.RectangleF |
|
ViewPort
Declaration
public RectangleF ViewPort { get; set; }
Property Value
| Type |
Description |
| System.Drawing.RectangleF |
|
XmlDocument
Declaration
public XmlDocument XmlDocument { get; }
Property Value
Methods
Dispose()
Declaration
Dispose(Boolean)
Declaration
protected virtual void Dispose(bool disposing)
Parameters
| Type |
Name |
Description |
| System.Boolean |
disposing |
|
DrawArc(Pen, Single, Single, Single, Single, Single, Single)
Declaration
public void DrawArc(Pen pen, float x, float y, float width, float height, float startAngle, float sweepAngle)
Parameters
| Type |
Name |
Description |
| System.Drawing.Pen |
pen |
|
| System.Single |
x |
|
| System.Single |
y |
|
| System.Single |
width |
|
| System.Single |
height |
|
| System.Single |
startAngle |
|
| System.Single |
sweepAngle |
|
DrawCurve(Pen, PointF[], Int32, Int32, Single)
Declaration
public void DrawCurve(Pen pen, PointF[] points, int offset, int numberOfSegments, float tension)
Parameters
| Type |
Name |
Description |
| System.Drawing.Pen |
pen |
|
| System.Drawing.PointF[] |
points |
|
| System.Int32 |
offset |
|
| System.Int32 |
numberOfSegments |
|
| System.Single |
tension |
|
DrawEllipse(Pen, RectangleF)
Declaration
public void DrawEllipse(Pen pen, RectangleF rect)
Parameters
| Type |
Name |
Description |
| System.Drawing.Pen |
pen |
|
| System.Drawing.RectangleF |
rect |
|
DrawEllipse(Pen, Single, Single, Single, Single)
Declaration
public void DrawEllipse(Pen pen, float left, float top, float width, float height)
Parameters
| Type |
Name |
Description |
| System.Drawing.Pen |
pen |
|
| System.Single |
left |
|
| System.Single |
top |
|
| System.Single |
width |
|
| System.Single |
height |
|
DrawImage(Image, PointF[])
Declaration
public void DrawImage(Image image, PointF[] points)
Parameters
| Type |
Name |
Description |
| System.Drawing.Image |
image |
|
| System.Drawing.PointF[] |
points |
|
DrawImage(Image, Rectangle, Int32, Int32, Int32, Int32, GraphicsUnit, ImageAttributes)
Declaration
public void DrawImage(Image image, Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttr)
Parameters
| Type |
Name |
Description |
| System.Drawing.Image |
image |
|
| System.Drawing.Rectangle |
destRect |
|
| System.Int32 |
srcX |
|
| System.Int32 |
srcY |
|
| System.Int32 |
srcWidth |
|
| System.Int32 |
srcHeight |
|
| System.Drawing.GraphicsUnit |
srcUnit |
|
| System.Drawing.Imaging.ImageAttributes |
imageAttr |
|
DrawImage(Image, Rectangle, Single, Single, Single, Single, GraphicsUnit, ImageAttributes)
Declaration
public void DrawImage(Image image, Rectangle destRect, float srcX, float srcY, float srcWidth, float srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttrs)
Parameters
| Type |
Name |
Description |
| System.Drawing.Image |
image |
|
| System.Drawing.Rectangle |
destRect |
|
| System.Single |
srcX |
|
| System.Single |
srcY |
|
| System.Single |
srcWidth |
|
| System.Single |
srcHeight |
|
| System.Drawing.GraphicsUnit |
srcUnit |
|
| System.Drawing.Imaging.ImageAttributes |
imageAttrs |
|
DrawImage(Image, RectangleF)
Declaration
public void DrawImage(Image image, RectangleF rect)
Parameters
| Type |
Name |
Description |
| System.Drawing.Image |
image |
|
| System.Drawing.RectangleF |
rect |
|
DrawImage(Image, RectangleF, RectangleF, GraphicsUnit)
Declaration
public void DrawImage(Image image, RectangleF destRect, RectangleF srcRect, GraphicsUnit srcUnit)
Parameters
| Type |
Name |
Description |
| System.Drawing.Image |
image |
|
| System.Drawing.RectangleF |
destRect |
|
| System.Drawing.RectangleF |
srcRect |
|
| System.Drawing.GraphicsUnit |
srcUnit |
|
DrawImage(Image, Single, Single)
Declaration
public void DrawImage(Image image, float x, float y)
Parameters
| Type |
Name |
Description |
| System.Drawing.Image |
image |
|
| System.Single |
x |
|
| System.Single |
y |
|
DrawImage(Image, Single, Single, Single, Single)
Declaration
public void DrawImage(Image image, float x, float y, float width, float height)
Parameters
| Type |
Name |
Description |
| System.Drawing.Image |
image |
|
| System.Single |
x |
|
| System.Single |
y |
|
| System.Single |
width |
|
| System.Single |
height |
|
DrawImageUnscaled(Image, Rectangle)
Declaration
public void DrawImageUnscaled(Image image, Rectangle rect)
Parameters
| Type |
Name |
Description |
| System.Drawing.Image |
image |
|
| System.Drawing.Rectangle |
rect |
|
DrawLine(Pen, PointF, PointF)
Declaration
public void DrawLine(Pen pen, PointF p1, PointF p2)
Parameters
| Type |
Name |
Description |
| System.Drawing.Pen |
pen |
|
| System.Drawing.PointF |
p1 |
|
| System.Drawing.PointF |
p2 |
|
DrawLine(Pen, Single, Single, Single, Single)
Declaration
public void DrawLine(Pen pen, float x1, float y1, float x2, float y2)
Parameters
| Type |
Name |
Description |
| System.Drawing.Pen |
pen |
|
| System.Single |
x1 |
|
| System.Single |
y1 |
|
| System.Single |
x2 |
|
| System.Single |
y2 |
|
DrawLines(Pen, PointF[])
Declaration
public void DrawLines(Pen pen, PointF[] points)
Parameters
| Type |
Name |
Description |
| System.Drawing.Pen |
pen |
|
| System.Drawing.PointF[] |
points |
|
DrawPath(Pen, GraphicsPath)
Declaration
public void DrawPath(Pen outlinePen, GraphicsPath path)
Parameters
| Type |
Name |
Description |
| System.Drawing.Pen |
outlinePen |
|
| System.Drawing.Drawing2D.GraphicsPath |
path |
|
DrawPie(Pen, Single, Single, Single, Single, Single, Single)
Declaration
public void DrawPie(Pen pen, float x, float y, float width, float height, float startAngle, float sweepAngle)
Parameters
| Type |
Name |
Description |
| System.Drawing.Pen |
pen |
|
| System.Single |
x |
|
| System.Single |
y |
|
| System.Single |
width |
|
| System.Single |
height |
|
| System.Single |
startAngle |
|
| System.Single |
sweepAngle |
|
DrawPolygon(Pen, Point[])
Declaration
public void DrawPolygon(Pen pen, Point[] points)
Parameters
| Type |
Name |
Description |
| System.Drawing.Pen |
pen |
|
| System.Drawing.Point[] |
points |
|
DrawPolygon(Pen, PointF[])
Declaration
public void DrawPolygon(Pen pen, PointF[] points)
Parameters
| Type |
Name |
Description |
| System.Drawing.Pen |
pen |
|
| System.Drawing.PointF[] |
points |
|
DrawRectangle(Pen, Rectangle)
Declaration
public void DrawRectangle(Pen pen, Rectangle rect)
Parameters
| Type |
Name |
Description |
| System.Drawing.Pen |
pen |
|
| System.Drawing.Rectangle |
rect |
|
DrawRectangle(Pen, Single, Single, Single, Single)
Declaration
public void DrawRectangle(Pen pen, float left, float top, float width, float height)
Parameters
| Type |
Name |
Description |
| System.Drawing.Pen |
pen |
|
| System.Single |
left |
|
| System.Single |
top |
|
| System.Single |
width |
|
| System.Single |
height |
|
Declaration
public void DrawString(string text, Font font, Brush brush, PointF point, StringFormat format)
Parameters
| Type |
Name |
Description |
| System.String |
text |
|
| System.Drawing.Font |
font |
|
| System.Drawing.Brush |
brush |
|
| System.Drawing.PointF |
point |
|
| System.Drawing.StringFormat |
format |
|
DrawString(String, Font, Brush, RectangleF)
Declaration
public void DrawString(string text, Font font, Brush brush, RectangleF rect)
Parameters
| Type |
Name |
Description |
| System.String |
text |
|
| System.Drawing.Font |
font |
|
| System.Drawing.Brush |
brush |
|
| System.Drawing.RectangleF |
rect |
|
Declaration
public void DrawString(string text, Font font, Brush brush, RectangleF rect, StringFormat format)
Parameters
| Type |
Name |
Description |
| System.String |
text |
|
| System.Drawing.Font |
font |
|
| System.Drawing.Brush |
brush |
|
| System.Drawing.RectangleF |
rect |
|
| System.Drawing.StringFormat |
format |
|
DrawString(String, Font, Brush, Single, Single)
Declaration
public void DrawString(string text, Font font, Brush brush, float left, float top)
Parameters
| Type |
Name |
Description |
| System.String |
text |
|
| System.Drawing.Font |
font |
|
| System.Drawing.Brush |
brush |
|
| System.Single |
left |
|
| System.Single |
top |
|
Declaration
public void DrawString(string text, Font font, Brush brush, float left, float top, StringFormat format)
Parameters
| Type |
Name |
Description |
| System.String |
text |
|
| System.Drawing.Font |
font |
|
| System.Drawing.Brush |
brush |
|
| System.Single |
left |
|
| System.Single |
top |
|
| System.Drawing.StringFormat |
format |
|
FillAndDrawEllipse(Pen, Brush, RectangleF)
Declaration
public void FillAndDrawEllipse(Pen pen, Brush brush, RectangleF rect)
Parameters
| Type |
Name |
Description |
| System.Drawing.Pen |
pen |
|
| System.Drawing.Brush |
brush |
|
| System.Drawing.RectangleF |
rect |
|
FillAndDrawEllipse(Pen, Brush, Single, Single, Single, Single)
Declaration
public void FillAndDrawEllipse(Pen pen, Brush brush, float left, float top, float width, float height)
Parameters
| Type |
Name |
Description |
| System.Drawing.Pen |
pen |
|
| System.Drawing.Brush |
brush |
|
| System.Single |
left |
|
| System.Single |
top |
|
| System.Single |
width |
|
| System.Single |
height |
|
FillAndDrawPath(Pen, Brush, GraphicsPath)
Declaration
public void FillAndDrawPath(Pen pen, Brush brush, GraphicsPath path)
Parameters
| Type |
Name |
Description |
| System.Drawing.Pen |
pen |
|
| System.Drawing.Brush |
brush |
|
| System.Drawing.Drawing2D.GraphicsPath |
path |
|
FillAndDrawPolygon(Pen, Brush, Point[])
Declaration
public void FillAndDrawPolygon(Pen pen, Brush brush, Point[] points)
Parameters
| Type |
Name |
Description |
| System.Drawing.Pen |
pen |
|
| System.Drawing.Brush |
brush |
|
| System.Drawing.Point[] |
points |
|
FillAndDrawPolygon(Pen, Brush, PointF[])
Declaration
public void FillAndDrawPolygon(Pen pen, Brush brush, PointF[] points)
Parameters
| Type |
Name |
Description |
| System.Drawing.Pen |
pen |
|
| System.Drawing.Brush |
brush |
|
| System.Drawing.PointF[] |
points |
|
FillAndDrawRectangle(Pen, Brush, Single, Single, Single, Single)
Declaration
public void FillAndDrawRectangle(Pen pen, Brush brush, float left, float top, float width, float height)
Parameters
| Type |
Name |
Description |
| System.Drawing.Pen |
pen |
|
| System.Drawing.Brush |
brush |
|
| System.Single |
left |
|
| System.Single |
top |
|
| System.Single |
width |
|
| System.Single |
height |
|
FillEllipse(Brush, RectangleF)
Declaration
public void FillEllipse(Brush brush, RectangleF rect)
Parameters
| Type |
Name |
Description |
| System.Drawing.Brush |
brush |
|
| System.Drawing.RectangleF |
rect |
|
FillEllipse(Brush, Single, Single, Single, Single)
Declaration
public void FillEllipse(Brush brush, float left, float top, float width, float height)
Parameters
| Type |
Name |
Description |
| System.Drawing.Brush |
brush |
|
| System.Single |
left |
|
| System.Single |
top |
|
| System.Single |
width |
|
| System.Single |
height |
|
FillPath(Brush, GraphicsPath)
Declaration
public void FillPath(Brush brush, GraphicsPath path)
Parameters
| Type |
Name |
Description |
| System.Drawing.Brush |
brush |
|
| System.Drawing.Drawing2D.GraphicsPath |
path |
|
FillPie(Brush, Single, Single, Single, Single, Single, Single)
Declaration
public void FillPie(Brush brush, float x, float y, float width, float height, float startAngle, float sweepAngle)
Parameters
| Type |
Name |
Description |
| System.Drawing.Brush |
brush |
|
| System.Single |
x |
|
| System.Single |
y |
|
| System.Single |
width |
|
| System.Single |
height |
|
| System.Single |
startAngle |
|
| System.Single |
sweepAngle |
|
FillPolygon(Brush, Point[])
Declaration
public void FillPolygon(Brush brush, Point[] points)
Parameters
| Type |
Name |
Description |
| System.Drawing.Brush |
brush |
|
| System.Drawing.Point[] |
points |
|
FillPolygon(Brush, PointF[])
Declaration
public void FillPolygon(Brush brush, PointF[] points)
Parameters
| Type |
Name |
Description |
| System.Drawing.Brush |
brush |
|
| System.Drawing.PointF[] |
points |
|
FillRectangle(Brush, RectangleF)
Declaration
public void FillRectangle(Brush brush, RectangleF rect)
Parameters
| Type |
Name |
Description |
| System.Drawing.Brush |
brush |
|
| System.Drawing.RectangleF |
rect |
|
FillRectangle(Brush, Single, Single, Single, Single)
Declaration
public void FillRectangle(Brush brush, float left, float top, float width, float height)
Parameters
| Type |
Name |
Description |
| System.Drawing.Brush |
brush |
|
| System.Single |
left |
|
| System.Single |
top |
|
| System.Single |
width |
|
| System.Single |
height |
|
FillRegion(Brush, Region)
Declaration
public void FillRegion(Brush brush, Region region)
Parameters
| Type |
Name |
Description |
| System.Drawing.Brush |
brush |
|
| System.Drawing.Region |
region |
|
IsVisible(RectangleF)
Declaration
public bool IsVisible(RectangleF rect)
Parameters
| Type |
Name |
Description |
| System.Drawing.RectangleF |
rect |
|
Returns
| Type |
Description |
| System.Boolean |
|
Declaration
public Region[] MeasureCharacterRanges(string text, Font font, RectangleF textRect, StringFormat format)
Parameters
| Type |
Name |
Description |
| System.String |
text |
|
| System.Drawing.Font |
font |
|
| System.Drawing.RectangleF |
textRect |
|
| System.Drawing.StringFormat |
format |
|
Returns
| Type |
Description |
| System.Drawing.Region[] |
|
MeasureString(String, Font)
Declaration
public SizeF MeasureString(string text, Font font)
Parameters
| Type |
Name |
Description |
| System.String |
text |
|
| System.Drawing.Font |
font |
|
Returns
| Type |
Description |
| System.Drawing.SizeF |
|
MeasureString(String, Font, SizeF)
Declaration
public SizeF MeasureString(string text, Font font, SizeF size)
Parameters
| Type |
Name |
Description |
| System.String |
text |
|
| System.Drawing.Font |
font |
|
| System.Drawing.SizeF |
size |
|
Returns
| Type |
Description |
| System.Drawing.SizeF |
|
Declaration
public SizeF MeasureString(string text, Font font, SizeF layoutArea, StringFormat format)
Parameters
| Type |
Name |
Description |
| System.String |
text |
|
| System.Drawing.Font |
font |
|
| System.Drawing.SizeF |
layoutArea |
|
| System.Drawing.StringFormat |
format |
|
Returns
| Type |
Description |
| System.Drawing.SizeF |
|
Declaration
public void MeasureString(string text, Font font, SizeF size, StringFormat format, out int charsFit, out int linesFit)
Parameters
| Type |
Name |
Description |
| System.String |
text |
|
| System.Drawing.Font |
font |
|
| System.Drawing.SizeF |
size |
|
| System.Drawing.StringFormat |
format |
|
| System.Int32 |
charsFit |
|
| System.Int32 |
linesFit |
|
Declaration
public SizeF MeasureString(string text, Font font, int width, StringFormat format)
Parameters
| Type |
Name |
Description |
| System.String |
text |
|
| System.Drawing.Font |
font |
|
| System.Int32 |
width |
|
| System.Drawing.StringFormat |
format |
|
Returns
| Type |
Description |
| System.Drawing.SizeF |
|
Declaration
public void MultiplyTransform(Matrix matrix, MatrixOrder order)
Parameters
| Type |
Name |
Description |
| System.Drawing.Drawing2D.Matrix |
matrix |
|
| System.Drawing.Drawing2D.MatrixOrder |
order |
|
ResetClip()
Declaration
Restore(IGraphicsState)
Declaration
public void Restore(IGraphicsState state)
Parameters
| Type |
Name |
Description |
| FastReport.IGraphicsState |
state |
|
Declaration
public void RotateTransform(float angle)
Parameters
| Type |
Name |
Description |
| System.Single |
angle |
|
Save()
Declaration
public IGraphicsState Save()
Returns
| Type |
Description |
| FastReport.IGraphicsState |
|
Declaration
public void ScaleTransform(float scaleX, float scaleY)
Parameters
| Type |
Name |
Description |
| System.Single |
scaleX |
|
| System.Single |
scaleY |
|
SetClip(GraphicsPath, CombineMode)
Declaration
public void SetClip(GraphicsPath path, CombineMode combineMode)
Parameters
| Type |
Name |
Description |
| System.Drawing.Drawing2D.GraphicsPath |
path |
|
| System.Drawing.Drawing2D.CombineMode |
combineMode |
|
SetClip(RectangleF)
Declaration
public void SetClip(RectangleF rect)
Parameters
| Type |
Name |
Description |
| System.Drawing.RectangleF |
rect |
|
SetClip(RectangleF, CombineMode)
Declaration
public void SetClip(RectangleF rect, CombineMode combineMode)
Parameters
| Type |
Name |
Description |
| System.Drawing.RectangleF |
rect |
|
| System.Drawing.Drawing2D.CombineMode |
combineMode |
|
Declaration
public void TranslateTransform(float left, float top)
Parameters
| Type |
Name |
Description |
| System.Single |
left |
|
| System.Single |
top |
|
Implements
FastReport.IGraphics