Class PolyLineObject
Represents a poly line object.
Implements
Inherited Members
Namespace: FastReport
Assembly: FastReport.OpenSource.dll
Syntax
public class PolyLineObject : ReportComponentBase, IFRSerializable
Remarks
Use the Border.Width, Border.Style and Border.Color properties to set the line width, style and color.
Constructors
PolyLineObject()
Initializes a new instance of the LineObject class with default settings.
Declaration
public PolyLineObject()
Fields
polygonSelectionMode
do not set this value, internal use only
Declaration
protected PolyLineObject.PolygonSelectionMode polygonSelectionMode
Field Value
Type | Description |
---|---|
PolyLineObject.PolygonSelectionMode |
Properties
CenterX
Returns origin of coordinates relative to the top left corner
Declaration
public float CenterX { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
CenterY
Returns origin of coordinates relative to the top left corner
Declaration
public float CenterY { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Points
Return points collection. You can modify the collection for change this object.
Declaration
public PolyLineObject.PolyPointCollection Points { get; }
Property Value
Type | Description |
---|---|
PolyLineObject.PolyPointCollection |
PointsArray
Return points array of line deprecated
Declaration
[Obsolete]
public PointF[] PointsArray { get; }
Property Value
Type | Description |
---|---|
PointF[] |
PointTypesArray
Return point types array. 0 - Start of line, 1 - Keep on line deprecated
Declaration
[Obsolete]
public byte[] PointTypesArray { get; }
Property Value
Type | Description |
---|---|
System.Byte[] |
Methods
addPoint(Single, Single, Byte)
Add point to end of polyline, need to recalculate bounds after add First point must have zero coordinate and zero type. Recalculate bounds. Method is slow do not use this.
Declaration
protected PolyLineObject.PolyPoint addPoint(float localX, float localY, byte pointType)
Parameters
Type | Name | Description |
---|---|---|
System.Single | localX | local x - relative to left-top point |
System.Single | localY | local y - relative to left-top point |
System.Byte | pointType | depreceted |
Returns
Type | Description |
---|---|
PolyLineObject.PolyPoint |
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(Base) method.
See Also
deletePoint(Int32)
Delete point from polyline by index. Recalculate bounds. Method is slow do not use this.
Declaration
protected void deletePoint(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | Index of point in polyline |
Deserialize(FRReader)
Declaration
public override void Deserialize(FRReader reader)
Parameters
Type | Name | Description |
---|---|---|
FRReader | reader |
Overrides
Draw(FRPaintEventArgs)
Declaration
public override void Draw(FRPaintEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
FRPaintEventArgs | e |
Overrides
drawPoly(FRPaintEventArgs)
Draw polyline path to graphics
Declaration
protected virtual void drawPoly(FRPaintEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
FRPaintEventArgs | e | Event arguments |
GetPath(Pen, Single, Single, Single, Single, Single, Single)
Calculate GraphicsPath for draw to page
Declaration
public GraphicsPath GetPath(Pen pen, float left, float top, float right, float bottom, float scaleX, float scaleY)
Parameters
Type | Name | Description |
---|---|---|
Pen | pen | Pen for lines |
System.Single | left | Left boundary |
System.Single | top | Top boundary |
System.Single | right | Right boundary |
System.Single | bottom | Bottom boundary |
System.Single | scaleX | scale by width |
System.Single | scaleY | scale by height |
Returns
Type | Description |
---|---|
GraphicsPath | Always returns a non-empty path |
insertPoint(Int32, Single, Single, Byte)
Insert point to desired place of polyline recalculateBounds(); Method is slow do not use this
Declaration
protected PolyLineObject.PolyPoint insertPoint(int index, float localX, float localY, byte pointType)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | Index of place from zero to count |
System.Single | localX | local x - relative to left-top point |
System.Single | localY | local y - relative to left-top point |
System.Byte | pointType | deprecated |
Returns
Type | Description |
---|---|
PolyLineObject.PolyPoint |
RecalculateBounds()
Recalculate position and size of element
Declaration
public void RecalculateBounds()
Serialize(FRWriter)
Serializes the object.
Declaration
public override void Serialize(FRWriter writer)
Parameters
Type | Name | Description |
---|---|---|
FRWriter | writer | Writer object. |
Overrides
Remarks
Do not call this method directly. You should override it if you are developing a new component for FastReport.
This method is called when the object needs to save the state. It may happen when:
- saving the report to the file or stream;
- saving the report to the designer's undo buffer;
- assigning the object to another object using the Assign(Base) or AssignAll(Base) methods;
- saving the object to the designer's clipboard;
- saving the object to the preview (when run a report).
SetPolyLine(PointF[])
Declaration
public void SetPolyLine(PointF[] newPoints)
Parameters
Type | Name | Description |
---|---|---|
PointF[] | newPoints |