1+ /**
2+ * A GraphicsData object.
3+ *
4+ * @class GraphicsData
5+ * @constructor
6+ PIXI.GraphicsData = function(lineWidth, lineColor, lineAlpha, fillColor, fillAlpha, fill, shape)
7+ {
8+ this.lineWidth = lineWidth;
9+ this.lineColor = lineColor;
10+ this.lineAlpha = lineAlpha;
11+ this._lineTint = lineColor;
12+
13+ this.fillColor = fillColor;
14+ this.fillAlpha = fillAlpha;
15+ this._fillTint = fillColor;
16+ this.fill = fill;
17+
18+ this.shape = shape;
19+ this.type = shape.type;
20+ };
21+ */
22+
23+ /**
24+ * A GraphicsData object.
25+ *
26+ * @class
27+ * @memberof PIXI
28+ * @param lineWidth {number} the width of the line to draw
29+ * @param lineColor {number} the color of the line to draw
30+ * @param lineAlpha {number} the alpha of the line to draw
31+ * @param fillColor {number} the color of the fill
32+ * @param fillAlpha {number} the alpha of the fill
33+ * @param fill {boolean} whether or not the shape is filled with a colour
34+ * @param shape {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw.
35+ */
36+
37+ PIXI . GraphicsData = function ( lineWidth , lineColor , lineAlpha , fillColor , fillAlpha , fill , shape ) {
38+
39+ /*
40+ * @member {number} the width of the line to draw
41+ */
42+ this . lineWidth = lineWidth ;
43+
44+ /*
45+ * @member {number} the color of the line to draw
46+ */
47+ this . lineColor = lineColor ;
48+
49+ /*
50+ * @member {number} the alpha of the line to draw
51+ */
52+ this . lineAlpha = lineAlpha ;
53+
54+ /*
55+ * @member {number} cached tint of the line to draw
56+ */
57+ this . _lineTint = lineColor ;
58+
59+ /*
60+ * @member {number} the color of the fill
61+ */
62+ this . fillColor = fillColor ;
63+
64+ /*
65+ * @member {number} the alpha of the fill
66+ */
67+ this . fillAlpha = fillAlpha ;
68+
69+ /*
70+ * @member {number} cached tint of the fill
71+ */
72+ this . _fillTint = fillColor ;
73+
74+ /*
75+ * @member {boolean} whether or not the shape is filled with a color
76+ */
77+ this . fill = fill ;
78+
79+ /*
80+ * @member {Circle|Rectangle|Ellipse|Line|Polygon} The shape object to draw.
81+ */
82+ this . shape = shape ;
83+
84+ /*
85+ * @member {number} The type of the shape, see the Const.Shapes file for all the existing types,
86+ */
87+ this . type = shape . type ;
88+
89+ } ;
90+
91+ GraphicsData . prototype . constructor = GraphicsData ;
92+
93+ /**
94+ * Creates a new GraphicsData object with the same values as this one.
95+ *
96+ * @return {GraphicsData }
97+ */
98+ GraphicsData . prototype . clone = function ( ) {
99+
100+ return new GraphicsData (
101+ this . lineWidth ,
102+ this . lineColor ,
103+ this . lineAlpha ,
104+ this . fillColor ,
105+ this . fillAlpha ,
106+ this . fill ,
107+ this . shape
108+ ) ;
109+
110+ } ;
0 commit comments