Class SvgGraphics
Inheritance
System.Object
SvgGraphics
Assembly: FastReport.BaseExt.dll
Syntax
public class SvgGraphics : IGraphics
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
Type |
Name |
Description |
XmlDocument |
xmlDocument |
|
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
CompositingQuality
Declaration
public CompositingQuality CompositingQuality { get; set; }
Property Value
Type |
Description |
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 |
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 |
InterpolationMode |
|
IsClipEmpty
Declaration
public bool IsClipEmpty { get; }
Property Value
Type |
Description |
System.Boolean |
|
PageUnit
Declaration
public GraphicsUnit PageUnit { get; set; }
Property Value
Type |
Description |
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
SmoothingMode
Declaration
public SmoothingMode SmoothingMode { get; set; }
Property Value
Type |
Description |
SmoothingMode |
|
Declaration
public SVGImageFormat SvgImageFormat { get; set; }
Property Value
TextRenderingHint
Declaration
public TextRenderingHint TextRenderingHint { get; set; }
Property Value
Type |
Description |
TextRenderingHint |
|
Declaration
public Drawing.Drawing2D.Matrix Transform { get; set; }
Property Value
Type |
Description |
System.Drawing.Drawing2D.Matrix |
|
ViewBox
Declaration
public RectangleF ViewBox { get; set; }
Property Value
Type |
Description |
RectangleF |
|
ViewPort
Declaration
public RectangleF ViewPort { get; set; }
Property Value
Type |
Description |
RectangleF |
|
XmlDocument
Declaration
public XmlDocument XmlDocument { get; }
Property Value
Type |
Description |
XmlDocument |
|
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 |
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 |
Pen |
pen |
|
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 |
Pen |
pen |
|
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 |
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 |
Image |
image |
|
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 |
Image |
image |
|
Rectangle |
destRect |
|
System.Int32 |
srcX |
|
System.Int32 |
srcY |
|
System.Int32 |
srcWidth |
|
System.Int32 |
srcHeight |
|
GraphicsUnit |
srcUnit |
|
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 |
Image |
image |
|
Rectangle |
destRect |
|
System.Single |
srcX |
|
System.Single |
srcY |
|
System.Single |
srcWidth |
|
System.Single |
srcHeight |
|
GraphicsUnit |
srcUnit |
|
ImageAttributes |
imageAttrs |
|
DrawImage(Image, RectangleF)
Declaration
public void DrawImage(Image image, RectangleF rect)
Parameters
Type |
Name |
Description |
Image |
image |
|
RectangleF |
rect |
|
DrawImage(Image, RectangleF, RectangleF, GraphicsUnit)
Declaration
public void DrawImage(Image image, RectangleF destRect, RectangleF srcRect, GraphicsUnit srcUnit)
Parameters
Type |
Name |
Description |
Image |
image |
|
RectangleF |
destRect |
|
RectangleF |
srcRect |
|
GraphicsUnit |
srcUnit |
|
DrawImage(Image, Single, Single)
Declaration
public void DrawImage(Image image, float x, float y)
Parameters
Type |
Name |
Description |
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 |
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 |
Image |
image |
|
Rectangle |
rect |
|
DrawLine(Pen, PointF, PointF)
Declaration
public void DrawLine(Pen pen, PointF p1, PointF p2)
Parameters
Type |
Name |
Description |
Pen |
pen |
|
PointF |
p1 |
|
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 |
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 |
Pen |
pen |
|
PointF[] |
points |
|
DrawPath(Pen, GraphicsPath)
Declaration
public void DrawPath(Pen outlinePen, GraphicsPath path)
Parameters
Type |
Name |
Description |
Pen |
outlinePen |
|
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 |
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 |
Pen |
pen |
|
Point[] |
points |
|
DrawPolygon(Pen, PointF[])
Declaration
public void DrawPolygon(Pen pen, PointF[] points)
Parameters
Type |
Name |
Description |
Pen |
pen |
|
PointF[] |
points |
|
DrawRectangle(Pen, Rectangle)
Declaration
public void DrawRectangle(Pen pen, Rectangle rect)
Parameters
Type |
Name |
Description |
Pen |
pen |
|
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 |
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 |
|
Font |
font |
|
Brush |
brush |
|
PointF |
point |
|
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 |
|
Font |
font |
|
Brush |
brush |
|
RectangleF |
rect |
|
Declaration
public void DrawString(string text, Font font, Brush brush, RectangleF rect, StringFormat format)
Parameters
Type |
Name |
Description |
System.String |
text |
|
Font |
font |
|
Brush |
brush |
|
RectangleF |
rect |
|
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 |
|
Font |
font |
|
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 |
|
Font |
font |
|
Brush |
brush |
|
System.Single |
left |
|
System.Single |
top |
|
StringFormat |
format |
|
FillAndDrawEllipse(Pen, Brush, RectangleF)
Declaration
public void FillAndDrawEllipse(Pen pen, Brush brush, RectangleF rect)
Parameters
Type |
Name |
Description |
Pen |
pen |
|
Brush |
brush |
|
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 |
Pen |
pen |
|
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 |
Pen |
pen |
|
Brush |
brush |
|
GraphicsPath |
path |
|
FillAndDrawPolygon(Pen, Brush, Point[])
Declaration
public void FillAndDrawPolygon(Pen pen, Brush brush, Point[] points)
Parameters
Type |
Name |
Description |
Pen |
pen |
|
Brush |
brush |
|
Point[] |
points |
|
FillAndDrawPolygon(Pen, Brush, PointF[])
Declaration
public void FillAndDrawPolygon(Pen pen, Brush brush, PointF[] points)
Parameters
Type |
Name |
Description |
Pen |
pen |
|
Brush |
brush |
|
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 |
Pen |
pen |
|
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 |
Brush |
brush |
|
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 |
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 |
Brush |
brush |
|
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 |
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 |
Brush |
brush |
|
Point[] |
points |
|
FillPolygon(Brush, PointF[])
Declaration
public void FillPolygon(Brush brush, PointF[] points)
Parameters
Type |
Name |
Description |
Brush |
brush |
|
PointF[] |
points |
|
FillRectangle(Brush, RectangleF)
Declaration
public void FillRectangle(Brush brush, RectangleF rect)
Parameters
Type |
Name |
Description |
Brush |
brush |
|
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 |
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 |
Brush |
brush |
|
Region |
region |
|
IsVisible(RectangleF)
Declaration
public bool IsVisible(RectangleF rect)
Parameters
Type |
Name |
Description |
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 |
|
Font |
font |
|
RectangleF |
textRect |
|
StringFormat |
format |
|
Returns
Type |
Description |
Region[] |
|
MeasureString(String, Font)
Declaration
public SizeF MeasureString(string text, Font font)
Parameters
Type |
Name |
Description |
System.String |
text |
|
Font |
font |
|
Returns
MeasureString(String, Font, SizeF)
Declaration
public SizeF MeasureString(string text, Font font, SizeF size)
Parameters
Type |
Name |
Description |
System.String |
text |
|
Font |
font |
|
SizeF |
size |
|
Returns
Declaration
public SizeF MeasureString(string text, Font font, SizeF layoutArea, StringFormat format)
Parameters
Type |
Name |
Description |
System.String |
text |
|
Font |
font |
|
SizeF |
layoutArea |
|
StringFormat |
format |
|
Returns
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 |
|
Font |
font |
|
SizeF |
size |
|
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 |
|
Font |
font |
|
System.Int32 |
width |
|
StringFormat |
format |
|
Returns
Declaration
public void MultiplyTransform(Drawing.Drawing2D.Matrix matrix, MatrixOrder order)
Parameters
Type |
Name |
Description |
System.Drawing.Drawing2D.Matrix |
matrix |
|
MatrixOrder |
order |
|
ResetClip()
Declaration
Restore(IGraphicsState)
Declaration
public void Restore(IGraphicsState state)
Parameters
Type |
Name |
Description |
IGraphicsState |
state |
|
Declaration
public void RotateTransform(float angle)
Parameters
Type |
Name |
Description |
System.Single |
angle |
|
Save()
Declaration
public IGraphicsState Save()
Returns
Type |
Description |
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 |
GraphicsPath |
path |
|
CombineMode |
combineMode |
|
SetClip(RectangleF)
Declaration
public void SetClip(RectangleF rect)
Parameters
Type |
Name |
Description |
RectangleF |
rect |
|
SetClip(RectangleF, CombineMode)
Declaration
public void SetClip(RectangleF rect, CombineMode combineMode)
Parameters
Type |
Name |
Description |
RectangleF |
rect |
|
CombineMode |
combineMode |
|
Declaration
public void TranslateTransform(float left, float top)
Parameters
Type |
Name |
Description |
System.Single |
left |
|
System.Single |
top |
|