Example #1
0
 public override void DrawRoundedLine(PBrush c, float width, PointF p1, PointF p2)
 {
     using (Brush b = GetBrush(c))
     {
         StrokeStyle style = new StrokeStyle(factory, new StrokeStyleProperties()
         {
             StartCap = CapStyle.Round,
             EndCap   = CapStyle.Round
         });
         renderTarget.DrawLine(p1.ToVector(), p2.ToVector(), b, width, style);
         style.Dispose();
     }
 }
Example #2
0
 public override void DrawLine(gdi.Color c, float width, PointF p1, PointF p2, bool capStart = false, bool capEnd = false)
 {
     using (Brush b = new SolidColorBrush(renderTarget, c.ToColor4()))
     {
         CapStyle    start = capStart ? CapStyle.Triangle : CapStyle.Flat;
         CapStyle    end   = capEnd ? CapStyle.Triangle : CapStyle.Flat;
         StrokeStyle style = new StrokeStyle(factory, new StrokeStyleProperties()
         {
             StartCap = start,
             EndCap   = end
         });
         renderTarget.DrawLine(p1.ToVector(), p2.ToVector(), b, width, style);
         style.Dispose();
     }
 }