Class SVGObject
SVG object
Inheritance
Inherited Members
Namespace: FastReport.SVG
Assembly: FastReport.dll
Syntax
public class SVGObject : PictureObjectBase, IComponent, IDisposable, IFRSerializable, IHasEditor, ICloneable
Constructors
SVGObject()
Initializes a new instance of the SVGObject class with default settings.
Declaration
public SVGObject()
Properties
AspectRatio
Gets or sets AspectRatio value
Declaration
[Browsable(false)]
public SvgAspectRatio AspectRatio { get; set; }
Property Value
Type | Description |
---|---|
Svg.SvgAspectRatio |
Grayscale
Gets or sets a value indicating that the image should be displayed in grayscale mode.
Declaration
public override bool Grayscale { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
ImageHeight
Declaration
protected override float ImageHeight { get; }
Property Value
Type | Description |
---|---|
System.Single |
Overrides
ImageWidth
Declaration
protected override float ImageWidth { get; }
Property Value
Type | Description |
---|---|
System.Single |
Overrides
SizeMode
Gets or sets a value that specifies how an image is positioned within a PictureObject.
Declaration
public override PictureBoxSizeMode SizeMode { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Forms.PictureBoxSizeMode |
Overrides
SvgDocument
Gets or sets svg document
Declaration
[Browsable(false)]
public SvgDocument SvgDocument { get; }
Property Value
Type | Description |
---|---|
Svg.SvgDocument |
SVGGrayscale
Gets or sets grayscale svg document
Declaration
[Browsable(false)]
public SvgDocument SVGGrayscale { get; set; }
Property Value
Type | Description |
---|---|
Svg.SvgDocument |
SVGString
Returns SVG string
Declaration
public string SVGString { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ViewBox
Gets or sets ViewBox value
Declaration
[Browsable(false)]
public SvgViewBox ViewBox { get; set; }
Property Value
Type | Description |
---|---|
Svg.SvgViewBox |
Methods
Assign(Base)
Copies the contents of another, similar object.
Declaration
public override void Assign(Base source)
Parameters
Type | Name | Description |
---|---|---|
Base | source | Source object to copy the contents from. |
Overrides
Remarks
Call Assign to copy the properties from another object of the same type. The standard form of a call to Assign is
destination.Assign(source);
which tells the destination object to copy the contents of the source object to itself. In this method, all child objects are ignored. If you want to copy child objects, use the AssignAll method.
See Also
Clone()
Returns clone of this object
Declaration
public object Clone()
Returns
Type | Description |
---|---|
System.Object |
Deserialize(FRReader)
Declaration
public override void Deserialize(FRReader reader)
Parameters
Type | Name | Description |
---|---|---|
FRReader | reader |
Overrides
Dispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
Overrides
DrawImage(FRPaintEventArgs)
Declaration
public override void DrawImage(FRPaintEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
FRPaintEventArgs | e |
Overrides
DrawImageInternal2(IGraphics, PointF, PointF, PointF)
Declaration
protected override void DrawImageInternal2(IGraphics graphics, PointF upperLeft, PointF upperRight, PointF lowerLeft)
Parameters
Type | Name | Description |
---|---|---|
FastReport.IGraphics | graphics | |
System.Drawing.PointF | upperLeft | |
System.Drawing.PointF | upperRight | |
System.Drawing.PointF | lowerLeft |
Overrides
GetContextMenu()
Gets the object's context menu.
Declaration
public override ContextMenuBase GetContextMenu()
Returns
Type | Description |
---|---|
ContextMenuBase | Null reference if object does not have a menu. |
Overrides
Remarks
Do not call this method directly. You may override it if you are developing a new component for FastReport.
You may use base menu classes such as ComponentBaseMenu, ReportComponentBaseMenu to create own context menus.
GetData()
Gets the data from a datasource that the object is connected to.
Declaration
public override void GetData()
Overrides
Remarks
This method is called by the report engine before processing the object.
Do not call it directly. You may override it if you are developing a new FastReport component. In this method you should get the data from a datasource that the object is connected to.
GetDataAsync(CancellationToken)
Declaration
public override async Task GetDataAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Overrides
GetImage()
Declaration
public Image GetImage()
Returns
Type | Description |
---|---|
System.Drawing.Image |
HandleDragDrop(FRMouseEventArgs)
Handles the DragDrop event in the designer.
Declaration
public override void HandleDragDrop(FRMouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
FRMouseEventArgs | e | Current mouse state. |
Overrides
Remarks
This method is called when the user drops an item from the Data Tree window into this object. This method should copy the information from the e.DraggedObject object and set the e.Handled flag to true to complete the drag operation.
HandleDragOver(FRMouseEventArgs)
Handles the DragOver event in the designer.
Declaration
public override void HandleDragOver(FRMouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
FRMouseEventArgs | e | Current mouse state. |
Overrides
Remarks
This method is called when the user drags an item from the Data Tree window. This method should check that the mouse (e.X, e.Y) is inside the object, then set the e.Handled flag to true if an item can be dragged into this object.
InvokeEditor()
Invokes the object's editor.
Declaration
public override bool InvokeEditor()
Returns
Type | Description |
---|---|
System.Boolean | true if object was edited succesfully. |
Overrides
LoadImage()
Loads image
Declaration
public override void LoadImage()
Overrides
LoadImageAsync(CancellationToken)
Declaration
public override async Task LoadImageAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Overrides
ResetImageIndex()
Declaration
protected override void ResetImageIndex()
Overrides
Serialize(FRWriter)
Declaration
public override void Serialize(FRWriter writer)
Parameters
Type | Name | Description |
---|---|---|
FRWriter | writer |
Overrides
SetSVG(SvgDocument)
Sets svg object by SvgDocument
Declaration
public void SetSVG(SvgDocument svg)
Parameters
Type | Name | Description |
---|---|---|
Svg.SvgDocument | svg | SVG document |
SetSVGByContent(String)
Sets svg object from svg string
Declaration
public void SetSVGByContent(string content)
Parameters
Type | Name | Description |
---|---|---|
System.String | content | SVG string |
SetSVGByPath(String)
Sets svg object from specified path
Declaration
public void SetSVGByPath(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | path to SVG file |