public void Add(PointF center, float radius, bool isFixed, Brush brush, Pen pen) { if (pen != null && !Toolkit.Contains(pen) && pen != DefaultPen) { Toolkit.Add(pen); } if (brush != null && !Toolkit.Contains(brush) && brush != DefaultBrush) { Toolkit.Add(brush); } Add(new CircleItem(Container, center, radius, isFixed, brush, pen)); }
//public PointF ToControlPosition(float distanceLow, float angleLow, float ptShift) //{ // angleLow += AngleOffset; // return Container.RelativeToCenter(distanceLow, angleLow, ptShift); //} public CircledPathes AddLines(float distance, float angleOffset, float length, float step, Pen pen, AngleFilterDelegate filter, bool isFixed) { if (!Toolkit.Contains(pen) && pen != null) { Toolkit.Add(pen); } int repetition = (int)(360 / step); //path.AddLine(-0.5f * length * Container.UnitSize, 0, 0.5f * length * Container.UnitSize, 0); GraphicsPath path = new GraphicsPath(); path.AddLine(-0.5f * length, 0, 0.5f * length, 0); CircledPathes lines = new CircledPathes(Container, path, distance, angleOffset, 0, repetition, filter, isFixed, null, pen); Add(lines); return(lines); }
public List <AngledLabel> AddLables(List <String> lables, Font font, Brush fontBrush, float distance, float offset, float rotation, Brush brush, Pen pen) { if (font == null || fontBrush == null) { throw new ArgumentNullException(); } if (!Toolkit.Contains(font)) { Toolkit.Add(font); } if (!Toolkit.Contains(fontBrush)) { Toolkit.Add(fontBrush); } if (pen != null && !Toolkit.Contains(pen)) { Toolkit.Add(pen); } if (brush != null && !Toolkit.Contains(brush)) { Toolkit.Add(brush); } int repetition = lables.Count; float step = (360 / repetition); float angle; List <AngledLabel> labels = new List <AngledLabel>(); for (int i = 0; i < repetition; i++) { angle = i * step + offset; AngledLabel label = new AngledLabel(Container, lables[i], font, fontBrush, distance, angle, rotation, brush, pen); Add(label); labels.Add(label); } return(labels); }
public List <AngledLabel> AddLables(Font font, Brush fontBrush, float distance, float angleOffset, float rotation, int repetition, Brush brush, Pen pen) { if (font == null || fontBrush == null) { throw new ArgumentNullException(); } if (!Toolkit.Contains(font)) { Toolkit.Add(font); } if (!Toolkit.Contains(fontBrush)) { Toolkit.Add(fontBrush); } if (!Toolkit.Contains(pen) && pen != null) { Toolkit.Add(pen); } if (!Toolkit.Contains(brush) && brush != null) { Toolkit.Add(brush); } float angle; float step = 360f / repetition; List <AngledLabel> labels = new List <AngledLabel>(); for (int i = 0; i < repetition; i++) { angle = i * step + angleOffset; AngledLabel label = new AngledLabel(Container, angle.ToString(), font, fontBrush, distance, angle, rotation, brush, pen); Add(label); labels.Add(label); } return(labels); }
public CircledPathes AddPathSet(GraphicsPath path, float distance, float angleOffset, int repetition, bool isFixed, Brush brush, Pen pen) { if (path == null) { throw new ArgumentNullException(); } if (!Toolkit.Contains(pen) && pen != null) { Toolkit.Add(pen); } if (!Toolkit.Contains(brush) && brush != null) { Toolkit.Add(brush); } CircledPathes pathSet = new CircledPathes(Container, path, distance, 0, 0, repetition, null, isFixed, brush, pen); Add(pathSet); return(pathSet); }
public AngledPath AddPath(GraphicsPath path, float distance, float angle, float rotation, bool isFixed, Brush brush, Pen pen) { if (path == null) { throw new ArgumentNullException(); } if (!Toolkit.Contains(pen) && pen != null) { Toolkit.Add(pen); } if (!Toolkit.Contains(brush) && brush != null) { Toolkit.Add(brush); } AngledPath pathItem = new AngledPath(Container, path, distance, angle, rotation, isFixed, brush, pen); Add(pathItem); return(pathItem); }