Package icyllis.modernui.core.awt

# Class NonClearGraphics

java.lang.Object
java.awt.Graphics
icyllis.modernui.core.awt.NonClearGraphics

public class NonClearGraphics extends Graphics
Wrapper for a `Graphics` object that delegates to it. Only `clearRect(int, int, int, int)` does not delegate in order to prevent clearing the Canvas after it was rendered.

See Also:
  - `NonClearGraphics2D`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected Graphics`
  `delegate`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `NonClearGraphics(Graphics delegate)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `clearRect(int x, int y, int width, int height)`
  Does nothing.
  `void`
  `clipRect(int x, int y, int width, int height)`
  `void`
  `copyArea(int x, int y, int width, int height, int dx, int dy)`
  `NonClearGraphics`
  `create()`
  `NonClearGraphics`
  `create(int x, int y, int width, int height)`
  `void`
  `dispose()`
  `void`
  `draw3DRect(int x, int y, int width, int height, boolean raised)`
  `void`
  `drawArc(int x, int y, int width, int height, int startAngle, int arcAngle)`
  `void`
  `drawBytes(byte[] data, int offset, int length, int x, int y)`
  `void`
  `drawChars(char[] data, int offset, int length, int x, int y)`
  `boolean`
  `drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgcolor, ImageObserver observer)`
  `boolean`
  `drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, ImageObserver observer)`
  `boolean`
  `drawImage(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer)`
  `boolean`
  `drawImage(Image img, int x, int y, int width, int height, ImageObserver observer)`
  `boolean`
  `drawImage(Image img, int x, int y, Color bgcolor, ImageObserver observer)`
  `boolean`
  `drawImage(Image img, int x, int y, ImageObserver observer)`
  `void`
  `drawLine(int x1, int y1, int x2, int y2)`
  `void`
  `drawOval(int x, int y, int width, int height)`
  `void`
  `drawPolygon(int[] xPoints, int[] yPoints, int nPoints)`
  `void`
  `drawPolygon(Polygon p)`
  `void`
  `drawPolyline(int[] xPoints, int[] yPoints, int nPoints)`
  `void`
  `drawRect(int x, int y, int width, int height)`
  `void`
  `drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)`
  `void`
  `drawString(String str, int x, int y)`
  `void`
  `drawString(AttributedCharacterIterator iterator, int x, int y)`
  `void`
  `fill3DRect(int x, int y, int width, int height, boolean raised)`
  `void`
  `fillArc(int x, int y, int width, int height, int startAngle, int arcAngle)`
  `void`
  `fillOval(int x, int y, int width, int height)`
  `void`
  `fillPolygon(int[] xPoints, int[] yPoints, int nPoints)`
  `void`
  `fillPolygon(Polygon p)`
  `void`
  `fillRect(int x, int y, int width, int height)`
  `void`
  `fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)`
  `void`
  `finalize()`
  `Shape`
  `getClip()`
  `Rectangle`
  `getClipBounds()`
  `Rectangle`
  `getClipBounds(Rectangle r)`
  `Rectangle`
  `getClipRect()`
  Deprecated.
  `Color`
  `getColor()`
  `Font`
  `getFont()`
  `FontMetrics`
  `getFontMetrics()`
  `FontMetrics`
  `getFontMetrics(Font f)`
  `boolean`
  `hitClip(int x, int y, int width, int height)`
  `void`
  `setClip(int x, int y, int width, int height)`
  `void`
  `setClip(Shape clip)`
  `void`
  `setColor(Color c)`
  `void`
  `setFont(Font font)`
  `void`
  `setPaintMode()`
  `void`
  `setXORMode(Color c1)`
  `String`
  `toString()`
  `void`
  `translate(int x, int y)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### delegate

    protected Graphics delegate

- ## Constructor Details

  - ### NonClearGraphics

    public NonClearGraphics(Graphics delegate)

- ## Method Details

  - ### clearRect

    public void clearRect(int x, int y, int width, int height)
    Does nothing. This is to prevent a clearRect call from clearing the already rendered Canvas.
    Specified by:
      `clearRect` in class `Graphics`

  - ### getClipRect

    @Deprecated public Rectangle getClipRect()
    Deprecated.
    Overrides:
      `getClipRect` in class `Graphics`

  - ### create

    public NonClearGraphics create()
    Specified by:
      `create` in class `Graphics`

  - ### create

    public NonClearGraphics create(int x, int y, int width, int height)
    Overrides:
      `create` in class `Graphics`

  - ### translate

    public void translate(int x, int y)
    Specified by:
      `translate` in class `Graphics`

  - ### getColor

    public Color getColor()
    Specified by:
      `getColor` in class `Graphics`

  - ### setColor

    public void setColor(Color c)
    Specified by:
      `setColor` in class `Graphics`

  - ### setPaintMode

    public void setPaintMode()
    Specified by:
      `setPaintMode` in class `Graphics`

  - ### setXORMode

    public void setXORMode(Color c1)
    Specified by:
      `setXORMode` in class `Graphics`

  - ### getFont

    public Font getFont()
    Specified by:
      `getFont` in class `Graphics`

  - ### setFont

    public void setFont(Font font)
    Specified by:
      `setFont` in class `Graphics`

  - ### getFontMetrics

    public FontMetrics getFontMetrics()
    Overrides:
      `getFontMetrics` in class `Graphics`

  - ### getFontMetrics

    public FontMetrics getFontMetrics(Font f)
    Specified by:
      `getFontMetrics` in class `Graphics`

  - ### getClipBounds

    public Rectangle getClipBounds()
    Specified by:
      `getClipBounds` in class `Graphics`

  - ### clipRect

    public void clipRect(int x, int y, int width, int height)
    Specified by:
      `clipRect` in class `Graphics`

  - ### setClip

    public void setClip(int x, int y, int width, int height)
    Specified by:
      `setClip` in class `Graphics`

  - ### getClip

    public Shape getClip()
    Specified by:
      `getClip` in class `Graphics`

  - ### setClip

    public void setClip(Shape clip)
    Specified by:
      `setClip` in class `Graphics`

  - ### copyArea

    public void copyArea(int x, int y, int width, int height, int dx, int dy)
    Specified by:
      `copyArea` in class `Graphics`

  - ### drawLine

    public void drawLine(int x1, int y1, int x2, int y2)
    Specified by:
      `drawLine` in class `Graphics`

  - ### fillRect

    public void fillRect(int x, int y, int width, int height)
    Specified by:
      `fillRect` in class `Graphics`

  - ### drawRect

    public void drawRect(int x, int y, int width, int height)
    Overrides:
      `drawRect` in class `Graphics`

  - ### drawRoundRect

    public void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
    Specified by:
      `drawRoundRect` in class `Graphics`

  - ### fillRoundRect

    public void fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
    Specified by:
      `fillRoundRect` in class `Graphics`

  - ### draw3DRect

    public void draw3DRect(int x, int y, int width, int height, boolean raised)
    Overrides:
      `draw3DRect` in class `Graphics`

  - ### fill3DRect

    public void fill3DRect(int x, int y, int width, int height, boolean raised)
    Overrides:
      `fill3DRect` in class `Graphics`

  - ### drawOval

    public void drawOval(int x, int y, int width, int height)
    Specified by:
      `drawOval` in class `Graphics`

  - ### fillOval

    public void fillOval(int x, int y, int width, int height)
    Specified by:
      `fillOval` in class `Graphics`

  - ### drawArc

    public void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle)
    Specified by:
      `drawArc` in class `Graphics`

  - ### fillArc

    public void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle)
    Specified by:
      `fillArc` in class `Graphics`

  - ### drawPolyline

    public void drawPolyline(int[] xPoints, int[] yPoints, int nPoints)
    Specified by:
      `drawPolyline` in class `Graphics`

  - ### drawPolygon

    public void drawPolygon(int[] xPoints, int[] yPoints, int nPoints)
    Specified by:
      `drawPolygon` in class `Graphics`

  - ### drawPolygon

    public void drawPolygon(Polygon p)
    Overrides:
      `drawPolygon` in class `Graphics`

  - ### fillPolygon

    public void fillPolygon(int[] xPoints, int[] yPoints, int nPoints)
    Specified by:
      `fillPolygon` in class `Graphics`

  - ### fillPolygon

    public void fillPolygon(Polygon p)
    Overrides:
      `fillPolygon` in class `Graphics`

  - ### drawString

    public void drawString(String str, int x, int y)
    Specified by:
      `drawString` in class `Graphics`

  - ### drawString

    public void drawString(AttributedCharacterIterator iterator, int x, int y)
    Specified by:
      `drawString` in class `Graphics`

  - ### drawChars

    public void drawChars(char[] data, int offset, int length, int x, int y)
    Overrides:
      `drawChars` in class `Graphics`

  - ### drawBytes

    public void drawBytes(byte[] data, int offset, int length, int x, int y)
    Overrides:
      `drawBytes` in class `Graphics`

  - ### drawImage

    public boolean drawImage(Image img, int x, int y, ImageObserver observer)
    Specified by:
      `drawImage` in class `Graphics`

  - ### drawImage

    public boolean drawImage(Image img, int x, int y, int width, int height, ImageObserver observer)
    Specified by:
      `drawImage` in class `Graphics`

  - ### drawImage

    public boolean drawImage(Image img, int x, int y, Color bgcolor, ImageObserver observer)
    Specified by:
      `drawImage` in class `Graphics`

  - ### drawImage

    public boolean drawImage(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer)
    Specified by:
      `drawImage` in class `Graphics`

  - ### drawImage

    public boolean drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, ImageObserver observer)
    Specified by:
      `drawImage` in class `Graphics`

  - ### drawImage

    public boolean drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgcolor, ImageObserver observer)
    Specified by:
      `drawImage` in class `Graphics`

  - ### dispose

    public void dispose()
    Specified by:
      `dispose` in class `Graphics`

  - ### finalize

    public void finalize()
    Overrides:
      `finalize` in class `Graphics`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Graphics`

  - ### hitClip

    public boolean hitClip(int x, int y, int width, int height)
    Overrides:
      `hitClip` in class `Graphics`

  - ### getClipBounds

    public Rectangle getClipBounds(Rectangle r)
    Overrides:
      `getClipBounds` in class `Graphics`