| Modifier and Type | Field and Description |
|---|---|
| private float | |
| private float | |
| private Ellipse2D | |
| pack-priv static final float | HALF_SQRT_HALF
.5 * 1/Math.sqrt(2). |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected RectBounds | computeOpaqueRegion(RectBounds opaqueRegion)
Overrides com. Computes and returns the opaque region for this node. |
| protected ShapeRep | |
| public Shape | |
| protected boolean | hasOpaqueRegion()
Overrides com. Called only on NGNode subclasses which override |
| protected boolean | supportsOpaqueRegions()
Overrides com. Gets whether this NGNode supports opaque regions at all. |
| public void |
| cx | back to summary |
|---|---|
| private float cx | |
| cy | back to summary |
|---|---|
| private float cy | |
| ellipse | back to summary |
|---|---|
| private Ellipse2D ellipse | |
| HALF_SQRT_HALF | back to summary |
|---|---|
| pack-priv static final float HALF_SQRT_HALF .5 * 1/Math.sqrt(2). If you multiply this value by the diameter of the circle, then you will get half the length of the side of the square which is inscribed within the circle. This is used when computing the opaque region of the circle and ellipse. This value has been precomputed and stored as a constant to make the resulting math faster. It is low in precision to compute a conservative inscribed square. | |
| NGCircle | back to summary |
|---|---|
| public NGCircle() | |
| computeOpaqueRegion | back to summary |
|---|---|
| protected RectBounds computeOpaqueRegion(RectBounds opaqueRegion) Overrides com. Doc from com. Computes and returns the opaque region for this node. This method
| |
| createShapeRep | back to summary |
|---|---|
| protected ShapeRep createShapeRep(Graphics g) Overrides com.
| |
| getShape | back to summary |
|---|---|
| public Shape getShape() Implements abstract com.
| |
| hasOpaqueRegion | back to summary |
|---|---|
| protected boolean hasOpaqueRegion() Overrides com. Doc from com. Called only on NGNode subclasses which override
| |
| supportsOpaqueRegions | back to summary |
|---|---|
| protected boolean supportsOpaqueRegions() Overrides com. Doc from com. Gets whether this NGNode supports opaque regions at all. Most node types do not, but some do. If an NGNode subclass is written to support opaque regions, it must override this method to return true. The subclass must then also override the computeDirtyRegion method to return the dirty region, or null if the node in its current state doesn't have one. This method is intended to be immutable.
| |
| updateCircle | back to summary |
|---|---|
| public void updateCircle(float cx, float cy, float r) | |