Пример #1
0
    public GraphicLine(string name, int x1, int y1, int x2, int y2, uint color, int width)
        :base(name, x1,y1, x2-x1, y2-y1)
	{
        fLine = new LineG(new Point(x1, y1), new Point(x2, y2));

		fWidth = width;
		fColor = color;

		// The weight is in points, so we need to convert to local units.
		// In this case, we'll go with inches.
        fPen = new GDIPen(PenType.Geometric, PenStyle.Solid, PenJoinStyle.Round, PenEndCap.Round, color, Frame.Width, Guid.NewGuid());
	}
Пример #2
0
	public virtual void DrawLine(LineG aLine, Pen pen)
	{
        SaveState();

		SelectObject(pen);

		MoveTo(aLine.StartPoint.x, aLine.StartPoint.y);
		LineTo(aLine.EndPoint);

        RestoreState();
    }