How to use the fonteditor-core/graphics/computeBoundingBox.quadraticBezier function in fonteditor-core

To help you get started, we’ve selected a few fonteditor-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kekee000 / fonteditor-core / test / spec / graphics / computeBoundingBox.spec.js View on Github external
it('test quadraticBezier', function () {

        let result = computeBoundingBox.quadraticBezier(p0, p0, p0);
        assert.deepEqual(result, {
            x: 50,
            y: 50,
            width: 0,
            height: 0
        });

        result = computeBoundingBox.quadraticBezier(p0, p0, p1);
        assert.deepEqual(result, {
            x: 50,
            y: 50,
            width: 50,
            height: 50
        });

        result = computeBoundingBox.quadraticBezier(p0, c0, p1);
github kekee000 / fonteditor-core / test / spec / graphics / computeBoundingBox.spec.js View on Github external
it('test quadraticBezier', function () {

        let result = computeBoundingBox.quadraticBezier(p0, p0, p0);
        assert.deepEqual(result, {
            x: 50,
            y: 50,
            width: 0,
            height: 0
        });

        result = computeBoundingBox.quadraticBezier(p0, p0, p1);
        assert.deepEqual(result, {
            x: 50,
            y: 50,
            width: 50,
            height: 50
        });

        result = computeBoundingBox.quadraticBezier(p0, c0, p1);
        assert.deepEqual(result, {
            x: 50,
            y: 50,
            width: 50,
            height: 50
        });

        result = computeBoundingBox.quadraticBezier(p0, c1, p1);
github kekee000 / fonteditor-core / test / spec / graphics / computeBoundingBox.spec.js View on Github external
assert.deepEqual(result, {
            x: 50,
            y: 50,
            width: 0,
            height: 0
        });

        result = computeBoundingBox.quadraticBezier(p0, p0, p1);
        assert.deepEqual(result, {
            x: 50,
            y: 50,
            width: 50,
            height: 50
        });

        result = computeBoundingBox.quadraticBezier(p0, c0, p1);
        assert.deepEqual(result, {
            x: 50,
            y: 50,
            width: 50,
            height: 50
        });

        result = computeBoundingBox.quadraticBezier(p0, c1, p1);
        assert.deepEqual(result, {
            x: 50,
            y: 50,
            width: 90,
            height: 90
        });
    });
github kekee000 / fonteditor-core / test / spec / graphics / computeBoundingBox.spec.js View on Github external
assert.deepEqual(result, {
            x: 50,
            y: 50,
            width: 50,
            height: 50
        });

        result = computeBoundingBox.quadraticBezier(p0, c0, p1);
        assert.deepEqual(result, {
            x: 50,
            y: 50,
            width: 50,
            height: 50
        });

        result = computeBoundingBox.quadraticBezier(p0, c1, p1);
        assert.deepEqual(result, {
            x: 50,
            y: 50,
            width: 90,
            height: 90
        });
    });