class WCGraphicsPrismContext extends WCGraphicsContext
| Modifier and Type | Class and Description |
|---|---|
private static class |
WCGraphicsPrismContext.ClipLayer |
private class |
WCGraphicsPrismContext.Composite |
private static class |
WCGraphicsPrismContext.ContextState |
private static class |
WCGraphicsPrismContext.Layer |
private static class |
WCGraphicsPrismContext.PassThrough |
private class |
WCGraphicsPrismContext.TransparencyLayer |
static class |
WCGraphicsPrismContext.Type |
| Modifier and Type | Field and Description |
|---|---|
(package private) Graphics |
baseGraphics |
private BaseTransform |
baseTransform |
private Graphics |
cachedGraphics |
private static boolean |
DEBUG_DRAW_CLIP_SHAPE |
private static BasicStroke |
focusRingStroke |
private int |
fontSmoothingType |
private boolean |
isRootLayerValid |
private static java.util.logging.Logger |
log |
private WCGraphicsPrismContext.ContextState |
state |
private java.util.List<WCGraphicsPrismContext.ContextState> |
states |
COMPOSITE_CLEAR, COMPOSITE_COPY, COMPOSITE_DESTINATION_ATOP, COMPOSITE_DESTINATION_IN, COMPOSITE_DESTINATION_OUT, COMPOSITE_DESTINATION_OVER, COMPOSITE_HIGHLIGHT, COMPOSITE_PLUS_DARKER, COMPOSITE_PLUS_LIGHTER, COMPOSITE_SOURCE_ATOP, COMPOSITE_SOURCE_IN, COMPOSITE_SOURCE_OUT, COMPOSITE_SOURCE_OVER, COMPOSITE_XOR| Constructor and Description |
|---|
WCGraphicsPrismContext() |
WCGraphicsPrismContext(Graphics g) |
| Modifier and Type | Method and Description |
|---|---|
void |
beginTransparencyLayer(float opacity) |
void |
clearRect(float x,
float y,
float w,
float h) |
void |
concatTransform(WCTransform tm) |
(package private) static Color |
createColor(int rgba) |
private static Color4f |
createColor4f(int rgba) |
WCGradient |
createLinearGradient(WCPoint p1,
WCPoint p2) |
WCGradient |
createRadialGradient(WCPoint p1,
float r1,
WCPoint p2,
float r2) |
private DropShadow |
createShadow(float dx,
float dy,
float blur,
int rgba) |
void |
dispose() |
void |
drawBitmapImage(java.nio.ByteBuffer image,
int x,
int y,
int w,
int h) |
void |
drawEllipse(int x,
int y,
int w,
int h) |
void |
drawFocusRing(int x,
int y,
int w,
int h,
int rgba) |
void |
drawIcon(WCIcon icon,
int x,
int y) |
void |
drawImage(WCImage img,
float dstx,
float dsty,
float dstw,
float dsth,
float srcx,
float srcy,
float srcw,
float srch) |
void |
drawLine(int x0,
int y0,
int x1,
int y1) |
void |
drawPattern(WCImage texture,
WCRectangle srcRect,
WCTransform patternTransform,
WCPoint phase,
WCRectangle destRect) |
void |
drawPolygon(WCPath path,
boolean shouldAntialias) |
void |
drawRect(int x,
int y,
int w,
int h) |
void |
drawScrollbar(ScrollBarTheme theme,
Ref widget,
int x,
int y,
int pressedPart,
int hoveredPart) |
void |
drawString(WCFont f,
int[] glyphs,
float[] advances,
float x,
float y) |
void |
drawString(WCFont f,
java.lang.String str,
boolean rtl,
int from,
int to,
float x,
float y) |
void |
drawWidget(RenderTheme theme,
Ref widget,
int x,
int y) |
void |
endTransparencyLayer() |
void |
fillPath(WCPath path) |
void |
fillRect(float x,
float y,
float w,
float h,
java.lang.Integer rgba) |
void |
fillRoundedRect(float x,
float y,
float w,
float h,
float topLeftW,
float topLeftH,
float topRightW,
float topRightH,
float bottomLeftW,
float bottomLeftH,
float bottomRightW,
float bottomRightH,
int rgba) |
void |
flush() |
private void |
flushAllLayers()
Renders all layers to the underlaying Graphics, but preserves the
current state and the states stack
|
float |
getAlpha() |
WCRectangle |
getClip() |
protected Rectangle |
getClipRectNoClone() |
private static FilterContext |
getFilterContext(Graphics g) |
int |
getFontSmoothingType() |
(package private) Graphics |
getGraphics(boolean checkClip) |
WCImage |
getImage() |
java.lang.Object |
getPlatformGraphics() |
WCTransform |
getTransform() |
protected Affine3D |
getTransformNoClone() |
(package private) void |
initBaseTransform(BaseTransform t) |
private static Rectangle |
intersect(Rectangle what,
Rectangle with) |
private void |
render(Graphics g,
Effect effect,
Paint paint,
BasicStroke stroke,
NGNode node) |
private void |
renderLayer(WCGraphicsPrismContext.Layer layer) |
private void |
resetCachedGraphics() |
void |
restoreState() |
private void |
restoreStateInternal() |
void |
rotate(float radians) |
void |
saveState() |
private void |
saveStateInternal() |
void |
scale(float sx,
float sy) |
void |
setAlpha(float alpha) |
void |
setClip(int cx,
int cy,
int cw,
int ch) |
private void |
setClip(Rectangle shape) |
void |
setClip(WCPath path,
boolean isOut) |
void |
setClip(WCRectangle c) |
void |
setComposite(int composite) |
void |
setFillColor(int rgba) |
void |
setFillGradient(WCGradient gradient) |
void |
setFontSmoothingType(int fontSmoothingType) |
void |
setLineCap(int lineCap) |
void |
setLineDash(float offset,
float... sizes) |
void |
setLineJoin(int lineJoin) |
void |
setMiterLimit(float miterLimit) |
void |
setPerspectiveTransform(WCTransform tm) |
void |
setShadow(float dx,
float dy,
float blur,
int rgba) |
void |
setStrokeColor(int rgba) |
void |
setStrokeGradient(WCGradient gradient) |
void |
setStrokeStyle(int style) |
void |
setStrokeWidth(float width) |
void |
setTextMode(boolean fill,
boolean stroke,
boolean clip) |
void |
setTransform(WCTransform tm) |
protected boolean |
shouldCalculateIntersection() |
protected boolean |
shouldRenderRect(float x,
float y,
float w,
float h,
DropShadow shadow,
BasicStroke stroke) |
protected boolean |
shouldRenderShape(Shape shape,
DropShadow shadow,
BasicStroke stroke) |
private void |
startNewLayer(WCGraphicsPrismContext.Layer layer) |
void |
strokeArc(int x,
int y,
int w,
int h,
int startAngle,
int angleSpan) |
void |
strokePath(WCPath path) |
void |
strokeRect(float x,
float y,
float w,
float h,
float lineWidth) |
private Rectangle |
transformClip(Rectangle localClip) |
void |
translate(float x,
float y) |
WCGraphicsPrismContext.Type |
type() |
private static final java.util.logging.Logger log
private static final boolean DEBUG_DRAW_CLIP_SHAPE
Graphics baseGraphics
private BaseTransform baseTransform
private final java.util.List<WCGraphicsPrismContext.ContextState> states
private WCGraphicsPrismContext.ContextState state
private Graphics cachedGraphics
private int fontSmoothingType
private boolean isRootLayerValid
private static final BasicStroke focusRingStroke
WCGraphicsPrismContext(Graphics g)
WCGraphicsPrismContext()
public WCGraphicsPrismContext.Type type()
final void initBaseTransform(BaseTransform t)
private void resetCachedGraphics()
public java.lang.Object getPlatformGraphics()
getPlatformGraphics in class WCGraphicsContextGraphics getGraphics(boolean checkClip)
public void saveState()
saveState in class WCGraphicsContextprivate void saveStateInternal()
private void startNewLayer(WCGraphicsPrismContext.Layer layer)
private void renderLayer(WCGraphicsPrismContext.Layer layer)
private void restoreStateInternal()
public void restoreState()
restoreState in class WCGraphicsContextprivate void flushAllLayers()
public void dispose()
dispose in class WCGraphicsContextpublic void setClip(WCPath path, boolean isOut)
setClip in class WCGraphicsContextprivate void setClip(Rectangle shape)
public void setClip(int cx,
int cy,
int cw,
int ch)
setClip in class WCGraphicsContextpublic void setClip(WCRectangle c)
setClip in class WCGraphicsContextpublic WCRectangle getClip()
getClip in class WCGraphicsContextprotected Rectangle getClipRectNoClone()
protected Affine3D getTransformNoClone()
public void translate(float x,
float y)
translate in class WCGraphicsContextpublic void scale(float sx,
float sy)
scale in class WCGraphicsContextpublic void rotate(float radians)
rotate in class WCGraphicsContextprotected boolean shouldRenderRect(float x,
float y,
float w,
float h,
DropShadow shadow,
BasicStroke stroke)
protected boolean shouldRenderShape(Shape shape, DropShadow shadow, BasicStroke stroke)
protected boolean shouldCalculateIntersection()
public void fillRect(float x,
float y,
float w,
float h,
java.lang.Integer rgba)
fillRect in class WCGraphicsContextpublic void fillRoundedRect(float x,
float y,
float w,
float h,
float topLeftW,
float topLeftH,
float topRightW,
float topRightH,
float bottomLeftW,
float bottomLeftH,
float bottomRightW,
float bottomRightH,
int rgba)
fillRoundedRect in class WCGraphicsContextpublic void clearRect(float x,
float y,
float w,
float h)
clearRect in class WCGraphicsContextpublic void setFillColor(int rgba)
setFillColor in class WCGraphicsContextpublic void setFillGradient(WCGradient gradient)
setFillGradient in class WCGraphicsContextpublic void setTextMode(boolean fill,
boolean stroke,
boolean clip)
setTextMode in class WCGraphicsContextpublic void setFontSmoothingType(int fontSmoothingType)
setFontSmoothingType in class WCGraphicsContextpublic int getFontSmoothingType()
getFontSmoothingType in class WCGraphicsContextpublic void setStrokeStyle(int style)
setStrokeStyle in class WCGraphicsContextpublic void setStrokeColor(int rgba)
setStrokeColor in class WCGraphicsContextpublic void setStrokeWidth(float width)
setStrokeWidth in class WCGraphicsContextpublic void setStrokeGradient(WCGradient gradient)
setStrokeGradient in class WCGraphicsContextpublic void setLineDash(float offset,
float... sizes)
setLineDash in class WCGraphicsContextpublic void setLineCap(int lineCap)
setLineCap in class WCGraphicsContextpublic void setLineJoin(int lineJoin)
setLineJoin in class WCGraphicsContextpublic void setMiterLimit(float miterLimit)
setMiterLimit in class WCGraphicsContextpublic void setShadow(float dx,
float dy,
float blur,
int rgba)
setShadow in class WCGraphicsContextpublic void drawPolygon(WCPath path, boolean shouldAntialias)
drawPolygon in class WCGraphicsContextpublic void drawLine(int x0,
int y0,
int x1,
int y1)
drawLine in class WCGraphicsContextpublic void drawPattern(WCImage texture, WCRectangle srcRect, WCTransform patternTransform, WCPoint phase, WCRectangle destRect)
drawPattern in class WCGraphicsContextpublic void drawImage(WCImage img, float dstx, float dsty, float dstw, float dsth, float srcx, float srcy, float srcw, float srch)
drawImage in class WCGraphicsContextpublic void drawBitmapImage(java.nio.ByteBuffer image,
int x,
int y,
int w,
int h)
drawBitmapImage in class WCGraphicsContextpublic void drawIcon(WCIcon icon, int x, int y)
drawIcon in class WCGraphicsContextpublic void drawRect(int x,
int y,
int w,
int h)
drawRect in class WCGraphicsContextpublic void drawString(WCFont f, int[] glyphs, float[] advances, float x, float y)
drawString in class WCGraphicsContextpublic void drawString(WCFont f, java.lang.String str, boolean rtl, int from, int to, float x, float y)
drawString in class WCGraphicsContextpublic void setComposite(int composite)
setComposite in class WCGraphicsContextpublic void drawEllipse(int x,
int y,
int w,
int h)
drawEllipse in class WCGraphicsContextpublic void drawFocusRing(int x,
int y,
int w,
int h,
int rgba)
drawFocusRing in class WCGraphicsContextpublic void setAlpha(float alpha)
setAlpha in class WCGraphicsContextpublic float getAlpha()
getAlpha in class WCGraphicsContextpublic void beginTransparencyLayer(float opacity)
beginTransparencyLayer in class WCGraphicsContextpublic void endTransparencyLayer()
endTransparencyLayer in class WCGraphicsContextpublic void drawWidget(RenderTheme theme, Ref widget, int x, int y)
drawWidget in class WCGraphicsContextpublic void drawScrollbar(ScrollBarTheme theme, Ref widget, int x, int y, int pressedPart, int hoveredPart)
drawScrollbar in class WCGraphicsContextstatic Color createColor(int rgba)
private static Color4f createColor4f(int rgba)
private DropShadow createShadow(float dx, float dy, float blur, int rgba)
private void render(Graphics g, Effect effect, Paint paint, BasicStroke stroke, NGNode node)
private static FilterContext getFilterContext(Graphics g)
public void strokeArc(int x,
int y,
int w,
int h,
int startAngle,
int angleSpan)
strokeArc in class WCGraphicsContextpublic WCImage getImage()
getImage in class WCGraphicsContextpublic void strokeRect(float x,
float y,
float w,
float h,
float lineWidth)
strokeRect in class WCGraphicsContextpublic void strokePath(WCPath path)
strokePath in class WCGraphicsContextpublic void fillPath(WCPath path)
fillPath in class WCGraphicsContextpublic void setPerspectiveTransform(WCTransform tm)
setPerspectiveTransform in class WCGraphicsContextpublic void setTransform(WCTransform tm)
setTransform in class WCGraphicsContextpublic WCTransform getTransform()
getTransform in class WCGraphicsContextpublic void concatTransform(WCTransform tm)
concatTransform in class WCGraphicsContextpublic void flush()
flush in class WCGraphicsContextpublic WCGradient createLinearGradient(WCPoint p1, WCPoint p2)
createLinearGradient in class WCGraphicsContextpublic WCGradient createRadialGradient(WCPoint p1, float r1, WCPoint p2, float r2)
createRadialGradient in class WCGraphicsContext