public abstract class NGShape extends NGNode
Modifier and Type | Class and Description |
---|---|
static class |
NGShape.Mode |
NGNode.DirtyFlag, NGNode.RenderRootResult
Modifier and Type | Field and Description |
---|---|
protected Paint |
drawPaint |
protected BasicStroke |
drawStroke |
protected Paint |
fillPaint |
protected NGShape.Mode |
mode |
protected ShapeRep |
shapeRep |
childDirty, contentBounds, cullingBits, dirty, DIRTY_CHILDREN_ACCUMULATED_THRESHOLD, dirtyChildrenAccumulated, TEMP_TRANSFORM, transformedBounds
Constructor and Description |
---|
NGShape() |
Modifier and Type | Method and Description |
---|---|
protected ShapeRep |
createShapeRep(Graphics g) |
protected void |
geometryChanged() |
Paint |
getFillPaint() |
NGShape.Mode |
getMode() |
abstract Shape |
getShape() |
protected Shape |
getStrokeShape() |
protected boolean |
hasOpaqueRegion()
Called only on NGNode subclasses which override
NGNode.supportsOpaqueRegions() to return
true, this method will return whether or not this NGNode is in a state where it has
an opaque region to actually return. |
protected boolean |
hasOverlappingContents() |
boolean |
isSmooth() |
protected void |
renderContent(Graphics g) |
protected void |
renderContent2D(Graphics g,
boolean printing)
Renders the content as though it is 2D in all cases.
|
void |
setDrawPaint(Object drawPaint) |
void |
setDrawStroke(BasicStroke drawStroke) |
void |
setDrawStroke(float strokeWidth,
StrokeType strokeType,
StrokeLineCap lineCap,
StrokeLineJoin lineJoin,
float strokeMiterLimit,
float[] strokeDashArray,
float strokeDashOffset) |
void |
setFillPaint(Object fillPaint) |
void |
setMode(NGShape.Mode mode) |
void |
setSmooth(boolean smooth) |
protected void |
visualsChanged()
Invoked by subclasses whenever some change to the geometry or visuals
has occurred.
|
accumulateDirtyRegions, applyClip, applyEffect, applyTransform, clearDirty, clearDirtyTree, clearPainted, computeOpaqueRegion, computePadding, doPreCulling, doRender, drawDirtyOpts, effectChanged, getCacheFilter, getClipNode, getClippedBounds, getCompleteBounds, getContentBounds, getEffect, getEffectBounds, getEffectFilter, getName, getNodeBlendMode, getOpacity, getOpaqueRegion, getParent, getRenderRoot, getTransform, hasVisuals, invalidateCache, invalidateCacheByTranslation, invalidateOpaqueRegion, isClean, isContentBounds2D, isDepthTest, isRectClip, isVisible, markDirty, markTreeDirty, markTreeDirtyNoIncrement, needsBlending, printDirtyOpts, release, render, renderEffect, renderForcedContent, setCachedAsBitmap, setClipNode, setContentBounds, setDepthTest, setEffect, setName, setNodeBlendMode, setOpacity, setParent, setTransformedBounds, setTransformMatrix, setVisible, supportsOpaqueRegions, toString
protected Paint fillPaint
protected Paint drawPaint
protected BasicStroke drawStroke
protected NGShape.Mode mode
protected ShapeRep shapeRep
public void setMode(NGShape.Mode mode)
public NGShape.Mode getMode()
public void setSmooth(boolean smooth)
public boolean isSmooth()
public void setFillPaint(Object fillPaint)
public Paint getFillPaint()
public void setDrawPaint(Object drawPaint)
public void setDrawStroke(BasicStroke drawStroke)
public void setDrawStroke(float strokeWidth, StrokeType strokeType, StrokeLineCap lineCap, StrokeLineJoin lineJoin, float strokeMiterLimit, float[] strokeDashArray, float strokeDashOffset)
public abstract Shape getShape()
protected void visualsChanged()
NGNode
visualsChanged
in class NGNode
protected void renderContent(Graphics g)
renderContent
in class NGNode
protected void renderContent2D(Graphics g, boolean printing)
g
- The graphics object to render withprotected boolean hasOverlappingContents()
hasOverlappingContents
in class NGNode
protected Shape getStrokeShape()
protected void geometryChanged()
geometryChanged
in class NGNode
protected boolean hasOpaqueRegion()
NGNode
NGNode.supportsOpaqueRegions()
to return
true, this method will return whether or not this NGNode is in a state where it has
an opaque region to actually return. If this method returns true, a subsequent call to
NGNode.computeOpaqueRegion(com.sun.javafx.geom.RectBounds)
must return
a non-null result. Any state used in the computation of this method, when it changes, must
result in a call to NGNode.invalidateOpaqueRegion()
.hasOpaqueRegion
in class NGNode
Copyright © 2020. All rights reserved.