How to use the fonteditor-core/graphics/pathAdjust 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 / pathAdjust.spec.js View on Github external
it('test offset', function () {

        let result = pathAdjust(clone(path), 1, 1, 10, 10);
        assert.deepEqual(result, [
            {
                x: 60,
                y: 60
            },
            {
                x: 110,
                y: 110
            }
        ]);

        result = pathAdjust(clone(path), 2, 2, 10, 10);
        assert.deepEqual(result, [
            {
                x: 120,
                y: 120
            },
            {
                x: 220,
                y: 220
            }
        ]);
    });
github kekee000 / fonteditor-core / test / spec / graphics / pathAdjust.spec.js View on Github external
it('test offset', function () {

        let result = pathAdjust(clone(path), 1, 1, 10, 10);
        assert.deepEqual(result, [
            {
                x: 60,
                y: 60
            },
            {
                x: 110,
                y: 110
            }
        ]);

        result = pathAdjust(clone(path), 2, 2, 10, 10);
        assert.deepEqual(result, [
            {
                x: 120,
                y: 120
github kekee000 / fonteditor-core / test / spec / graphics / pathAdjust.spec.js View on Github external
it('test default', function () {

        let result = pathAdjust(clone(path));
        assert.deepEqual(result, [
            {
                x: 50,
                y: 50
            },
            {
                x: 100,
                y: 100
            }
        ]);

        result = pathAdjust(clone(path), 1, 1);
        assert.deepEqual(result, [
            {
                x: 50,
                y: 50
github kekee000 / fonteditor-core / test / spec / graphics / pathAdjust.spec.js View on Github external
it('test scale', function () {

        let result = pathAdjust(clone(path), 2, 2);
        assert.deepEqual(result, [
            {
                x: 100,
                y: 100
            },
            {
                x: 200,
                y: 200
            }
        ]);

        result = pathAdjust(clone(path), 0.5, 1);
        assert.deepEqual(result, [
            {
                x: 25,
                y: 50
            },
            {
                x: 50,
                y: 100
            }
        ]);

        result = pathAdjust(clone(path), 1, 2, 0, 0);
        assert.deepEqual(result, [
            {
                x: 50,
                y: 100
github kekee000 / fonteditor-core / test / spec / graphics / pathAdjust.spec.js View on Github external
it('test default', function () {

        let result = pathAdjust(clone(path));
        assert.deepEqual(result, [
            {
                x: 50,
                y: 50
            },
            {
                x: 100,
                y: 100
            }
        ]);

        result = pathAdjust(clone(path), 1, 1);
        assert.deepEqual(result, [
            {
                x: 50,
                y: 50
            },
            {
                x: 100,
                y: 100
            }
        ]);

        result = pathAdjust(clone(path), 1, 1, 0, 0);
        assert.deepEqual(result, [
            {
                x: 50,
                y: 50
github kekee000 / fonteditor-core / test / spec / graphics / pathAdjust.spec.js View on Github external
it('test scale', function () {

        let result = pathAdjust(clone(path), 2, 2);
        assert.deepEqual(result, [
            {
                x: 100,
                y: 100
            },
            {
                x: 200,
                y: 200
            }
        ]);

        result = pathAdjust(clone(path), 0.5, 1);
        assert.deepEqual(result, [
            {
                x: 25,
                y: 50
github kekee000 / fonteditor-core / test / spec / graphics / pathAdjust.spec.js View on Github external
}
        ]);

        result = pathAdjust(clone(path), 0.5, 1);
        assert.deepEqual(result, [
            {
                x: 25,
                y: 50
            },
            {
                x: 50,
                y: 100
            }
        ]);

        result = pathAdjust(clone(path), 1, 2, 0, 0);
        assert.deepEqual(result, [
            {
                x: 50,
                y: 100
            },
            {
                x: 100,
                y: 200
            }
        ]);
    });
github kekee000 / fonteditor-core / test / spec / graphics / pathAdjust.spec.js View on Github external
}
        ]);

        result = pathAdjust(clone(path), 1, 1);
        assert.deepEqual(result, [
            {
                x: 50,
                y: 50
            },
            {
                x: 100,
                y: 100
            }
        ]);

        result = pathAdjust(clone(path), 1, 1, 0, 0);
        assert.deepEqual(result, [
            {
                x: 50,
                y: 50
            },
            {
                x: 100,
                y: 100
            }
        ]);
    });