Exemple #1
0
 public void drawText(textAction action, Graphics gr)
 {
     char text = action.text;
     Font font = action.font;
     Point startPoint = action.startPoint;
     SolidBrush brush = action.brush;
     gr.DrawString("" + text, font, brush, startPoint, StringFormat.GenericTypographic);
 }
Exemple #2
0
 public override void Letter(SketchControl s, char c)
 {
     Graphics gr = s.MakeBitmapGraphics();
     if (c.ToString() == " ")
         startpoint.X += (int) Math.Round(0.3 * font.Size);
     else
     {
         textAction textAction = new textAction(c, font, startpoint, brush, 0);
         s.sketch.stuff.Add(textAction);
         s.sketch.undo.Push(textAction);
         s.sketch.redo.Clear();
         startpoint.X += (int)gr.MeasureString("" + c, font, this.startpoint, StringFormat.GenericTypographic).Width;
         s.Invalidate();
     }
 }