SimpleContourRenderer class

The purpose of this class is to provide a simple renderer capable of drawing the contours of a function z=f(x,y). However, this renderer is more general and not only suited for drawing contours, but any kind of lines into a 2D htlm canvas element.

Constructors

SimpleContourRenderer(CanvasElement contourCanvas, int dataAreaWidth, int dataAreaHeight, int dataAreaX, int dataAreaY, Map<CtourA, String> contourAttr)
Creates a renderer which will draw into contourCanvas. The data area size and position covered by the drawing is given by dataAreaWidth, dataAreaHeight, dataAreaX, dataAreaY. contourAttr

Properties

attr ↔ Map<CtourA, String>
read / write
c2d ↔ CanvasRenderingContext2D
read / write
CONTOUR_DEFAULT_ATTRIBUTES → Map<CtourA, String>
Contour attribute defaults
final
contourCanvas ↔ CanvasElement
read / write
dataAreaHeight ↔ int
read / write
dataAreaWidth ↔ int
read / write
dataAreaX ↔ int
read / write
dataAreaY ↔ int
read / write
hashCode → int
The hash code for this object. [...]
read-only, inherited
last_x1 ↔ int
read / write
last_x2 ↔ int
read / write
last_y1 ↔ int
read / write
last_y2 ↔ int
read / write
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

drawContourLine(double startX, double startY, double endX, double endY, double contourLevel, int levelNumber) → void
Implements the ContourRenderer: draws the specified contour line belonging to contourLevel into the graphics 2D context. contourLevel is needed to color the line: Here we give a different color to positive and negative levels.
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
xToScreen(double x) → int
yToScreen(double y) → int

Operators

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