예제 #1
0
 public override void DrawRect(LGuiRect Rect, LGuiColor Color, bool IsFill, bool IsRound)
 {
     if (IsRound)
     {
         if (IsFill)
         {
             Device_.FillPath(BrushCache.GetOrCreate(Color),
                              GenerateRectPath((int)Rect.X, (int)Rect.Y, (int)Rect.Width, (int)Rect.Height, 10, 10));
         }
         else
         {
             Device_.DrawPath(PenCache.GetOrCreate(Color),
                              GenerateRectPath((int)Rect.X, (int)Rect.Y, (int)Rect.Width, (int)Rect.Height, 10, 10));
         }
     }
     else
     {
         if (IsFill)
         {
             Device_.FillRectangle(BrushCache.GetOrCreate(Color),
                                   new Rectangle((int)Rect.X, (int)Rect.Y, (int)Rect.Width, (int)Rect.Height));
         }
         else
         {
             Device_.DrawRectangle(PenCache.GetOrCreate(Color),
                                   new Rectangle((int)Rect.X, (int)Rect.Y, (int)Rect.Width, (int)Rect.Height));
         }
     }
 }
예제 #2
0
 public override void DrawTriangle(LGuiVec2 Vert1, LGuiVec2 Vert2, LGuiVec2 Vert3, LGuiColor Color, bool IsFill)
 {
     if (IsFill)
     {
         Device_.FillPath(BrushCache.GetOrCreate(Color), GenerateTrianglePath((int)Vert1.X, (int)Vert1.Y, (int)Vert2.X, (int)Vert2.Y, (int)Vert3.X, (int)Vert3.Y));
     }
     else
     {
         Device_.DrawPath(PenCache.GetOrCreate(Color), GenerateTrianglePath((int)Vert1.X, (int)Vert1.Y, (int)Vert2.X, (int)Vert2.Y, (int)Vert3.X, (int)Vert3.Y));
     }
 }
예제 #3
0
 public override void DrawCircle(LGuiVec2 Center, float Radius, LGuiColor Color, bool IsFill)
 {
     if (IsFill)
     {
         Device_.FillEllipse(BrushCache.GetOrCreate(Color),
                             new Rectangle((int)(Center.X - Radius), (int)(Center.Y - Radius), (int)(Radius * 2), (int)(Radius * 2)));
     }
     else
     {
         Device_.DrawEllipse(PenCache.GetOrCreate(Color),
                             new Rectangle((int)(Center.X - Radius), (int)(Center.Y - Radius), (int)(Radius * 2), (int)(Radius * 2)));
     }
 }
예제 #4
0
 public override void DrawLine(LGuiVec2 BeginPos, LGuiVec2 EndPos, LGuiColor Color)
 {
     Device_.DrawLine(PenCache.GetOrCreate(Color), BeginPos.X, BeginPos.Y, EndPos.X, EndPos.Y);
 }