Package icyllis.modernui.core.awt

# Class NonClearGraphics2D

java.lang.Object
java.awt.Graphics
java.awt.Graphics2D
icyllis.modernui.core.awt.NonClearGraphics2D

public class NonClearGraphics2D extends Graphics2D
Wrapper for a `Graphics2D` 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:
  - `NonClearGraphics`

- ## Field Summary

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

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `NonClearGraphics2D(Graphics2D delegate)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addRenderingHints(Map<?,?> hints)`
  `void`
  `clearRect(int x, int y, int width, int height)`
  Does nothing.
  `void`
  `clip(Shape s)`
  `void`
  `clipRect(int x, int y, int width, int height)`
  `void`
  `copyArea(int x, int y, int width, int height, int dx, int dy)`
  `NonClearGraphics2D`
  `create()`
  `NonClearGraphics2D`
  `create(int x, int y, int width, int height)`
  `void`
  `dispose()`
  `void`
  `draw(Shape s)`
  `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)`
  `void`
  `drawGlyphVector(GlyphVector g, float x, float y)`
  `void`
  `drawImage(BufferedImage img, BufferedImageOp op, 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)`
  `boolean`
  `drawImage(Image img, AffineTransform xform, ImageObserver obs)`
  `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`
  `drawRenderableImage(RenderableImage img, AffineTransform xform)`
  `void`
  `drawRenderedImage(RenderedImage img, AffineTransform xform)`
  `void`
  `drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)`
  `void`
  `drawString(String str, float x, float y)`
  `void`
  `drawString(String str, int x, int y)`
  `void`
  `drawString(AttributedCharacterIterator iterator, float x, float y)`
  `void`
  `drawString(AttributedCharacterIterator iterator, int x, int y)`
  `void`
  `fill(Shape s)`
  `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()`
  `Color`
  `getBackground()`
  `Shape`
  `getClip()`
  `Rectangle`
  `getClipBounds()`
  `Rectangle`
  `getClipBounds(Rectangle r)`
  `Rectangle`
  `getClipRect()`
  Deprecated.
  `Color`
  `getColor()`
  `Composite`
  `getComposite()`
  `GraphicsConfiguration`
  `getDeviceConfiguration()`
  `Font`
  `getFont()`
  `FontMetrics`
  `getFontMetrics()`
  `FontMetrics`
  `getFontMetrics(Font f)`
  `FontRenderContext`
  `getFontRenderContext()`
  `Paint`
  `getPaint()`
  `Object`
  `getRenderingHint(RenderingHints.Key hintKey)`
  `RenderingHints`
  `getRenderingHints()`
  `Stroke`
  `getStroke()`
  `AffineTransform`
  `getTransform()`
  `boolean`
  `hit(Rectangle rect, Shape s, boolean onStroke)`
  `boolean`
  `hitClip(int x, int y, int width, int height)`
  `void`
  `rotate(double theta)`
  `void`
  `rotate(double theta, double x, double y)`
  `void`
  `scale(double sx, double sy)`
  `void`
  `setBackground(Color color)`
  `void`
  `setClip(int x, int y, int width, int height)`
  `void`
  `setClip(Shape clip)`
  `void`
  `setColor(Color c)`
  `void`
  `setComposite(Composite comp)`
  `void`
  `setFont(Font font)`
  `void`
  `setPaint(Paint paint)`
  `void`
  `setPaintMode()`
  `void`
  `setRenderingHint(RenderingHints.Key hintKey, Object hintValue)`
  `void`
  `setRenderingHints(Map<?,?> hints)`
  `void`
  `setStroke(Stroke s)`
  `void`
  `setTransform(AffineTransform Tx)`
  `void`
  `setXORMode(Color c1)`
  `void`
  `shear(double shx, double shy)`
  `String`
  `toString()`
  `void`
  `transform(AffineTransform Tx)`
  `void`
  `translate(double tx, double ty)`
  `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 Graphics2D delegate

- ## Constructor Details

  - ### NonClearGraphics2D

    public NonClearGraphics2D(Graphics2D 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 NonClearGraphics2D create()
    Specified by:
      `create` in class `Graphics`

  - ### create

    public NonClearGraphics2D create(int x, int y, int width, int height)
    Overrides:
      `create` 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`

  - ### draw3DRect

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

  - ### drawRoundRect

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

  - ### fill3DRect

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

  - ### fillRoundRect

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

  - ### draw

    public void draw(Shape s)
    Specified by:
      `draw` in class `Graphics2D`

  - ### drawImage

    public boolean drawImage(Image img, AffineTransform xform, ImageObserver obs)
    Specified by:
      `drawImage` in class `Graphics2D`

  - ### drawImage

    public void drawImage(BufferedImage img, BufferedImageOp op, int x, int y)
    Specified by:
      `drawImage` in class `Graphics2D`

  - ### drawOval

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

  - ### drawRenderedImage

    public void drawRenderedImage(RenderedImage img, AffineTransform xform)
    Specified by:
      `drawRenderedImage` in class `Graphics2D`

  - ### 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`

  - ### drawRenderableImage

    public void drawRenderableImage(RenderableImage img, AffineTransform xform)
    Specified by:
      `drawRenderableImage` in class `Graphics2D`

  - ### drawString

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

  - ### fillArc

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

  - ### drawString

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

  - ### drawPolyline

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

  - ### drawString

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

  - ### drawPolygon

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

  - ### drawString

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

  - ### 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`

  - ### drawGlyphVector

    public void drawGlyphVector(GlyphVector g, float x, float y)
    Specified by:
      `drawGlyphVector` in class `Graphics2D`

  - ### fillPolygon

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

  - ### fill

    public void fill(Shape s)
    Specified by:
      `fill` in class `Graphics2D`

  - ### hit

    public boolean hit(Rectangle rect, Shape s, boolean onStroke)
    Specified by:
      `hit` in class `Graphics2D`

  - ### drawChars

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

  - ### getDeviceConfiguration

    public GraphicsConfiguration getDeviceConfiguration()
    Specified by:
      `getDeviceConfiguration` in class `Graphics2D`

  - ### setComposite

    public void setComposite(Composite comp)
    Specified by:
      `setComposite` in class `Graphics2D`

  - ### drawBytes

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

  - ### setPaint

    public void setPaint(Paint paint)
    Specified by:
      `setPaint` in class `Graphics2D`

  - ### drawImage

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

  - ### setStroke

    public void setStroke(Stroke s)
    Specified by:
      `setStroke` in class `Graphics2D`

  - ### setRenderingHint

    public void setRenderingHint(RenderingHints.Key hintKey, Object hintValue)
    Specified by:
      `setRenderingHint` in class `Graphics2D`

  - ### getRenderingHint

    public Object getRenderingHint(RenderingHints.Key hintKey)
    Specified by:
      `getRenderingHint` in class `Graphics2D`

  - ### drawImage

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

  - ### setRenderingHints

    public void setRenderingHints(Map<?,?> hints)
    Specified by:
      `setRenderingHints` in class `Graphics2D`

  - ### addRenderingHints

    public void addRenderingHints(Map<?,?> hints)
    Specified by:
      `addRenderingHints` in class `Graphics2D`

  - ### getRenderingHints

    public RenderingHints getRenderingHints()
    Specified by:
      `getRenderingHints` in class `Graphics2D`

  - ### drawImage

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

  - ### translate

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

  - ### translate

    public void translate(double tx, double ty)
    Specified by:
      `translate` in class `Graphics2D`

  - ### rotate

    public void rotate(double theta)
    Specified by:
      `rotate` in class `Graphics2D`

  - ### drawImage

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

  - ### rotate

    public void rotate(double theta, double x, double y)
    Specified by:
      `rotate` in class `Graphics2D`

  - ### scale

    public void scale(double sx, double sy)
    Specified by:
      `scale` in class `Graphics2D`

  - ### shear

    public void shear(double shx, double shy)
    Specified by:
      `shear` in class `Graphics2D`

  - ### 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`

  - ### transform

    public void transform(AffineTransform Tx)
    Specified by:
      `transform` in class `Graphics2D`

  - ### setTransform

    public void setTransform(AffineTransform Tx)
    Specified by:
      `setTransform` in class `Graphics2D`

  - ### getTransform

    public AffineTransform getTransform()
    Specified by:
      `getTransform` in class `Graphics2D`

  - ### 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`

  - ### getPaint

    public Paint getPaint()
    Specified by:
      `getPaint` in class `Graphics2D`

  - ### getComposite

    public Composite getComposite()
    Specified by:
      `getComposite` in class `Graphics2D`

  - ### setBackground

    public void setBackground(Color color)
    Specified by:
      `setBackground` in class `Graphics2D`

  - ### getBackground

    public Color getBackground()
    Specified by:
      `getBackground` in class `Graphics2D`

  - ### getStroke

    public Stroke getStroke()
    Specified by:
      `getStroke` in class `Graphics2D`

  - ### clip

    public void clip(Shape s)
    Specified by:
      `clip` in class `Graphics2D`

  - ### getFontRenderContext

    public FontRenderContext getFontRenderContext()
    Specified by:
      `getFontRenderContext` in class `Graphics2D`

  - ### 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`