    001package org.vishia.gral.swt;
    002
    003import org.eclipse.swt.graphics.GC;
    004import org.vishia.gral.ifc.GralCanvas_ifc;
    005import org.vishia.gral.ifc.GralColor;
    006import org.vishia.gral.ifc.GralFont;
    007import org.vishia.gral.ifc.GralImageBase;
    008import org.vishia.gral.ifc.GralRectangle;
    009
    010public class SwtCanvasDrawer implements GralCanvas_ifc
    011{
    012
    013  private final GC graphicContext;
    014
    015  private final SwtMng widgMng;
    016
    017  SwtCanvasDrawer(SwtMng widgMng, GC graphicContext){
    018    this.widgMng = widgMng;
    019    this.graphicContext = graphicContext;
    020  }
    021
    022
    023  @Override
    024  public void drawImage(GralImageBase image, int x, int y, int dx, int dy,
    025    GralRectangle imagePixelSize)
    026  {
    027    // TODO Auto-generated method stu
    028
    029  }
    030
    031  @Override
    032  public void drawLine(GralColor color, int x1, int y1, int x2, int y2)
    033  {
    034    graphicContext.setForeground(widgMng.getColorImpl(color));
    035    graphicContext.drawLine(x1, y1, x2, y2);
    036
    037  }
    038
    039  @Override
    040  public void drawText(String text)
    041  {
    042    // TODO Auto-generated method stub
    043
    044  }
    045
    046  @Override
    047  public void setTextStyle(GralColor color, GralFont font, int origin)
    048  {
    049    // TODO Auto-generated method stub
    050
    051  }
    052
    053}