Пример #1
0
 // =====================================================================
 public void DrawRectangle(Rect theRect, ILineStyleInfo theStyle)
 {
     mGraphics.DrawRectangle(((GDIPlusLineStyle)theStyle).Pen, theRect.GetRectangle());
 }
Пример #2
0
 public void Clear(Rect Area)
 {
     API.FillRectangle(hDC, mBackColor, Area.GetRectangle());
 }
Пример #3
0
 public void GradientFillRectangle(Rect theRect, Color Color1, Color Color2, LinearGradientMode GradientType)
 {
     Rectangle R = theRect.GetRectangle();
     Brush b = new LinearGradientBrush(R, Color1, Color2, GradientType);
     mGraphics.FillRectangle(b, R);
 }
Пример #4
0
 public void FillRectangle(Rect theRect, Color fillColor)
 {
     SolidBrush b = new SolidBrush(fillColor);
     mGraphics.FillRectangle(b, theRect.GetRectangle());
     b.Dispose();
 }
Пример #5
0
 public void FillRectangle(Rect theRect, IFillStyleInfo theStyle)
 {
     switch (theStyle.Mode)
     {
         case GuiLabs.Canvas.DrawStyle.FillMode.Solid:
             mGraphics.FillRectangle(
                 ((GDIPlusFillStyle)theStyle).Brush,
                 theRect.GetRectangle());
             break;
         case GuiLabs.Canvas.DrawStyle.FillMode.HorizontalGradient:
             GradientFillRectangle(
                 theRect,
                 theStyle.FillColor,
                 theStyle.GradientColor,
                 LinearGradientMode.Horizontal);
             break;
         case GuiLabs.Canvas.DrawStyle.FillMode.VerticalGradient:
             GradientFillRectangle(
                 theRect,
                 theStyle.FillColor,
                 theStyle.GradientColor,
                 LinearGradientMode.Vertical);
             break;
         default:
             break;
     }
 }
Пример #6
0
 public void FillEllipse(Rect theRect, Color fillColor)
 {
     mGraphics.FillEllipse(new SolidBrush(fillColor), theRect.GetRectangle());
 }
Пример #7
0
 public void FillRectangle(Rect theRect, System.Drawing.Color fillColor)
 {
     if (fillColor != System.Drawing.Color.Transparent)
     {
         API.FillRectangle(hDC, fillColor, theRect.GetRectangle());
     }
 }