public abstract class PShape extends PNode
PNode.PSceneGraphDelegate| Modifier and Type | Field and Description |
|---|---|
static Paint |
DEFAULT_PAINT
Default paint for this shape node,
Color.WHITE. |
static Stroke |
DEFAULT_STROKE
Default stroke, a basic stroke of width
1.0f. |
static Paint |
DEFAULT_STROKE_PAINT
Default stroke paint,
Color.BLACK. |
FILL_STRATEGY_ASPECT_COVER, FILL_STRATEGY_ASPECT_FIT, FILL_STRATEGY_EXACT_FIT, PROPERTY_BOUNDS, PROPERTY_CHILDREN, PROPERTY_CHILDREN_PICKABLE, PROPERTY_CLIENT_PROPERTIES, PROPERTY_CODE_BOUNDS, PROPERTY_CODE_CHILDREN, PROPERTY_CODE_CHILDREN_PICKABLE, PROPERTY_CODE_CLIENT_PROPERTIES, PROPERTY_CODE_FULL_BOUNDS, PROPERTY_CODE_PAINT, PROPERTY_CODE_PARENT, PROPERTY_CODE_PICKABLE, PROPERTY_CODE_TRANSFORM, PROPERTY_CODE_TRANSPARENCY, PROPERTY_CODE_VISIBLE, PROPERTY_FULL_BOUNDS, PROPERTY_PAINT, PROPERTY_PARENT, PROPERTY_PICKABLE, PROPERTY_TRANSFORM, PROPERTY_TRANSPARENCY, PROPERTY_VISIBLE, SCENE_GRAPH_DELEGATENO_SUCH_PAGE, PAGE_EXISTS| Modifier | Constructor and Description |
|---|---|
protected |
PShape()
This is an abstract class that cannot be instantiated directly.
|
| Modifier and Type | Method and Description |
|---|---|
protected Rectangle2D |
getBoundsWithStroke()
Return the bounds of this node, taking the stroke into consideration if necessary.
|
protected abstract Shape |
getShape()
Return the shape for this shape node.
|
Stroke |
getStroke()
Return the stroke for this shape node.
|
Paint |
getStrokePaint()
Return the stroke paint for this shape node.
|
protected void |
internalUpdateBounds(double x,
double y,
double width,
double height)
Gives nodes a chance to update their internal structure before bounds
changed notifications are sent.
|
boolean |
intersects(Rectangle2D bounds)
Return true if this node intersects the given rectangle specified in
local bounds.
|
protected void |
paint(PPaintContext paintContext)
Paint this node behind any of its children nodes.
|
void |
setStroke(Stroke stroke)
Set the stroke for this shape node to
stroke. |
void |
setStrokePaint(Paint strokePaint)
Set the stroke paint for this shape node to
strokePaint. |
protected abstract void |
transform(AffineTransform transform)
Apply the specified transform to the shape for this shape node.
|
protected void |
updateBoundsFromShape()
Update the bounds of this shape node from its shape.
|
addActivity, addAttribute, addChild, addChild, addChildren, addInputEventListener, addPropertyChangeListener, addPropertyChangeListener, animateToBounds, animateToColor, animateToPositionScaleRotation, animateToRelativePosition, animateToTransform, animateToTransparency, animateTransformToBounds, centerBoundsOnPoint, centerFullBoundsOnPoint, clone, computeFullBounds, endResizeBounds, findIntersectingNodes, fireChildPropertyChange, firePropertyChange, fullIntersects, fullPaint, fullPick, getAllNodes, getAllNodes, getAttribute, getAttribute, getBooleanAttribute, getBounds, getBoundsChanged, getBoundsReference, getBoundsVolatile, getChild, getChildBoundsInvalid, getChildBoundsVolatile, getChildPaintInvalid, getChildrenCount, getChildrenIterator, getChildrenPickable, getChildrenReference, getClientProperties, getClientPropertyKeysEnumeration, getDoubleAttribute, getFullBounds, getFullBoundsInvalid, getFullBoundsReference, getGlobalBounds, getGlobalFullBounds, getGlobalRotation, getGlobalScale, getGlobalToLocalTransform, getGlobalTranslation, getHeight, getInputEventListeners, getIntegerAttribute, getInverseTransform, getListenerList, getLocalToGlobalTransform, getName, getOccluded, getOffset, getPaint, getPaintInvalid, getParent, getPickable, getPropertyChangeParentMask, getRoot, getRotation, getScale, getTransform, getTransformReference, getTransparency, getUnionOfChildrenBounds, getVisible, getWidth, getX, getXOffset, getY, getYOffset, globalToLocal, globalToLocal, globalToLocal, indexOfChild, invalidateFullBounds, invalidateLayout, invalidatePaint, isAncestorOf, isDescendentOf, isDescendentOfRoot, isOpaque, layoutChildren, lerp, localToGlobal, localToGlobal, localToGlobal, localToParent, localToParent, localToParent, lower, lower, lowerBelow, lowerToBottom, lowerToBottom, offset, paintAfterChildren, parentBoundsChanged, parentToLocal, parentToLocal, parentToLocal, pick, pickAfterChildren, print, print, raise, raise, raiseAbove, raiseToTop, raiseToTop, removeAllChildren, removeChild, removeChild, removeChildren, removeFromParent, removeInputEventListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaintFrom, reparent, replaceWith, resetBounds, rotate, rotateAboutPoint, rotateAboutPoint, rotateInPlace, scale, scaleAboutPoint, scaleAboutPoint, setBounds, setBounds, setBoundsChanged, setChildBoundsInvalid, setChildBoundsVolatile, setChildPaintInvalid, setChildrenPickable, setFullBoundsInvalid, setGlobalRotation, setGlobalScale, setGlobalTranslation, setHeight, setName, setOccluded, setOffset, setOffset, setPaint, setPaintInvalid, setParent, setPickable, setPropertyChangeParentMask, setRotation, setScale, setTransform, setTransparency, setVisible, setWidth, setX, setY, signalBoundsChanged, startResizeBounds, toImage, toImage, toImage, toImage, transformBy, translate, validateFullBounds, validateFullPaintpublic static final Paint DEFAULT_PAINT
Color.WHITE.public static final Stroke DEFAULT_STROKE
1.0f.public static final Paint DEFAULT_STROKE_PAINT
Color.BLACK.protected PShape()
protected abstract Shape getShape()
protected abstract void transform(AffineTransform transform)
transform - transform to apply to the shape for this shape nodepublic final Stroke getStroke()
DEFAULT_STROKE.public final void setStroke(Stroke stroke)
stroke. This is
a bound property.stroke - stroke for this shape nodepublic final Paint getStrokePaint()
DEFAULT_STROKE_PAINT.public final void setStrokePaint(Paint strokePaint)
strokePaint. This is
a bound property.strokePaint - stroke paint for this shape nodeprotected final void updateBoundsFromShape()
protected final Rectangle2D getBoundsWithStroke()
protected final void internalUpdateBounds(double x,
double y,
double width,
double height)
internalUpdateBounds in class PNodex - x position of boundsy - y position of boundswidth - width to apply to the boundsheight - height to apply to the boundspublic final boolean intersects(Rectangle2D bounds)
fullIntersects is used for quick rejects before calling this
method.intersects in class PNodebounds - the bounds to test for intersection againstprotected void paint(PPaintContext paintContext)
Copyright © 1995-2013 Piccolo2D. All Rights Reserved.