Example #1
0
 private void DrawMySelf(Graphics g)
 {
     if (Caption.Length > 0)
     {
         g.DrawString(Caption, TextFont.ToFont()
                      , new SolidBrush(TextColor.ToColor()), Boundary.Location.X + 3, Boundary.Location.Y + 3);
     }
 }
Example #2
0
        private void CalculateBoundary()
        {
            Font      font = TextFont.ToFont();
            SizeF     size = BaseCanvas.Canvas.CreateGraphics().MeasureString(Caption, font);
            Rectangle rect = new Rectangle(Boundary.X - 10, Boundary.Y + 10, (int)size.Width + 5, (int)size.Height + 5);

            Boundary = rect;
        }