Class LineObject
Represents a line object.
Implements
Inherited Members
Namespace: FastReport
Assembly: FastReport.dll
Syntax
public class LineObject : ReportComponentBase, IDisposable, IFRSerializable
Remarks
Use the Border.Width, Border.Style and Border.Color properties to set the line width, style and color. Set the Diagonal property to true if you want to show a diagonal line.
Constructors
LineObject()
Initializes a new instance of the LineObject class with default settings.
Declaration
public LineObject()
Properties
DashPattern
Gets or sets collection of values for custom dash pattern.
Declaration
public FloatCollection DashPattern { get; set; }
Property Value
Type | Description |
---|---|
FloatCollection |
Remarks
Each element should be a non-zero positive number. If the number is negative or zero, that number is replaced by one.
Diagonal
Gets or sets a value indicating that the line is diagonal.
Declaration
public bool Diagonal { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
If this property is false, the line can be only horizontal or vertical.
EndCap
Gets or sets the end cap settings.
Declaration
public CapSettings EndCap { get; set; }
Property Value
Type | Description |
---|---|
CapSettings |
StartCap
Gets or sets the start cap settings.
Declaration
public CapSettings StartCap { get; set; }
Property Value
Type | Description |
---|---|
CapSettings |
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
Draw(FRPaintEventArgs)
Draws the object.
Declaration
public override void Draw(FRPaintEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
FRPaintEventArgs | e | Paint event args. |
Overrides
Remarks
This method is widely used in the FastReport. It is called each time when the object needs to draw or print itself.
In order to draw the object correctly, you should multiply the object's bounds by the scale parameter.
cache parameter is used to optimize the drawing speed. It holds all items such as pens, fonts, brushes, string formats that was used before. If the item with requested parameters exists in the cache, it will be returned (instead of create new item and then dispose it).
GetConvertedObjects()
Converts it to an SVG object if it has cap.
Declaration
public override IEnumerable<Base> GetConvertedObjects()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Base> | SVGObject |
Overrides
IsHaveToConvert(Object)
Used to get information of the need to convertation if the function returns true, then the GetConvertedObjects function is called
Declaration
public override bool IsHaveToConvert(object sender)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The export or the object, that call this method |
Returns
Type | Description |
---|---|
System.Boolean | By default returns false |
Overrides
Remarks
The functions IsHaveToConvert and GetConvertedObjects allow you to convert objects from one to another, for example the export will convert object before adding it to the file and convert recursive, i.e. If the new object has the ability to convert, it will be converted again but limit is 10 times. At the time of export it is called, only on objects inside the band, the child objects of converted object will be returned, and the child objects of old object will be ignored.
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 methods;
- saving the object to the designer's clipboard;
- saving the object to the preview (when run a report).
Validate()
Validate this object.
Declaration
public override List<ValidationError> Validate()
Returns
Type | Description |
---|---|
System.Collections.Generic.List<ValidationError> | List of errors |