Package org.evoludo.graphics
Class AbstractGraph.MyContext2d
Object
JavaScriptObject
Context2d
MyContext2d
- All Implemented Interfaces:
Context
- Enclosing class:
AbstractGraph<B>
Create custom Context2d that admits drawing dashed lines.
-
Nested Class Summary
Nested classes/interfaces inherited from class Context2d
Context2d.Composite, Context2d.LineCap, Context2d.LineJoin, Context2d.Repetition, Context2d.TextAlign, Context2d.TextBaseline
-
Field Summary
Fields inherited from class Context2d
CONTEXT_ID
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal void
setLineDash
(int[] segments) Set the line dash pattern for drawing lines.Methods inherited from class Context2d
arc, arc, arcTo, beginPath, bezierCurveTo, clearRect, clip, closePath, createImageData, createImageData, createLinearGradient, createPattern, createPattern, createPattern, createPattern, createRadialGradient, drawImage, drawImage, drawImage, drawImage, drawImage, drawImage, drawImage, drawImage, drawImage, fill, fillRect, fillText, fillText, getCanvas, getFillStyle, getFont, getGlobalAlpha, getGlobalCompositeOperation, getImageData, getLineCap, getLineJoin, getLineWidth, getMiterLimit, getShadowBlur, getShadowColor, getShadowOffsetX, getShadowOffsetY, getStrokeStyle, getTextAlign, getTextBaseline, isPointInPath, lineTo, measureText, moveTo, putImageData, quadraticCurveTo, rect, restore, rotate, save, scale, setFillStyle, setFillStyle, setFont, setGlobalAlpha, setGlobalCompositeOperation, setGlobalCompositeOperation, setLineCap, setLineCap, setLineJoin, setLineJoin, setLineWidth, setMiterLimit, setShadowBlur, setShadowColor, setShadowOffsetX, setShadowOffsetY, setStrokeStyle, setStrokeStyle, setTextAlign, setTextAlign, setTextBaseline, setTextBaseline, setTransform, stroke, strokeRect, strokeText, strokeText, transform, translate
Methods inherited from class JavaScriptObject
cast, createArray, createArray, createFunction, createObject, equals, hashCode, toSource, toString
-
Constructor Details
-
MyContext2d
protected MyContext2d()Create a new custom context.
-
-
Method Details
-
setLineDash
public final void setLineDash(int[] segments) Set the line dash pattern for drawing lines.- Parameters:
segments
- the line dash pattern
-