void BufferFigureVC(UFigure f, UBrush brush, bool open, bool doublepoints) { Point stp = f.startPoint; foreach (var g in f.geoElements) { PlotGeoElement(ref stp, g, brush, doublepoints); } if (!open) { setVC(brush, stp.X, stp.Y); setVC(brush, f.startPoint.X, f.startPoint.Y); } }
public override void DrawBase(IDraw renderArgument, Region dirty) { Rectangle dr = DisplayRectangle; float gx = dr.width / 4; float gy = dr.height / 4; Point a1, a2, a3; switch (type) { case Direction.u: a1 = new Point(dr.left + gx, dr.top + 3 * gy); a2 = new Point(dr.left + 3 * gx, dr.top + 3 * gy); a3 = new Point(dr.left + 2 * gx, dr.top + gy); break; case Direction.d: a1 = new Point(dr.left + gx, dr.top + gy); a2 = new Point(dr.left + 3 * gx, dr.top + gy); a3 = new Point(dr.left + 2 * gx, dr.top + 3 * gy); break; case Direction.l: a1 = new Point(dr.left + 3 * gx, dr.top + gy); a2 = new Point(dr.left + 3 * gx, dr.top + 3 * gy); a3 = new Point(dr.left + gx, dr.top + 2 * gy); break; case Direction.r: a1 = new Point(dr.left + gx, dr.top + gy); a2 = new Point(dr.left + gx, dr.top + 3 * gy); a3 = new Point(dr.left + 3 * gx, dr.top + 2 * gy); break; default: throw new NotImplementedException("what direction?"); } renderArgument.uDraw.FillRoundedRectangle(DisplayRectangle, 3, 3, butBrsh); UPath arr = new UPath(); UFigure fig = new UFigure(a1, true, false); fig.geoElements.Add(new ULine(a2)); fig.geoElements.Add(new ULine(a3)); fig.geoElements.Add(new ULine(a1)); arr.figures.Add(fig); renderArgument.uDraw.FillPath(arr, butArrF); }