public static List <IDrawLite> GetCoolPoints(bool isSelected, Pen pen, List <UnitPointBulge> points) { var items = new List <IDrawLite>(); points.ForEach((point) => { if (isSelected) { //canvas.DrawDot(canvas, pen, point, (float)canvas.ToUnit(3f)); DotLite dot = new DotLite { DrawPen = pen, Point = point.Point, IsInCompensation = !point.IsBasePoint,//isInCompensation, Radius = 3.0f }; items.Add(dot); } else { //canvas.DrawDot(canvas, new SolidBrush(pen.Color), point, (float)canvas.ToUnit(3f)); DotLite dot = new DotLite { DrawBrush = new SolidBrush(pen.Color), Point = point.Point, IsInCompensation = !point.IsBasePoint,//isInCompensation, Radius = 3.0f }; items.Add(dot); } }); return(items); }
private static DataUnit CreateDot(DotLite dot, int layerId) { var p1 = dot.Point.ToPointF(); var p2 = dot.Point.Offset(0.0001, 0.0001).ToPointF(); return(new DataUnit(DataUnitTypes.PointCut, layerId, new List <PointF> { p1, p2 })); }