Exemplo n.º 1
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
 }
Exemplo n.º 2
0
 public void draw(DrawContext con)
 {
     r.X = con.x;
     r.Y = con.y;
     con.DrawImage(img, con.x, con.y);
 }
Exemplo n.º 3
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
 }
Exemplo n.º 4
0
 public void draw(DrawContext con)
 {
     r.X = con.x;
     r.Y = con.y;
     if (back != null)
         con.FillRectangle(r, back);
     if (rand != null)
         con.DrawRectangle(r, rand);
     con.x += offx;
     con.y += offy;
     text.draw(con);
     con.x -= offx;
     con.y -= offy;
 }
Exemplo n.º 5
0
 public void drawAgain(DrawContext con)
 {
     titel.drawAgain(con);
     if (ausgeklappt)
         kasten.drawAgain(con);
 }
Exemplo n.º 6
0
        public void draw(DrawContext con)
        {
            float breite = con.getBreite();

            #region höhen und tabs punktieren
            for (int i = 0; i < hohh.Length; i++)
            {
                hohh[i] += con.y;
            }
            for (int i = 0; i < tabb.Length; i++)
            {
                tabb[i] += con.x;
            }
            #endregion
            DrawContext con2 = con.createChild(tabb, hohh, con.x, con.y, con.zeit);//con.rahmenArt, con.variante,
            #region DEBUG
            #if DEBUG_CSTRING
            {
                for (int i = 0; i < hohh.Length; i++)
                {
                    con.DrawLine(Pens.Red, con.x, hohh[i], con.x + breite, hohh[i]);
                }
                for (int i = 0; i < tabb.Length; i++)
                {
                    con.DrawLine(Pens.Red, tabb[i], hohh.First(), tabb[i], hohh.Last());
                }
            }
            #endif
            #endregion
            {
                float niveau = 0;
                IEnumerator<IDrawable> en = list.GetEnumerator();
                while (en.MoveNext())
                {
                    if (en.Current.getBenutzteBreite(con2.getBreite()) + con2.x > tabb[con2.i + 1 + en.Current.getTabs()] + 1)
                    {
                        con2.y += niveau;
                        niveau = 0;// Diese zeile fehlte! (Bug entdeckt: 06.06.2014)
                        con2.x = tabb[con2.i];
                    }
                    en.Current.draw(con2);
                    niveau = Math.Max(niveau, en.Current.getHeight(con2.getBreite()));
                    con2.x += en.Current.getBenutzteBreite(con2.getBreite());
                    if (en.Current.getTabs() > 0)
                    {
                        niveau = 0;
                        con2.i += en.Current.getTabs();
                        con2.x = tabb[con2.i];
                        con2.y = hohh[con2.j];
                    }
                    if (en.Current.neueZeile())
                    {
                        niveau = 0;
                        con2.i = 0;
                        con2.j++;
                        con2.y = con2.hohh[con2.j];
                        con2.x = con2.tabb[con2.i];
                    }
                }
            }
        }
Exemplo n.º 7
0
 public void draw(DrawContext con)
 {
     r.X = con.x;
     r.Y = con.y;
     #if DEBUG_CSTRING
     con.DrawDebugWhiteSpace(con.x, con.y + r.Height, con.x + r.Width, con.y + r.Height);
     #endif
 }
Exemplo n.º 8
0
 public void draw(DrawContext con)
 {
 }
Exemplo n.º 9
0
 public void draw(DrawContext con)
 {
     r.X = con.x;
     r.Y = con.y;
     this.drawImage(con);
 }
Exemplo n.º 10
0
 public void drawRand(DrawContext con)
 {
     if (!an)
         return;
     if ((art & 4) != 0)
         con.DrawLine(p, r.X, r.Bottom, r.Right, r.Bottom);
     if ((art & 8) != 0)
         con.DrawLine(p, r.X, r.Y + r.Height / 2, r.Right, r.Y + r.Height / 2);
     if ((art & 16) != 0)
         con.DrawLine(p, r.X, r.Y, r.Right, r.Y);
     if ((art & 32) != 0)
         con.DrawRectangle(r, p);
 }
Exemplo n.º 11
0
 public void drawAgain(DrawContext con)
 {
     text.drawAgain(con);
 }
Exemplo n.º 12
0
 public void draw(DrawContext con)
 {
     text.draw(con);
 }
Exemplo n.º 13
0
 public void drawAgain(DrawContext con)
 {
     for (int i = 0; i < p; i++)
         layer[i].drawAgain(con);
 }
Exemplo n.º 14
0
 public void draw(DrawContext con)
 {
     r.X = con.x;
     r.Y = con.y;
     DrawContext con2;
     for (int i = 0; i < p; i++)
     {
         con2 = con.createChild(new float[] { 0, r.Width - X[i] }, new float[] { 0, r.Height - Y[i] }, X[i] + r.X, Y[i] + r.Y, con.zeit);
         layer[i].draw(con2);
     }
     #if DEBUG_CSTRING
     con.DrawRectangle(r, Pens.Gray);
     #endif
 }
Exemplo n.º 15
0
 public void draw(DrawContext con)
 {
     con.DrawLine(p, con.tabb[0], con.y, con.tabb.Last(), con.y);
 }
Exemplo n.º 16
0
 public void draw(DrawContext con)
 {
     r.X = con.x;
     r.Y = con.y;
     con.DrawImage(img, con.x, con.y, r.Width, r.Height);
 }
Exemplo n.º 17
0
 public void drawAgain(DrawContext con)
 {
     //con.FillRectangle(r, Brushes.White);
     this.drawImage(con);
 }
Exemplo n.º 18
0
 public void draw(DrawContext con)
 {
     con.DrawLine(p, con.x, con.hohh[con.j], con.x, con.hohh[con.j + 1]);
 }
Exemplo n.º 19
0
 private void drawImage(DrawContext con)
 {
     //System.Windows.Forms.MessageBox.Show(r.X + " , " + r.Y);
     int t = (int)Math.Abs(Math.Sin(con.zeit) * 255);
     con.FillRectangle(r, new SolidBrush(Color.FromArgb(255, t, t, t)));
 }
Exemplo n.º 20
0
 public void drawAgain(DrawContext con)
 {
 }
Exemplo n.º 21
0
        public void drawAgain(DrawContext con)
        {
            p.DashOffset = 15 * con.zeit;
            //con.FillRectangle(r, Brushes.White);
            //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;
            //}
            con.DrawRectangle(r, con.penBackground);

            drawRand(con);
        }
Exemplo n.º 22
0
 public void drawAgain(DrawContext con)
 {
     foreach (IDrawable item in list)
         item.drawAgain(con);
 }
Exemplo n.º 23
0
 public void draw(DrawContext con)
 {
     r.X = con.x;
     r.Y = con.y;
     titel.draw(con);
     if (ausgeklappt)
     {
         con.y += titel.getHeight(r.Width);
         kasten.draw(con);
         //con.y -= titel.getHeight(r.Width);
     }
     #if DEBUG_CSTRING
     con.DrawRectangle(r, Pens.Green);
     #endif
 }