All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.assets.rjzjh.zrender.graphic.shape.Ring.js Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
/**
 * 圆环
 * @module zrender/graphic/shape/Ring
 */
define(function (require) {

    return require('../Path').extend({

        type: 'ring',

        shape: {
            cx: 0,
            cy: 0,
            r: 0,
            r0: 0
        },

        buildPath: function (ctx, shape) {
            var x = shape.cx;
            var y = shape.cy;
            var PI2 = Math.PI * 2;
            ctx.moveTo(x + shape.r, y);
            ctx.arc(x, y, shape.r, 0, PI2, false);
            ctx.moveTo(x + shape.r0, y);
            ctx.arc(x, y, shape.r0, 0, PI2, true);
        }
    });
});




© 2015 - 2024 Weber Informatics LLC | Privacy Policy