Exemplo n.º 1
0
    public void QuadraticCurveTo(Vector2 ctrl, Vector2 to)
    {
        var pfCtrl = PFUnityConv.PFVector2F(ctrl);
        var pfTo   = PFUnityConv.PFVector2F(to);

        PF.PFPathQuadraticCurveTo(handle, ref pfCtrl, ref pfTo);
    }
Exemplo n.º 2
0
    public void Ellipse(Vector2 center, Vector2 axes, float rotation, float startAngle, float endAngle)
    {
        var pfCenter = PFUnityConv.PFVector2F(center);
        var pfAxes   = PFUnityConv.PFVector2F(axes);

        PF.PFPathEllipse(handle, ref pfCenter, ref pfAxes, rotation, startAngle, endAngle);
    }
Exemplo n.º 3
0
    public void StrokeText(PFString str, Vector2 position)
    {
        EnsureHandleIsValid();
        var pfVector = PFUnityConv.PFVector2F(position);

        PF.PFCanvasStrokeText(handle, str.handle, str.len, ref pfVector);
    }
Exemplo n.º 4
0
    public void BezierCurveTo(Vector2 ctrl0, Vector2 ctrl1, Vector2 to)
    {
        var pfCtrl0 = PFUnityConv.PFVector2F(ctrl0);
        var pfCtrl1 = PFUnityConv.PFVector2F(ctrl1);
        var pfTo    = PFUnityConv.PFVector2F(to);

        PF.PFPathBezierCurveTo(handle, ref pfCtrl0, ref pfCtrl1, ref pfTo);
    }
Exemplo n.º 5
0
    public void LineTo(Vector2 to)
    {
        var pfTo = PFUnityConv.PFVector2F(to);

        PF.PFPathLineTo(handle, ref pfTo);
    }
Exemplo n.º 6
0
    public PFCanvas(PFCanvasFontContext fontContext, Vector2 size)
    {
        var pfSize = PFUnityConv.PFVector2F(size);

        handle = PF.PFCanvasCreate(fontContext.handle, ref pfSize);
    }