ScottPlot
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
ScottPlot.Plottables.Polygon Class Reference

A polygon is a collection of X/Y points that are all connected to form a closed shape. Polygons can be optionally filled with a color or a gradient. More...

Inheritance diagram for ScottPlot.Plottables.Polygon:
ScottPlot.IPlottable ScottPlot.IHasLine ScottPlot.IHasFill ScottPlot.IHasMarker ScottPlot.IHasLegendText

Public Member Functions

 Polygon (Coordinates[] coords)
 Creates a new polygon.
 
override string ToString ()
 
void UpdateCoordinates (Coordinates[] newCoordinates)
 
AxisLimits GetAxisLimits ()
 Return the 2D area (in coordinate space) occupied by the data contained in this plottable.
 
virtual void Render (RenderPack rp)
 Draw the data from this plottable into the data area defined in the Axes. By default the surface is already clipped to the data area, but this can be cleared inside the plottable.
 

Properties

static Polygon Empty [get]
 
bool IsEmpty = false [get]
 
Coordinates[] Coordinates = Array.Empty<Coordinates>() [get]
 
string Label [get, set]
 
string LegendText = string.Empty [get, set]
 If populated, this text appears in the legend.
 
bool IsVisible = true [get, set]
 Toggles whether this plottable is shown and contributes to the automatic axis limit detection. The calling method will check this variable (it does not need to be checked inside the Render method).
 
LineStyle LineStyle = new() { Width = 1 } [get, set]
 
float LineWidth [get, set]
 
LinePattern LinePattern [get, set]
 
Color LineColor [get, set]
 
FillStyle FillStyle = new() [get, set]
 
Color FillColor [get, set]
 
Color FillHatchColor [get, set]
 
IHatchFillHatch [get, set]
 
MarkerStyle MarkerStyle = new() [get, set]
 
MarkerShape MarkerShape [get, set]
 
float MarkerSize [get, set]
 
Color MarkerFillColor [get, set]
 
Color MarkerLineColor [get, set]
 
Color MarkerColor [get, set]
 
float MarkerLineWidth [get, set]
 
int PointCount [get]
 
IAxes Axes = new Axes() [get, set]
 This object performs coordinate/pixel translation at render time based on the latest data area. It stores the axes to use for this plottable and also the data area (in pixels) updated just before each render. If this object is null it will be constructed using the default X and Y axes at render time.
 
IEnumerable< LegendItemLegendItems [get]
 Items which will appear in the legend.
 
- Properties inherited from ScottPlot.IPlottable
- Properties inherited from ScottPlot.IHasLine
- Properties inherited from ScottPlot.IHasFill
- Properties inherited from ScottPlot.IHasMarker
- Properties inherited from ScottPlot.IHasLegendText

Detailed Description

A polygon is a collection of X/Y points that are all connected to form a closed shape. Polygons can be optionally filled with a color or a gradient.

Constructor & Destructor Documentation

◆ Polygon()

ScottPlot.Plottables.Polygon.Polygon ( Coordinates[]  coords)
inline

Creates a new polygon.

Parameters
coordsThe axis dependant vertex coordinates.

Member Function Documentation

◆ GetAxisLimits()

AxisLimits ScottPlot.Plottables.Polygon.GetAxisLimits ( )
inline

Return the 2D area (in coordinate space) occupied by the data contained in this plottable.

Implements ScottPlot.IPlottable.

◆ Render()

virtual void ScottPlot.Plottables.Polygon.Render ( RenderPack  rp)
inlinevirtual

Draw the data from this plottable into the data area defined in the Axes. By default the surface is already clipped to the data area, but this can be cleared inside the plottable.

Implements ScottPlot.IPlottable.

◆ ToString()

override string ScottPlot.Plottables.Polygon.ToString ( )
inline

◆ UpdateCoordinates()

void ScottPlot.Plottables.Polygon.UpdateCoordinates ( Coordinates[]  newCoordinates)
inline

Property Documentation

◆ Axes

IAxes ScottPlot.Plottables.Polygon.Axes = new Axes()
getset

This object performs coordinate/pixel translation at render time based on the latest data area. It stores the axes to use for this plottable and also the data area (in pixels) updated just before each render. If this object is null it will be constructed using the default X and Y axes at render time.

Implements ScottPlot.IPlottable.

◆ Coordinates

Coordinates [] ScottPlot.Plottables.Polygon.Coordinates = Array.Empty<Coordinates>()
get

◆ Empty

Polygon ScottPlot.Plottables.Polygon.Empty
staticget

◆ FillColor

Color ScottPlot.Plottables.Polygon.FillColor
getset

Implements ScottPlot.IHasFill.

◆ FillHatch

IHatch? ScottPlot.Plottables.Polygon.FillHatch
getset

Implements ScottPlot.IHasFill.

◆ FillHatchColor

Color ScottPlot.Plottables.Polygon.FillHatchColor
getset

Implements ScottPlot.IHasFill.

◆ FillStyle

FillStyle ScottPlot.Plottables.Polygon.FillStyle = new()
getset

Implements ScottPlot.IHasFill.

◆ IsEmpty

bool ScottPlot.Plottables.Polygon.IsEmpty = false
get

◆ IsVisible

bool ScottPlot.Plottables.Polygon.IsVisible = true
getset

Toggles whether this plottable is shown and contributes to the automatic axis limit detection. The calling method will check this variable (it does not need to be checked inside the Render method).

Implements ScottPlot.IPlottable.

◆ Label

string ScottPlot.Plottables.Polygon.Label
getset

◆ LegendItems

IEnumerable<LegendItem> ScottPlot.Plottables.Polygon.LegendItems
get

Items which will appear in the legend.

Implements ScottPlot.IPlottable.

◆ LegendText

string ScottPlot.Plottables.Polygon.LegendText = string.Empty
getset

If populated, this text appears in the legend.

Implements ScottPlot.IHasLegendText.

◆ LineColor

Color ScottPlot.Plottables.Polygon.LineColor
getset

Implements ScottPlot.IHasLine.

◆ LinePattern

LinePattern ScottPlot.Plottables.Polygon.LinePattern
getset

Implements ScottPlot.IHasLine.

◆ LineStyle

LineStyle ScottPlot.Plottables.Polygon.LineStyle = new() { Width = 1 }
getset

Implements ScottPlot.IHasLine.

◆ LineWidth

float ScottPlot.Plottables.Polygon.LineWidth
getset

Implements ScottPlot.IHasLine.

◆ MarkerColor

Color ScottPlot.Plottables.Polygon.MarkerColor
getset

Implements ScottPlot.IHasMarker.

◆ MarkerFillColor

Color ScottPlot.Plottables.Polygon.MarkerFillColor
getset

Implements ScottPlot.IHasMarker.

◆ MarkerLineColor

Color ScottPlot.Plottables.Polygon.MarkerLineColor
getset

Implements ScottPlot.IHasMarker.

◆ MarkerLineWidth

float ScottPlot.Plottables.Polygon.MarkerLineWidth
getset

Implements ScottPlot.IHasMarker.

◆ MarkerShape

MarkerShape ScottPlot.Plottables.Polygon.MarkerShape
getset

Implements ScottPlot.IHasMarker.

◆ MarkerSize

float ScottPlot.Plottables.Polygon.MarkerSize
getset

Implements ScottPlot.IHasMarker.

◆ MarkerStyle

MarkerStyle ScottPlot.Plottables.Polygon.MarkerStyle = new()
getset

Implements ScottPlot.IHasMarker.

◆ PointCount

int ScottPlot.Plottables.Polygon.PointCount
get

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