예제 #1
0
 public void draw(DrawContext con)
 {
     this.r.X = con.x;
     this.r.Y = con.y;
     float tatHohe = getHeight(con.getBreite());
     float tatBreite = getBenutzteBreite(con.getBreite());
     if (back != null)
         con.FillRectangle(r, back);
     if (rand != null)
         con.DrawRectangle(r, rand);
     switch (art % 4)
     {
         case 0:
             con.DrawString(s, font.getFont(), b, con.x, con.y, r.Height);
             break;
         case 1:
             con.DrawString(s, font.getFontBold(), b, con.x, con.y, r.Height);
             break;
         case 2:
             con.DrawString(s, font.getFontItalic(), b, con.x, con.y, r.Height);
             break;
         case 3:
             con.DrawString(s, font.getFontBoldAndItalic(), b, con.x, con.y, r.Height);
             break;
     }
     if ((art & 4) != 0)
     {
         con.DrawRand(con.x, con.y + tatHohe, con.x + tatBreite, con.y + tatHohe);
     }
     if ((art & 8) != 0)
     {
         con.DrawRand(con.x, con.y + tatHohe / 2, con.x + tatBreite, con.y + tatHohe / 2);
     }
     if ((art & 16) != 0)
     {
         con.DrawRand(con.x, con.y, con.x + tatBreite, con.y);
     }
     if ((art & 32) != 0)
     {
         con.DrawRand(con.x, con.y, con.x + tatBreite, con.y);
         con.DrawRand(con.x, con.y, con.x, con.y + tatHohe);
         con.DrawRand(con.x + tatBreite, con.y, con.x + tatBreite, con.y + tatHohe);
         con.DrawRand(con.x, con.y + tatHohe, con.x + tatBreite, con.y + tatHohe);
     }
     #if DEBUG_CSTRING
     con.DrawDebugRectangle(r);
     //con.DrawDebugUnit(con.x, con.y, con.x + tatBreite, con.y);
     //con.DrawDebugUnit(con.x, con.y, con.x, con.y + tatHohe);
     //con.DrawDebugUnit(con.x + tatBreite, con.y, con.x + tatBreite, con.y + tatHohe);
     //con.DrawDebugUnit(con.x, con.y + tatHohe, con.x + tatBreite, con.y + tatHohe);
     #endif
 }
예제 #2
0
 public void draw(DrawContext con)
 {
     this.r.X = con.x;
     this.r.Y = con.y;
     switch (art % 4)
     {
         case 0:
             con.DrawString(s, font.getFont(), b, r.X, r.Y, r.Height);
             break;
         case 1:
             con.DrawString(s, font.getFontBold(), b, r.X, r.Y, r.Height);
             break;
         case 2:
             con.DrawString(s, font.getFontItalic(), b, r.X, r.Y, r.Height);
             break;
         case 3:
             con.DrawString(s, font.getFontBoldAndItalic(), b, r.X, r.Y, r.Height);
             break;
     }
     drawRand(con);
     #if DEBUG_CSTRING
     con.DrawDebugRectangle(r);
     //con.DrawDebugUnit(con.x, con.y, con.x + tatBreite, con.y);
     //con.DrawDebugUnit(con.x, con.y, con.x, con.y + tatHohe);
     //con.DrawDebugUnit(con.x + tatBreite, con.y, con.x + tatBreite, con.y + tatHohe);
     //con.DrawDebugUnit(con.x, con.y + tatHohe, con.x + tatBreite, con.y + tatHohe);
     #endif
 }