Package snap.gfx

Class PainterProxy

java.lang.Object
snap.gfx.Painter
snap.gfx.PainterProxy

public class PainterProxy extends Painter
A Painter subclass that forward on to another.
  • Field Details

  • Constructor Details

    • PainterProxy

      public PainterProxy(Painter aPntr)
      Creates a new PainterProxy for given painter.
  • Method Details

    • getPntr

      public Painter getPntr()
      Returns the actual painter.
    • getFont

      public Font getFont()
      Returns the font.
      Specified by:
      getFont in class Painter
    • setFont

      public void setFont(Font font)
      Sets the font.
      Specified by:
      setFont in class Painter
    • getPaint

      public Paint getPaint()
      Returns the paint.
      Specified by:
      getPaint in class Painter
    • setPaint

      public void setPaint(Paint paint)
      Sets the paint.
      Specified by:
      setPaint in class Painter
    • getStroke

      public Stroke getStroke()
      Returns the stroke.
      Specified by:
      getStroke in class Painter
    • setStroke

      public void setStroke(Stroke s)
      Sets the stroke.
      Specified by:
      setStroke in class Painter
    • getOpacity

      public double getOpacity()
      Returns the opacity.
      Specified by:
      getOpacity in class Painter
    • setOpacity

      public void setOpacity(double aValue)
      Sets the opacity.
      Specified by:
      setOpacity in class Painter
    • clearRect

      public void clearRect(double aX, double aY, double aW, double aH)
      Clears a rect.
      Overrides:
      clearRect in class Painter
    • draw

      public void draw(Shape s)
      Stroke the given shape.
      Specified by:
      draw in class Painter
    • fill

      public void fill(Shape s)
      Fill the given shape.
      Specified by:
      fill in class Painter
    • drawLine

      public void drawLine(double x1, double y1, double x2, double y2)
      Draw the given line.
      Overrides:
      drawLine in class Painter
    • fillRect

      public void fillRect(double x, double y, double w, double h)
      Fill the given rect.
      Overrides:
      fillRect in class Painter
    • drawRect

      public void drawRect(double x, double y, double w, double h)
      Draw the given rect.
      Overrides:
      drawRect in class Painter
    • fill3DRect

      public void fill3DRect(double x, double y, double w, double h, boolean isRsd)
      Paints a 3D rect.
      Overrides:
      fill3DRect in class Painter
    • 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 class Painter
    • drawImage

      public void drawImage(Image img, Transform xform)
      Draw image with transform.
      Overrides:
      drawImage in class Painter
    • 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.
      Specified by:
      drawImage in class Painter
    • drawString

      public void drawString(String str, double x, double y)
      Draw string at location.
      Overrides:
      drawString in class Painter
    • drawString

      public void drawString(String str, double x, double y, double cs)
      Draw string at location with char spacing.
      Overrides:
      drawString in class Painter
    • getTransform

      public Transform getTransform()
      Transform by transform.
      Specified by:
      getTransform in class Painter
    • setTransform

      public void setTransform(Transform aTrans)
      Transform by transform.
      Specified by:
      setTransform in class Painter
    • transform

      public void transform(Transform Tx)
      Transform by transform.
      Specified by:
      transform in class Painter
    • getClip

      public Shape getClip()
      Return clip shape.
      Specified by:
      getClip in class Painter
    • getClipBounds

      public Rect getClipBounds()
      Return clip bounds.
      Overrides:
      getClipBounds in class Painter
    • clip

      public void clip(Shape s)
      Clip by shape.
      Specified by:
      clip in class Painter
    • setComposite

      public void setComposite(Painter.Composite aComp)
      Sets the composite mode.
      Overrides:
      setComposite in class Painter
    • setAntialiasing

      public boolean setAntialiasing(boolean aValue)
      Sets whether antialiasing.
      Overrides:
      setAntialiasing in class Painter
    • setImageQuality

      public void setImageQuality(double aValue)
      Sets image rendering quality.
      Overrides:
      setImageQuality in class Painter
    • isPrinting

      public boolean isPrinting()
      Returns whether shape painting is really printing.
      Overrides:
      isPrinting in class Painter
    • setPrinting

      public void setPrinting(boolean aValue)
      Returns whether shape painting is really printing.
      Overrides:
      setPrinting in class Painter
    • save

      public void save()
      Standard clone implementation.
      Specified by:
      save in class Painter
    • restore

      public void restore()
      Disposes this painter.
      Specified by:
      restore in class Painter
    • flush

      public void flush()
      Flush any buffered paint operations.
      Overrides:
      flush in class Painter
    • toString

      public String toString()
      Standard toString implementation.
      Overrides:
      toString in class Painter
    • getNative

      public Object getNative()
      Return native helper for painter, if available.
      Overrides:
      getNative in class Painter