Class CanvasSWT

  • All Implemented Interfaces:
    Canvas

    public class CanvasSWT
    extends Object
    implements Canvas
    • Constructor Detail

      • CanvasSWT

        public CanvasSWT​(org.eclipse.swt.graphics.GC graphic)
        Creates a new instance of Pencil2dAWT. A Pencil2dAWT provides an implementation for drawing wafer sites on an SWT GC (Graphic Context).
    • Method Detail

      • dispose

        public void dispose()
      • drawString

        public void drawString​(int x,
                               int y,
                               String text)
        Description copied from interface: Canvas
        Draws a text.
        Specified by:
        drawString in interface Canvas
        Parameters:
        x - x value of the text.
        y - y value of the text.
        text - text to be displayed.
      • drawRect

        public void drawRect​(Color color,
                             int x,
                             int y,
                             int width,
                             int height,
                             boolean border)
        Description copied from interface: Canvas
        Draws a rectangle.
        Specified by:
        drawRect in interface Canvas
        x - x value of the square.
        y - y value of the square.
        width - width of the square.
        height - heigth of the square.
      • drawRect

        public void drawRect​(Color color,
                             int x,
                             int y,
                             int width,
                             int height)
        Description copied from interface: Canvas
        Draws a rectangle.
        Specified by:
        drawRect in interface Canvas
      • drawDot

        public void drawDot​(Color color,
                            int x,
                            int y)
        Description copied from interface: Canvas
        Draws a dot, represented by a small rectangle.
        Specified by:
        drawDot in interface Canvas
        Parameters:
        color - the pixel.
        x - x value of the dot.
        y - y value of the dot.
      • drawOval

        public void drawOval​(Color color,
                             int x,
                             int y,
                             int width,
                             int height)
        Description copied from interface: Canvas
        Draws an oval.
        Specified by:
        drawOval in interface Canvas
        x - x value of the oval center.
        y - y value of the oval center.
        width - width of the wafer circle.
        height - height of the wafer circle.
      • drawBackground

        public void drawBackground​(Color color,
                                   int width,
                                   int heigth)
        Description copied from interface: Canvas
        Draws the picture background in the given color.
        Specified by:
        drawBackground in interface Canvas
        Parameters:
        color - the background color.
        width - width of the picture.
        heigth - height of the picture.
      • toSWTColor

        public org.eclipse.swt.graphics.Color toSWTColor​(Color color)
        Converts a Imaging Color into a SWT Color. Note that SWT colors do not have an alpha channel.