Struct PolylineHandle
A live reference to one polyline in a specific PolylineLayer's store: the layer plus the id its AddPolyline(int, float, Color32, float) returned for it.
public readonly struct PolylineHandle
- Inherited Members
Remarks
Not a class named DashedLine: dashing is a property of a line
rather than a kind of line, and this one type serves solid and
dashed alike, the same way MarkerHandle
serves every marker regardless of what it looks like. Every member
here is a single PolylineStore call; the struct holds
no state of its own. A caller whose geometry is recomputed every
frame from live sensor state calls SetPositions(IReadOnlyList<LatLon>) or
SetPositions3D(IReadOnlyList<LatLon>, IReadOnlyList<double>) each frame instead of removing and
re-adding - the whole reason PolylineStore gained in-place update.
Properties
Color
Stroke color.
public Color32 Color { get; set; }
Property Value
- Color32
CornerRadiusRatio
Corner radius of every join and cap as a fraction of half the line width: 0 draws sharp mitered joins (clipped flat past a 120 degree turn) and butt caps, 1, the default, draws fully round joins and caps.
public float CornerRadiusRatio { get; set; }
Property Value
DashPeriodMercator
Dash plus gap length in normalized mercator, the same ground length at every zoom; 0 when the line is solid or screen-dashed. Writing a positive value replaces any screen-px period.
public float DashPeriodMercator { get; set; }
Property Value
DashPeriodPx
Dash plus gap length in screen px, constant on screen at every zoom; 0 when the line is solid or ground-dashed.
public float DashPeriodPx { get; set; }
Property Value
DashPitchInvariant
True when a screen-px dash pattern ignores pitch: each segment is scaled from its own on-screen length, so a dash is the same screen length near and far, with a small step at a vertex under pitch. False, the default, keeps the pattern continuous at every vertex and lets it foreshorten toward the horizon. No effect at pitch 0, on a ground-locked or solid line, on a flat line, or on a tabletop draw.
public bool DashPitchInvariant { get; set; }
Property Value
Flat
True when the line lies flat in the ground plane, foreshortening with the map under pitch like a flat bulk marker; false, the default, faces the screen at a constant pixel width. Identical at pitch 0. No effect on a tabletop draw.
public bool Flat { get; set; }
Property Value
Id
The id the layer's Add call returned for this line.
public int Id { get; }
Property Value
IsLive
False after removal; every other member is a no-op read or write then.
public bool IsLive { get; }
Property Value
Layer
The layer this line lives in.
public PolylineLayer Layer { get; }
Property Value
PointCount
Vertices currently drawn; 0 while hidden.
public int PointCount { get; }
Property Value
WidthPx
Stroke width in screen px; 0 hides the line.
public float WidthPx { get; set; }
Property Value
Methods
SetDashPeriodMeters(double, LatLon)
Sets a ground-locked dash period given in meters, converted at the latitude of at; 0 draws solid.
public void SetDashPeriodMeters(double dashPeriodMeters, LatLon at)
Parameters
dashPeriodMetersdoubleDash plus gap length in meters on the ground.
atLatLonPosition whose latitude fixes the meters-to-mercator scale; use a point on the line.
SetPositions(IReadOnlyList<LatLon>)
Rewrites the line's vertices, latitude first, degrees WGS84; fewer than two hides the line.
public void SetPositions(IReadOnlyList<LatLon> points)
Parameters
pointsIReadOnlyList<LatLon>
SetPositions3D(IReadOnlyList<LatLon>, IReadOnlyList<double>)
Rewrites vertices with one altitude in meters per vertex.
public void SetPositions3D(IReadOnlyList<LatLon> points, IReadOnlyList<double> altitudesMeters)
Parameters
pointsIReadOnlyList<LatLon>altitudesMetersIReadOnlyList<double>