Top Inners Fields Constructors Methods
com.sun.javafx.sg.prism

public abstract Class NGShape

extends NGNode
Class Inheritance
Known Direct Subclasses
com.sun.javafx.sg.prism.NGSVGPath, com.sun.javafx.sg.prism.NGText, com.sun.javafx.sg.prism.NGArc, com.sun.javafx.sg.prism.NGCircle, com.sun.javafx.sg.prism.NGCubicCurve, com.sun.javafx.sg.prism.NGEllipse, com.sun.javafx.sg.prism.NGLine, com.sun.javafx.sg.prism.NGPath, com.sun.javafx.sg.prism.NGPolygon, com.sun.javafx.sg.prism.NGPolyline, com.sun.javafx.sg.prism.NGQuadCurve, com.sun.javafx.sg.prism.NGRectangle
Imports
javafx.scene.shape.StrokeLineCap, .StrokeLineJoin, .StrokeType, com.sun.javafx.geom.Shape, com.sun.javafx.geom.transform.BaseTransform, com.sun.prism.BasicStroke, .Graphics, .PrinterGraphics, .RTTexture, .Texture, com.sun.prism.impl.PrismSettings, com.sun.prism.paint.Paint, com.sun.prism.shape.ShapeRep

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum

Field Summary

Modifier and TypeField and Description
private RTTexture
cached3D

We cache a representation of this shape into an image if we are rendering the shape with a 3D transform.

private double
private double
protected Paint
protected BasicStroke
protected Paint
protected NGShape.Mode
protected ShapeRep
private boolean
pack-priv static final double
Inherited from com.sun.javafx.sg.prism.NGNode:
childDirtycontentBoundscullingBitsdirtyDIRTY_CHILDREN_ACCUMULATED_THRESHOLDDIRTY_REGION_CONTAINS_NODE_BOUNDSDIRTY_REGION_CONTAINS_OR_INTERSECTS_NODE_BOUNDSDIRTY_REGION_INTERSECTS_NODE_BOUNDSdirtyBoundsdirtyChildrenAccumulatedTEMP_TRANSFORMtransformedBounds

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected ShapeRep
protected void
public Paint
public NGShape.Mode
public abstract Shape
protected Shape
protected boolean
hasOpaqueRegion()

Overrides com.sun.javafx.sg.prism.NGNode.hasOpaqueRegion.

Called only on NGNode subclasses which override 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
private static double
hypot(double x, double y, double z)

public boolean
protected void
protected void
renderContent2D(Graphics
The graphics object to render with
g
,
boolean printing)

Renders the content as though it is 2D in all cases.

public void
setDrawPaint(Object drawPaint)

public void
public void
setDrawStroke(float strokeWidth, StrokeType strokeType, StrokeLineCap lineCap, StrokeLineJoin lineJoin, float strokeMiterLimit, float[] strokeDashArray, float strokeDashOffset)

public void
setFillPaint(Object fillPaint)

public void
public void
setSmooth(boolean smooth)

protected void
visualsChanged()

Overrides com.sun.javafx.sg.prism.NGNode.visualsChanged.

Invoked by subclasses whenever some change to the geometry or visuals has occurred.

Inherited from com.sun.javafx.sg.prism.NGNode:
accumulateDirtyRegionsaccumulateGroupDirtyRegionaccumulateNodeDirtyRegionapplyClipapplyEffectapplyTransformcheckBoundsInQuadclearDirtyclearPaintedcomputeNodeRenderRootcomputeOpaqueRegioncomputePaddingcomputeRenderRootdoPreCullingdoRenderdrawDirtyOptseffectChangedgetCacheFiltergetClipNodegetClippedBoundsgetCompleteBoundsgetContentBoundsgetEffectgetEffectBoundsgetEffectFiltergetFilterContextgetNamegetNodeBlendModegetOpacitygetOpaqueRegiongetParentgetRenderRootgetTransformhasVisualsinvalidateCacheinvalidateCacheByTranslationinvalidateOpaqueRegionisCleanisContentBounds2DisDepthTestisOpaqueRegionInvalidisReadbackSupportedisRectClipisShape3DisVisiblemarkCullRegionsmarkDirtymarkTreeDirtymarkTreeDirtyNoIncrementneedsBlendingprintDirtyOptsreleaserenderrenderCliprenderEffectrenderForcedContentrenderForClipsetCachedAsBitmapsetClipNodesetContentBoundssetDepthTestsetEffectsetNamesetNodeBlendModesetOpacitysetParentsetTransformedBoundssetTransformMatrixsetViewOrdersetVisiblesupportsOpaqueRegionstoString

Field Detail

cached3Dback to summary
private RTTexture cached3D

We cache a representation of this shape into an image if we are rendering the shape with a 3D transform. We attempt to keep this cached image from render to render, and invalidate it if this NGShape changes either in geometry or visuals.

cachedHback to summary
private double cachedH
cachedWback to summary
private double cachedW
drawPaintback to summary
protected Paint drawPaint
drawStrokeback to summary
protected BasicStroke drawStroke
fillPaintback to summary
protected Paint fillPaint
modeback to summary
protected NGShape.Mode mode
shapeRepback to summary
protected ShapeRep shapeRep
smoothback to summary
private boolean smooth
THRESHOLDback to summary
pack-priv static final double THRESHOLD

Constructor Detail

NGShapeback to summary
public NGShape()

Method Detail

createShapeRepback to summary
protected ShapeRep createShapeRep(Graphics g)
geometryChangedback to summary
protected void geometryChanged()

Overrides com.sun.javafx.sg.prism.NGNode.geometryChanged.

Annotations
@Override
getFillPaintback to summary
public Paint getFillPaint()
getModeback to summary
public NGShape.Mode getMode()
getShapeback to summary
public abstract Shape getShape()
getStrokeShapeback to summary
protected Shape getStrokeShape()
hasOpaqueRegionback to summary
protected boolean hasOpaqueRegion()

Overrides com.sun.javafx.sg.prism.NGNode.hasOpaqueRegion.

Doc from com.sun.javafx.sg.prism.NGNode.hasOpaqueRegion.

Called only on NGNode subclasses which override 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 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 invalidateOpaqueRegion().

Returns:boolean

Whether this NGNode currently has an opaque region.

Annotations
@Override
hasOverlappingContentsback to summary
protected boolean hasOverlappingContents()

Implements abstract com.sun.javafx.sg.prism.NGNode.hasOverlappingContents.

Annotations
@Override
hypotback to summary
private static double hypot(double x, double y, double z)
isSmoothback to summary
public boolean isSmooth()
renderContentback to summary
protected void renderContent(Graphics g)

Implements abstract com.sun.javafx.sg.prism.NGNode.renderContent.

Annotations
@Override
renderContent2Dback to summary
protected void renderContent2D(Graphics g, boolean printing)

Renders the content as though it is 2D in all cases. In the case that a 3D transform is in use at the time an NGShape is rendered, it will render as 2D into a texture and then transform in 3D that texture.

Parameters
g:Graphics

The graphics object to render with

setDrawPaintback to summary
public void setDrawPaint(Object drawPaint)
setDrawStrokeback to summary
public void setDrawStroke(BasicStroke drawStroke)
setDrawStrokeback to summary
public void setDrawStroke(float strokeWidth, StrokeType strokeType, StrokeLineCap lineCap, StrokeLineJoin lineJoin, float strokeMiterLimit, float[] strokeDashArray, float strokeDashOffset)
setFillPaintback to summary
public void setFillPaint(Object fillPaint)
setModeback to summary
public void setMode(NGShape.Mode mode)
setSmoothback to summary
public void setSmooth(boolean smooth)
visualsChangedback to summary
protected void visualsChanged()

Overrides com.sun.javafx.sg.prism.NGNode.visualsChanged.

Doc from com.sun.javafx.sg.prism.NGNode.visualsChanged.

Invoked by subclasses whenever some change to the geometry or visuals has occurred. This will mark the node as dirty and invalidate the cache.

Annotations
@Override
com.sun.javafx.sg.prism back to summary

public final Enum NGShape.Mode

extends Enum<NGShape.Mode>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final NGShape.Mode
public static final NGShape.Mode
public static final NGShape.Mode
public static final NGShape.Mode

Constructor Summary

AccessConstructor and Description
private
Mode()

Method Summary

Modifier and TypeMethod and Description
public static NGShape.Mode
public static NGShape.Mode[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

EMPTYback to summary
public static final NGShape.Mode EMPTY
FILLback to summary
public static final NGShape.Mode FILL
STROKEback to summary
public static final NGShape.Mode STROKE
STROKE_FILLback to summary
public static final NGShape.Mode STROKE_FILL

Constructor Detail

Modeback to summary
private Mode()

Method Detail

valueOfback to summary
public static NGShape.Mode valueOf(String name)
valuesback to summary
public static NGShape.Mode[] values()