Example #1
0
        public void RenderClockLabel
        (
            Graphics aCanvas,
            string aCaption,
            float aBaseX,
            float aBaseY,
            Vector2D aV,
            SizeFactor aPos,
            StyleInfo aStyle,
            Font aFont,
            ClockVisualStyle aClockStyle
        )
        {
            float      TextRectSize = 100.0f;
            RectangleF TR           = new RectangleF
                                      (
                aBaseX + (aV.A * (aClockStyle.Size + aPos.Constant) * aPos.Scaled) - (TextRectSize / 2),
                aBaseY + (aV.B * (aClockStyle.Size + aPos.Constant) * aPos.Scaled) - (TextRectSize / 2),
                TextRectSize,
                TextRectSize
                                      );

            StringFormat Fmt = new StringFormat
            {
                Alignment     = StringAlignment.Center,
                LineAlignment = StringAlignment.Center
            };

            aCanvas.DrawString(aCaption, aFont, aStyle.FillBrush, TR, Fmt);
        }
Example #2
0
 public void RenderClockMark
 (
     Graphics aCanvas,
     float aBaseX,
     float aBaseY,
     Vector2D aV,
     SizeFactor aPosSize,
     StyleInfo aStyle,
     ClockVisualStyle aClockStyle
 )
 {
     aCanvas.DrawLine
     (
         aStyle.LinePen,
         aBaseX + (aV.A * aClockStyle.Size * aPosSize.Scaled),
         aBaseY + (aV.B * aClockStyle.Size * aPosSize.Scaled),
         aBaseX + (aV.A * (aClockStyle.Size + aPosSize.Constant) * aPosSize.Scaled),
         aBaseY + (aV.B * (aClockStyle.Size + aPosSize.Constant) * aPosSize.Scaled)
     );
 }