public class NGText extends NGShape
NGShape.Mode
NGNode.DirtyFlag, NGNode.RenderRootResult
Modifier and Type | Field and Description |
---|---|
private static int |
DECORATION |
private boolean |
drawingEffect |
private static double |
EPSILON |
private static int |
FILL |
private PGFont |
font |
private int |
fontSmoothingType |
private FontStrike |
fontStrike |
(package private) static BaseTransform |
IDENT |
private FontStrike |
identityStrike |
private float |
layoutX |
private float |
layoutY |
private GlyphList[] |
runs |
private int |
selectionEnd |
private java.lang.Object |
selectionPaint |
private int |
selectionStart |
private static int |
SHAPE_FILL |
private double[] |
strikeMat |
private boolean |
strikethrough |
private static int |
TEXT |
private boolean |
underline |
drawPaint, drawStroke, fillPaint, mode, shapeRep, THRESHOLD
childDirty, contentBounds, cullingBits, dirty, DIRTY_CHILDREN_ACCUMULATED_THRESHOLD, DIRTY_REGION_CONTAINS_NODE_BOUNDS, DIRTY_REGION_CONTAINS_OR_INTERSECTS_NODE_BOUNDS, DIRTY_REGION_INTERSECTS_NODE_BOUNDS, dirtyBounds, dirtyChildrenAccumulated, TEMP_TRANSFORM, transformedBounds
Constructor and Description |
---|
NGText() |
Modifier and Type | Method and Description |
---|---|
protected BaseBounds |
computePadding(BaseBounds region)
Provide some lucky padding in the case that we are rendering LCD
text since there might be some pixels that lie outside the normally
computed content bounds.
|
Shape |
getShape() |
private FontStrike |
getStrike(BaseTransform xform) |
protected void |
renderContent2D(Graphics g,
boolean printing)
Renders the content as though it is 2D in all cases.
|
protected void |
renderEffect(Graphics g) |
private void |
renderText(Graphics g,
FontStrike strike,
BaseBounds clipBds,
Color selectionColor,
int op) |
void |
setFont(java.lang.Object font) |
void |
setFontSmoothingType(int fontSmoothingType) |
void |
setGlyphs(java.lang.Object[] glyphs) |
void |
setLayoutLocation(float x,
float y) |
void |
setSelection(int start,
int end,
java.lang.Object color) |
void |
setStrikethrough(boolean strikethrough) |
void |
setUnderline(boolean underline) |
createShapeRep, geometryChanged, getFillPaint, getMode, getStrokeShape, hasOpaqueRegion, hasOverlappingContents, isSmooth, renderContent, setDrawPaint, setDrawStroke, setDrawStroke, setFillPaint, setMode, setSmooth, visualsChanged
accumulateDirtyRegions, accumulateGroupDirtyRegion, accumulateNodeDirtyRegion, applyClip, applyEffect, applyTransform, checkBoundsInQuad, clearDirty, clearDirtyTree, clearPainted, computeNodeRenderRoot, computeOpaqueRegion, computeRenderRoot, doPreCulling, doRender, drawDirtyOpts, effectChanged, getCacheFilter, getClipNode, getClippedBounds, getCompleteBounds, getContentBounds, getEffect, getEffectBounds, getEffectFilter, getFilterContext, getName, getNodeBlendMode, getOpacity, getOpaqueRegion, getParent, getRenderRoot, getTransform, hasVisuals, invalidateCache, invalidateCacheByTranslation, invalidateOpaqueRegion, isClean, isContentBounds2D, isDepthTest, isOpaqueRegionInvalid, isReadbackSupported, isRectClip, isShape3D, isVisible, markCullRegions, markDirty, markTreeDirty, markTreeDirtyNoIncrement, needsBlending, printDirtyOpts, release, render, renderClip, renderForcedContent, renderForClip, setCachedAsBitmap, setClipNode, setContentBounds, setDepthTest, setEffect, setName, setNodeBlendMode, setOpacity, setParent, setTransformedBounds, setTransformMatrix, setVisible, supportsOpaqueRegions, toString
static final BaseTransform IDENT
private GlyphList[] runs
private float layoutX
private float layoutY
private PGFont font
private int fontSmoothingType
private boolean underline
private boolean strikethrough
private java.lang.Object selectionPaint
private int selectionStart
private int selectionEnd
private static double EPSILON
private FontStrike fontStrike
private FontStrike identityStrike
private double[] strikeMat
private boolean drawingEffect
private static int FILL
private static int SHAPE_FILL
private static int TEXT
private static int DECORATION
public void setGlyphs(java.lang.Object[] glyphs)
public void setLayoutLocation(float x, float y)
public void setFont(java.lang.Object font)
public void setFontSmoothingType(int fontSmoothingType)
public void setUnderline(boolean underline)
public void setStrikethrough(boolean strikethrough)
public void setSelection(int start, int end, java.lang.Object color)
protected BaseBounds computePadding(BaseBounds region)
computePadding
in class NGNode
private FontStrike getStrike(BaseTransform xform)
protected void renderEffect(Graphics g)
renderEffect
in class NGNode
protected void renderContent2D(Graphics g, boolean printing)
NGShape
renderContent2D
in class NGShape
g
- The graphics object to render withprivate void renderText(Graphics g, FontStrike strike, BaseBounds clipBds, Color selectionColor, int op)