org.vishia.gral.awt

## Class AwtCanvasDrawer

- java.lang.Object
- - org.vishia.gral.awt.AwtCanvasDrawer

- All Implemented Interfaces:
    GralCanvas_ifc

      public class AwtCanvasDrawer
      extends java.lang.Object
      implements GralCanvas_ifc

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private java.awt.Graphics` | `graphicContext`
    `private AwtWidgetMng` | `widgMng`

    - ### Fields inherited from interface org.vishia.gral.ifc.GralCanvas_ifc

      `version`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AwtCanvasDrawer(AwtWidgetMng widgMng, java.awt.Graphics graphicContext)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `drawImage(GralImageBase image, int x, int y, int dx, int dy, GralRectangle imagePixelSize)`
    `void` | `drawLine(GralColor color, int x1, int y1, int x2, int y2)` Accepts a order to draw a line.
    `void` | `drawText(java.lang.String text)`
    `void` | `setTextStyle(GralColor color, GralFont font, int origin)`

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

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

- - ### Field Detail

    - #### graphicContext

          private final java.awt.Graphics graphicContext

    - #### widgMng

          private final AwtWidgetMng widgMng

  - ### Constructor Detail

    - #### AwtCanvasDrawer

          AwtCanvasDrawer(AwtWidgetMng widgMng,
                          java.awt.Graphics graphicContext)

  - ### Method Detail

    - #### drawImage

          public void drawImage(GralImageBase image,
                                int x,
                                int y,
                                int dx,
                                int dy,
                                GralRectangle imagePixelSize)

      Specified by:
        `drawImage` in interface `GralCanvas_ifc`

    - #### drawLine

          public void drawLine(GralColor color,
                               int x1,
                               int y1,
                               int x2,
                               int y2)

      Description copied from interface: `GralCanvas_ifc`
      Accepts a order to draw a line. The coordinates are stored only. This method can be called in any thread. It is thread-safe.
      Specified by:
        `drawLine` in interface `GralCanvas_ifc`
        `x1` - TODO yet it is pixel coordinates, use GralGrid coordinates.

    - #### drawText

          public void drawText(java.lang.String text)

      Specified by:
        `drawText` in interface `GralCanvas_ifc`

    - #### setTextStyle

          public void setTextStyle(GralColor color,
                                   GralFont font,
                                   int origin)

      Specified by:
        `setTextStyle` in interface `GralCanvas_ifc`