VMLPieSlice.js revision 04f886d0ad2a12c3c0e4ec29a1c42e8732e9327f
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp/**
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp * Draws pie slices
66ca16dd76367c074fe4df1dcf7b555489a9bf85Tripp *
a75ebc38c1de401b679953a9b87bd323f0f48d02Tripp * @module graphics
66ca16dd76367c074fe4df1dcf7b555489a9bf85Tripp * @class VMLPieSlice
66ca16dd76367c074fe4df1dcf7b555489a9bf85Tripp * @constructor
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp */
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTrippVMLPieSlice = function()
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp{
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp VMLPieSlice.superclass.constructor.apply(this, arguments);
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp};
237a5d2c3e6985a3e7b58e79b9fa64ee2bcd2e0cTrippVMLPieSlice.NAME = "vmlPieSlice";
b08d5c81743759d32bccaf4bec55aa102491026eTrippY.extend(VMLPieSlice, Y.VMLShape, Y.mix({
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp /**
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp * Indicates the type of shape
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp *
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp * @property _type
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp * @type String
04f886d0ad2a12c3c0e4ec29a1c42e8732e9327fTripp * @private
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp */
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp _type: "shape",
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp /**
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp * Change event listener
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp *
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp * @private
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp * @method _updateHandler
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp */
b08d5c81743759d32bccaf4bec55aa102491026eTripp _draw: function(e)
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp {
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp var x = this.get("cx"),
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp y = this.get("cy"),
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp startAngle = this.get("startAngle"),
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp arc = this.get("arc"),
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp radius = this.get("radius");
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp this.clear();
cff2b8ec796b9316395b305e8867408a6d7c3549Tripp this.drawWedge(x, y, startAngle, arc, radius);
b08d5c81743759d32bccaf4bec55aa102491026eTripp this.end();
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp }
b08d5c81743759d32bccaf4bec55aa102491026eTripp }, Y.VMLDrawing.prototype));
b08d5c81743759d32bccaf4bec55aa102491026eTrippVMLPieSlice.ATTRS = Y.mix({
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp cx: {
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp value: 0
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp },
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp cy: {
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp value: 0
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp },
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp /**
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp * Starting angle in relation to a circle in which to begin the pie slice drawing.
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp *
c093c1aed867e18aa4778708592e1ceb45d18cffTripp * @config startAngle
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp * @type Number
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp */
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp startAngle: {
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp value: 0
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp },
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp /**
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp * Arc of the slice.
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp *
c093c1aed867e18aa4778708592e1ceb45d18cffTripp * @config arc
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp * @type Number
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp */
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp arc: {
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp value: 0
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp },
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp /**
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp * Radius of the circle in which the pie slice is drawn
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp *
c093c1aed867e18aa4778708592e1ceb45d18cffTripp * @config radius
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp * @type Number
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp */
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp radius: {
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp value: 0
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTripp }
b08d5c81743759d32bccaf4bec55aa102491026eTripp}, Y.VMLShape.ATTRS);
bbd1285cbb2183b7f89010412ad97ae1680b4b5eTrippY.VMLPieSlice = VMLPieSlice;