public class NGRegion extends NGGroup
NGNode.DirtyFlag, NGNode.RenderRootResult
childDirty, contentBounds, cullingBits, dirty, DIRTY_CHILDREN_ACCUMULATED_THRESHOLD, dirtyChildrenAccumulated, TEMP_TRANSFORM, transformedBounds
Constructor and Description |
---|
NGRegion() |
Modifier and Type | Method and Description |
---|---|
void |
clearDirtyTree()
When cleaning the dirty tree, we also have to keep in mind
the NGShape used by the NGRegion
|
protected RectBounds |
computeOpaqueRegion(RectBounds opaqueRegion)
The opaque region of an NGRegion takes into account the opaque insets
specified by the Region during synchronization.
|
protected NGNode.RenderRootResult |
computeRenderRoot(NodePath path,
RectBounds dirtyRegion,
int cullingIndex,
BaseTransform tx,
GeneralTransform3D pvTx)
*
Culling Related Methods *
*
|
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() |
protected boolean |
hasVisuals()
Marks if the node has some visuals and that the bounds change
should be taken into account when using the dirty region.
|
void |
imagesUpdated()
Called by Region whenever an image that was being loaded in the background has
finished loading.
|
protected void |
renderContent(Graphics g)
*
Region drawing.
|
void |
setOpaqueInsets(float top,
float right,
float bottom,
float left)
Called by the Region whenever it knows that the opaque insets have changed.
|
void |
setSize(float width,
float height)
Called by the Region whenever the width or height of the region has changed.
|
protected boolean |
supportsOpaqueRegions()
Gets whether this NGNode supports opaque regions at all.
|
void |
updateBackground(Background b)
Called by the Region when the Background has changed.
|
void |
updateBorder(Border b)
Called by the Region when the Border is changed.
|
void |
updateFillCorners(List<CornerRadii> normalizedFillCorners)
Called by the Region when any parameters are changed.
|
void |
updateShape(Object shape,
boolean scaleShape,
boolean positionShape,
boolean cacheShape)
Called by the Region during synchronization.
|
void |
updateStrokeCorners(List<CornerRadii> normalizedStrokeCorners)
Called by the Region when any parameters are changed.
|
add, addToRemoved, clear, clearDirty, clearFrom, drawDirtyOpts, getChildren, getRemovedChildren, isEmpty, markCullRegions, needsBlending, remove, remove, renderForcedContent, setBlendMode
accumulateDirtyRegions, applyClip, applyEffect, applyTransform, clearPainted, computePadding, doPreCulling, doRender, effectChanged, geometryChanged, getCacheFilter, getClipNode, getClippedBounds, getCompleteBounds, getContentBounds, getEffect, getEffectBounds, getEffectFilter, getName, getNodeBlendMode, getOpacity, getOpaqueRegion, getParent, getRenderRoot, getTransform, invalidateCache, invalidateCacheByTranslation, invalidateOpaqueRegion, isClean, isContentBounds2D, isDepthTest, isRectClip, isVisible, markDirty, markTreeDirty, markTreeDirtyNoIncrement, printDirtyOpts, release, render, renderEffect, setCachedAsBitmap, setClipNode, setContentBounds, setDepthTest, setEffect, setName, setNodeBlendMode, setOpacity, setParent, setTransformedBounds, setTransformMatrix, setVisible, toString, visualsChanged
public void updateShape(Object shape, boolean scaleShape, boolean positionShape, boolean cacheShape)
shape
- The shape, may be null.scaleShape
- whether to scale the shapepositionShape
- whether to center the shapepublic void setSize(float width, float height)
width
- The width of the region, not including insets or outsetsheight
- The height of the region, not including insets or outsetspublic void imagesUpdated()
public void updateBorder(Border b)
b
- Border, of type javafx.scene.layout.Borderpublic void updateStrokeCorners(List<CornerRadii> normalizedStrokeCorners)
normalizedStrokeCorners
- a precomputed copy of the radii in the
BorderStroke objects that are not percentages and do not overflowpublic void updateBackground(Background b)
b
- Background, of type javafx.scene.layout.Background. Can be null.public void updateFillCorners(List<CornerRadii> normalizedFillCorners)
normalizedStrokeCorners
- a precomputed copy of the radii in the
BackgroundFill objects that are not percentages and do not overflowpublic void setOpaqueInsets(float top, float right, float bottom, float left)
top
- The top, if NaN then there is no opaque inset at allright
- The right, must not be NaN or Infinity, etc.bottom
- The bottom, must not be NaN or Infinity, etc.left
- The left, must not be NaN or Infinity, etc.public void clearDirtyTree()
clearDirtyTree
in class NGNode
protected boolean supportsOpaqueRegions()
NGNode
supportsOpaqueRegions
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
protected RectBounds computeOpaqueRegion(RectBounds opaqueRegion)
computeOpaqueRegion
in class NGNode
opaqueRegion
- protected NGNode.RenderRootResult computeRenderRoot(NodePath path, RectBounds dirtyRegion, int cullingIndex, BaseTransform tx, GeneralTransform3D pvTx)
NGGroup
computeRenderRoot
in class NGGroup
path
- the NodePath to populate with the path to the render root. Cannot be null.dirtyRegion
- the current dirty region. Cannot be null.cullingIndex
- index of culling informationtx
- current transform. Cannot be null.pvTx
- current perspective transform. Cannot be null.protected boolean hasVisuals()
NGNode
hasVisuals
in class NGGroup
protected boolean hasOverlappingContents()
hasOverlappingContents
in class NGGroup
protected void renderContent(Graphics g)
renderContent
in class NGGroup
Copyright © 2020. All rights reserved.