MarkerLines class
This class provides methods to draw vertical lines above a Polyline, optionally along with a text. This can be used to mark desired points of a Polyline and provide information about this point, e.g. its index, its physical x value, its y value or more.
Constructors
- MarkerLines(Polyline dpy)
-
Creates MarkerLines for the polyline
dpy
.
Properties
- dpy ↔ Polyline
-
read / write
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
drawMarker(
SvgSvgElement markerTicks, SvgSvgElement markerLabels, double peakIx, String peakLabel, double yphys, int lastLabpos, Map< MarA, String> markerAttr) → int -
Draws a vertical marker line together with a marker text.
markerTicks
- drawing will be performed into this container.peakIx
- the marker x position will be at this index of the polyline's array.peakLabel
- the text drawn above the marker line.yphys
- the polyines array's intensity atpeakIx
, used to compute the y position of the marker line.lastLabpos
- thepeakLabel
is only drawn if it's position is significantly away fromlastLabpos
(by fontsize). Important when several markers are drawn close to each other.markerAttr
- any attributes defined in MarA. Attributes from MARKER_DEFAULT_ATTRIBUTES will be used if null or only a subset of the MarA attributes are specified. Returns the x position of thispeakLabel
, used to be fed into the next call of this method aslastLabpos
. -
drawPolylineMarkers(
List< double> markerIndices, List<String> markerLabels, List<Map< markerAttrList) → voidMarA, String> > -
Draws vertical lines above the polyline dpy.
markerIndices
- the x positions of the lines (indices in the dpy's array.markerLabels
- text labels drawn together with lines. If not null, the length of this array must be the same as that ofmarkerIndices
.markerAttrList
- marker attributes. If null, MARKER_DEFAULT_ATTRIBUTES are used. Otherwise, the length of this array must be the same as that ofmarkerIndices
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toString(
) → String -
Returns a string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator. [...]
inherited
Static Properties
-
MARKER_DEFAULT_ATTRIBUTES
→ Map<
MarA, String> -
Default attributes for legend
final