    001package org.vishia.gral.awt;
    002
    003import java.awt.*;
    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 AwtCanvasDrawer implements GralCanvas_ifc
    011{
    012
    013  private final Graphics graphicContext;
    014
    015  private final AwtWidgetMng widgMng;
    016
    017  AwtCanvasDrawer(AwtWidgetMng widgMng, Graphics 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.setColor(widgMng.getColorImpl(color));
    035    graphicContext.drawLine(x1, y1, x2, y2);
    036    //graphicContext.drawPolyline(null, null, y2);
    037
    038  }
    039
    040  @Override
    041  public void drawText(String text)
    042  {
    043    // TODO Auto-generated method stub
    044
    045  }
    046
    047  @Override
    048  public void setTextStyle(GralColor color, GralFont font, int origin)
    049  {
    050    // TODO Auto-generated method stub
    051
    052  }
    053
    054}
    055