Adobe 12040118 Using Help - Page 172
Shape object, Description, Attributes, Methods, Examples
UPC - 718659361808
View all Adobe 12040118 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 172 highlights
Help Using Help Reference Back 172 Shape object app.project.item(index).layer(index).property(1).property(index).property("maskShape").value Description The Shape object holds information describing the outline shape of a Mask. Attributes Attribute closed vertices i n Ta n g e n t s o u t Ta n g e n t s Reference see "Shape closed attribute" on page 173 see "Shape vertices attribute" on page 174 see "Shape inTangents attribute" on page 173 see "Shape outTangents attribute" on page 173 Description specifies whether the shape is a closed curve array of floating-point pairs specifying the anchor points of the shape array of floating-point pairs specifying the tangent vectors coming into the shape vertices array of floating-point pairs specifying the tangent vectors coming out of the shape vertices Methods Method shape() Reference see "Shape Shape() method" on page 174 Description constructor to create a new Shape Examples 1 Creating a square mask A square is a closed shape with 4 points. The inTangents and outTangents for connected straightline segments are always 0, the default. Since the default values are the desired values, you do not need to set them here. var myShape = new Shape(); myShape.vertices = [ [0,0], [0,1], [1,1], [1,0] ]; myShape.closed = true; 2 Creating a "U" shaped mask A "U" is an open shape with the same 4 points used in Example 1: var myShape = new Shape(); myShape.vertices = [ [0,0], [0,1], [1,1], [1,0] ]; myShape.closed = false; 3 Creating an oval An oval is a closed shape with 4 points and inTangents and outTangents: var myShape = new Shape(); myShape.vertices = [[300,50],[200,150],[300,250],[400,150]]; mySha p e. in Ta n g en ts = [[55. 23, 0], [0, - 5 5 . 2 3 ] , [ - 5 5 . 2 3 , 0 ] , [ 0 , 5 5 . 2 3 ] ] ; mySha p e. o u tTa n g en ts = [[- 55. 23, 0], [0, 5 5 . 2 3 ] , [ 5 5 . 2 3 , 0 ] , [ 0 , - 5 5 . 2 3 ] ] ; myShape.closed = true; Using Help Back 172