struct CCL::IGraphicsPath

Overview

A path stores a sequence of graphical shapes. More…

#include <igraphicspath.h>

struct IGraphicsPath: public CCL::IUnknown
{
    // enums

    enum FillMode;
    enum TypeHint;

    // methods

    virtual void CCL_API setFillMode (FillMode fillMode) = 0;
    virtual void CCL_API getBounds (Rect& bounds) const = 0;
    virtual void CCL_API getBounds (RectF& bounds) const = 0;
    virtual void CCL_API transform (TransformRef matrix) = 0;
    virtual void CCL_API startFigure (PointRef p) = 0;
    virtual void CCL_API startFigure (PointFRef p) = 0;
    virtual void CCL_API closeFigure () = 0;
    virtual void CCL_API lineTo (PointRef p) = 0;
    virtual void CCL_API lineTo (PointFRef p) = 0;
    virtual void CCL_API addRect (RectRef rect) = 0;
    virtual void CCL_API addRect (RectFRef rect) = 0;
    virtual void CCL_API addRoundRect (RectRef rect, Coord rx, Coord ry) = 0;
    virtual void CCL_API addRoundRect (RectFRef rect, CoordF rx, CoordF ry) = 0;
    virtual void CCL_API addTriangle (PointRef p1, PointRef p2, PointRef p3) = 0;
    virtual void CCL_API addTriangle (PointFRef p1, PointFRef p2, PointFRef p3) = 0;

    virtual void CCL_API addBezier (
        PointRef p1,
        PointRef c1,
        PointRef c2,
        PointRef p2
    ) = 0;

    virtual void CCL_API addBezier (
        PointFRef p1,
        PointFRef c1,
        PointFRef c2,
        PointFRef p2
    ) = 0;

    virtual void CCL_API addArc (RectRef rect, float startAngle, float sweepAngle) = 0;
    virtual void CCL_API addArc (RectFRef rect, float startAngle, float sweepAngle) = 0;
};

Inherited Members

public:
    // methods

    virtual tresult CCL_API queryInterface (UIDRef iid, void** ptr) = 0;
    virtual unsigned int CCL_API retain () = 0;
    virtual unsigned int CCL_API release () = 0;

Detailed Documentation

A path stores a sequence of graphical shapes.

Methods

virtual void CCL_API setFillMode (FillMode fillMode) = 0

Set fill mode.

Must be called before adding elements.

virtual void CCL_API getBounds (Rect& bounds) const = 0

Get bounding rectangle of path.

virtual void CCL_API getBounds (RectF& bounds) const = 0

Get bounding rectangle of path.

virtual void CCL_API transform (TransformRef matrix) = 0

Transform path.

virtual void CCL_API startFigure (PointRef p) = 0

Start new figure.

virtual void CCL_API startFigure (PointFRef p) = 0

Start new figure.

virtual void CCL_API closeFigure () = 0

Close current figure (adds line to first point).

virtual void CCL_API lineTo (PointRef p) = 0

Draw line from current position to p.

virtual void CCL_API lineTo (PointFRef p) = 0

Draw line from current position to p.

virtual void CCL_API addRect (RectRef rect) = 0

Add rectangle.

virtual void CCL_API addRect (RectFRef rect) = 0

Add rectangle.

virtual void CCL_API addRoundRect (RectRef rect, Coord rx, Coord ry) = 0

Add rounded rectangle.

virtual void CCL_API addRoundRect (RectFRef rect, CoordF rx, CoordF ry) = 0

Add rounded rectangle.

virtual void CCL_API addTriangle (PointRef p1, PointRef p2, PointRef p3) = 0

Add triangle.

virtual void CCL_API addTriangle (PointFRef p1, PointFRef p2, PointFRef p3) = 0

Add triangle.

virtual void CCL_API addBezier (
    PointRef p1,
    PointRef c1,
    PointRef c2,
    PointRef p2
) = 0

Add Bezier curve.

virtual void CCL_API addBezier (
    PointFRef p1,
    PointFRef c1,
    PointFRef c2,
    PointFRef p2
) = 0

Add Bezier curve.

virtual void CCL_API addArc (RectRef rect, float startAngle, float sweepAngle) = 0

Add arc.

Parameters:

startAngle

Specifies the clockwise angle, in degrees, between the horizontal axis of the ellipse and the starting point of the arc.

sweepAngle

Specifies the clockwise angle, in degrees, between the starting point (startAngle) and ending point of the arc.

virtual void CCL_API addArc (RectFRef rect, float startAngle, float sweepAngle) = 0

Add arc.