VectSharp 2.6.1
A light library for C# vector graphics
All Classes Namespaces Functions Variables Enumerations Properties Events Pages
VectSharp.Plots.TextLabel< T > Class Template Reference

A plot element that draws a single text label. More...

Inheritance diagram for VectSharp.Plots.TextLabel< T >:

Public Member Functions

 TextLabel (string label, T position, ICoordinateSystem< T > coordinateSystem)
 Create a new TextLabel<T> instance. More...
 
void Plot (Graphics target)
 Draw the plot element on the specified target &#160;Graphics.
Parameters
targetThe Graphics on which to draw.
More...
 
void Plot (Graphics target)
 Draw the plot element on the specified target &#160;Graphics. More...
 

Properties

Position [get, set]
 The position of the label, in data space coordinates. More...
 
string Label [get, set]
 The text of the label. This can include formatting specifiers (see the documentation for the FormattedText.Format(string, Font, Font, Font, Font, Brush) method). More...
 
double Rotation = 0 [get, set]
 The angle at which the text is drawn, with respect to the horizontal. More...
 
TextBaselines Baseline = TextBaselines.Middle [get, set]
 The baseline for the text. More...
 
TextAnchors Alignment = TextAnchors.Center [get, set]
 The alignment for the text. More...
 
ICoordinateSystem< T > CoordinateSystem [get, set]
 The coordinate system used to transform the points from data space to plot space. More...
 
PlotElementPresentationAttributes PresentationAttributes = new PlotElementPresentationAttributes() { Stroke = null } [get, set]
 Presentation attributes determining the appearance (stroke and fill colour, etc.) of the text label. More...
 
string Tag [get, set]
 A tag to identify the label in the plot. More...
 
- Properties inherited from VectSharp.Plots.IPlotElement
ICoordinateSystem CoordinateSystem [get]
 The coordinate system used to transform the points from data space to plot space. More...
 

Detailed Description

A plot element that draws a single text label.

Template Parameters
TThe kind of data describing the data points (generally, IReadOnlyList<double>).

Definition at line 226 of file DataPoints.cs.

Constructor & Destructor Documentation

◆ TextLabel()

VectSharp.Plots.TextLabel< T >.TextLabel ( string  label,
position,
ICoordinateSystem< T >  coordinateSystem 
)

Create a new TextLabel<T> instance.

Parameters
labelThe text of the label. This can include formatting specifiers (see the documentation for the FormattedText.Format(string, Font, Font, Font, Font, Brush) method).
positionThe position of the label, in data space coordinates.
coordinateSystemThe coordinate system used to transform the points from data space to plot space.

Definition at line 275 of file DataPoints.cs.

Member Function Documentation

◆ Plot()

void VectSharp.Plots.TextLabel< T >.Plot ( Graphics  target)

Draw the plot element on the specified target &#160;Graphics.

Parameters
targetThe Graphics on which to draw.

Implements VectSharp.Plots.IPlotElement.

Definition at line 283 of file DataPoints.cs.

Property Documentation

◆ Alignment

TextAnchors VectSharp.Plots.TextLabel< T >.Alignment = TextAnchors.Center
getset

The alignment for the text.

Definition at line 251 of file DataPoints.cs.

◆ Baseline

TextBaselines VectSharp.Plots.TextLabel< T >.Baseline = TextBaselines.Middle
getset

The baseline for the text.

Definition at line 246 of file DataPoints.cs.

◆ CoordinateSystem

The coordinate system used to transform the points from data space to plot space.

Implements VectSharp.Plots.IPlotElement.

Definition at line 256 of file DataPoints.cs.

◆ Label

string VectSharp.Plots.TextLabel< T >.Label
getset

The text of the label. This can include formatting specifiers (see the documentation for the FormattedText.Format(string, Font, Font, Font, Font, Brush) method).

Definition at line 236 of file DataPoints.cs.

◆ Position

T VectSharp.Plots.TextLabel< T >.Position
getset

The position of the label, in data space coordinates.

Definition at line 231 of file DataPoints.cs.

◆ PresentationAttributes

PlotElementPresentationAttributes VectSharp.Plots.TextLabel< T >.PresentationAttributes = new PlotElementPresentationAttributes() { Stroke = null }
getset

Presentation attributes determining the appearance (stroke and fill colour, etc.) of the text label.

Definition at line 262 of file DataPoints.cs.

◆ Rotation

double VectSharp.Plots.TextLabel< T >.Rotation = 0
getset

The angle at which the text is drawn, with respect to the horizontal.

Definition at line 241 of file DataPoints.cs.

◆ Tag

string VectSharp.Plots.TextLabel< T >.Tag
getset

A tag to identify the label in the plot.

Definition at line 267 of file DataPoints.cs.


The documentation for this class was generated from the following file: