Package snap.gfx
Class PainterProxy
java.lang.Object
snap.gfx.Painter
snap.gfx.PainterProxy
A Painter subclass that forward on to another.
-
Nested Class Summary
Nested classes/interfaces inherited from class snap.gfx.Painter
Painter.Composite, Painter.Props
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clearRect
(double aX, double aY, double aW, double aH) Clears a rect.void
Clip by shape.void
Stroke the given shape.void
drawButton
(double x, double y, double w, double h, boolean isPrsd) Draws a button for the given rect with an option for pressed.void
drawImage
(Image img, double sx, double sy, double sw, double sh, double dx, double dy, double dw, double dh) Draw image in rect.void
Draw image with transform.void
drawLine
(double x1, double y1, double x2, double y2) Draw the given line.void
drawRect
(double x, double y, double w, double h) Draw the given rect.void
drawString
(String str, double x, double y, double cs) Draw string at location with char spacing.void
Fill the given shape.void
fill3DRect
(double x, double y, double w, double h, boolean isRsd) Paints a 3D rect.void
fillRect
(double x, double y, double w, double h) Fill the given rect.void
flush()
Flush any buffered paint operations.getClip()
Return clip shape.Return clip bounds.getFont()
Returns the font.Return native helper for painter, if available.double
Returns the opacity.getPaint()
Returns the paint.getPntr()
Returns the actual painter.Returns the stroke.Transform by transform.boolean
Returns whether shape painting is really printing.void
restore()
Disposes this painter.void
save()
Standard clone implementation.boolean
setAntialiasing
(boolean aValue) Sets whether antialiasing.void
setComposite
(Painter.Composite aComp) Sets the composite mode.void
Sets the font.void
setImageQuality
(double aValue) Sets image rendering quality.void
setOpacity
(double aValue) Sets the opacity.void
Sets the paint.void
setPrinting
(boolean aValue) Returns whether shape painting is really printing.void
Sets the stroke.void
setTransform
(Transform aTrans) Transform by transform.void
strokeString
(String str, double x, double y, double cs) Stroke string at location with char spacing.toString()
Standard toString implementation.void
Transform by transform.Methods inherited from class snap.gfx.Painter
clipRect, drawButton, drawImage, drawImage, drawLineWithPaint, drawRectWithPaint, drawString, drawWithPaint, fillRectWithPaint, fillWithPaint, getColor, getComposite, getImageQuality, getNative, getProps, isStrokePure, rotate, rotateAround, scale, setColor, setProps, setStrokePure, setStrokeWidth, setTransform, transform, translate
-
Field Details
-
_pntr
-
-
Constructor Details
-
PainterProxy
Creates a new PainterProxy for given painter.
-
-
Method Details
-
getPntr
Returns the actual painter. -
getFont
Returns the font. -
setFont
Sets the font. -
getPaint
Returns the paint. -
setPaint
Sets the paint. -
getStroke
Returns the stroke. -
setStroke
Sets the stroke. -
getOpacity
public double getOpacity()Returns the opacity.- Specified by:
getOpacity
in classPainter
-
setOpacity
public void setOpacity(double aValue) Sets the opacity.- Specified by:
setOpacity
in classPainter
-
clearRect
public void clearRect(double aX, double aY, double aW, double aH) Clears a rect. -
draw
Stroke the given shape. -
fill
Fill the given shape. -
drawLine
public void drawLine(double x1, double y1, double x2, double y2) Draw the given line. -
fillRect
public void fillRect(double x, double y, double w, double h) Fill the given rect. -
drawRect
public void drawRect(double x, double y, double w, double h) Draw the given rect. -
fill3DRect
public void fill3DRect(double x, double y, double w, double h, boolean isRsd) Paints a 3D rect.- Overrides:
fill3DRect
in classPainter
-
drawButton
public void drawButton(double x, double y, double w, double h, boolean isPrsd) Draws a button for the given rect with an option for pressed.- Overrides:
drawButton
in classPainter
-
drawImage
Draw image with transform. -
drawImage
public void drawImage(Image img, double sx, double sy, double sw, double sh, double dx, double dy, double dw, double dh) Draw image in rect. -
drawString
Draw string at location with char spacing.- Overrides:
drawString
in classPainter
-
strokeString
Stroke string at location with char spacing.- Overrides:
strokeString
in classPainter
-
getTransform
Transform by transform.- Specified by:
getTransform
in classPainter
-
setTransform
Transform by transform.- Specified by:
setTransform
in classPainter
-
transform
Transform by transform. -
getClip
Return clip shape. -
getClipBounds
Return clip bounds.- Overrides:
getClipBounds
in classPainter
-
clip
Clip by shape. -
setComposite
Sets the composite mode.- Overrides:
setComposite
in classPainter
-
setAntialiasing
public boolean setAntialiasing(boolean aValue) Sets whether antialiasing.- Overrides:
setAntialiasing
in classPainter
-
setImageQuality
public void setImageQuality(double aValue) Sets image rendering quality.- Overrides:
setImageQuality
in classPainter
-
isPrinting
public boolean isPrinting()Returns whether shape painting is really printing.- Overrides:
isPrinting
in classPainter
-
setPrinting
public void setPrinting(boolean aValue) Returns whether shape painting is really printing.- Overrides:
setPrinting
in classPainter
-
save
public void save()Standard clone implementation. -
restore
public void restore()Disposes this painter. -
flush
public void flush()Flush any buffered paint operations. -
toString
Standard toString implementation. -
getNative
Return native helper for painter, if available.
-