org.vishia.gral.ifc

## Interface GralCanvas_ifc

- All Known Implementing Classes:
    AwtCanvasDrawer, GralCanvasStorage, SwtCanvasDrawer

      public interface GralCanvas_ifc

  This interface is used to free-draw on a canvas area. It is implemented by the `GralCanvasStorage` and by implementation classes.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `version` Version and history: 2011-11-01 Created.

  - ### Method Summary

    All Methods Instance Methods Abstract 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)`

- - ### Field Detail

    - #### version

          static final int version

      Version and history:
      - 2011-11-01 Created. It is necessary to build common use-able widgets on gral level, it may be usefully to draw and paint on user level. Therefore this universal interface is need.
      /**Version, history and license.
      - 2011-06-00 Hartmut created
      Copyright/Copyleft:
      For this source the LGPL Lesser General Public License, published by the Free Software Foundation is valid. It means:
      1. You can use this source without any restriction for any desired purpose.
      2. You can redistribute copies of this source to everybody.
      3. Every user of this source, also the user of redistribute copies with or without payment, must accept this license for further using.
      4. But the LPGL is not appropriate for a whole software product, if this source is only a part of them. It means, the user must publish this part of source, but doesn't need to publish the whole source of the own product.
      5. You can study and modify (improve) this source for own using or for redistribution, but you have to license the modified sources likewise under this LGPL Lesser General Public License. You mustn't delete this Copyright/Copyleft inscription in this source file.
      If you intent to use this source without publishing its usage, you can get a second license subscribing a special contract with the author.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### drawLine

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

      Accepts a order to draw a line. The coordinates are stored only. This method can be called in any thread. It is thread-safe.
      Parameters:
        `color` -
        `x1` - TODO yet it is pixel coordinates, use GralGrid coordinates.
        `y1` -
        `x2` -
        `y2` -

    - #### drawImage

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

    - #### setTextStyle

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

    - #### drawText

          void drawText(java.lang.String text)