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.


MarkerLines(Polyline dpy)
Creates MarkerLines for the polyline dpy.


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


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 at peakIx, used to compute the y position of the marker line. lastLabpos - the peakLabel is only drawn if it's position is significantly away from lastLabpos (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 this peakLabel, used to be fed into the next call of this method as lastLabpos.
drawPolylineMarkers(List<double> markerIndices, List<String> markerLabels, List<Map<MarA, String>> markerAttrList) → void
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 of markerIndices. markerAttrList - marker attributes. If null, MARKER_DEFAULT_ATTRIBUTES are used. Otherwise, the length of this array must be the same as that of markerIndices.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
toString() → String
Returns a string representation of this object.


operator ==(Object other) → bool
The equality operator. [...]

Static Properties

Default attributes for legend