v3.0
Appends a single point to a 2D shape (mask shape).
The difference between this command and the Insert2DShapePoint
command is that you use Add2DShapePoint to define the original set of points
while creating the shape, but Insert2DShapePoint adds points to an existing
shape after it has been created.
Note: You can add points using either the Add2DShapePoint
or Add2DShapePointArray commands.
oLong = Add2DShapePoint( [Shape], x, y ); |
The index of the new point as a Long.
Parameter | Type | Description |
---|---|---|
Shape | String |
Parameter path name for the shape where you are defining the point. Default Value:
Current selection. |
x | Double | Specifies the position in X of the new point. |
y | Double | Specifies the position in Y of the new point. |
' ' This example demonstrates how to set a garbage matte mask for a ' ColorCorrect operator in the FxTree. ' ' Create a new FxTree set oTree = CreateFxTree() ' Get the projects path for the current system sPath = InstallationPath( siProjectPath ) set oClip = CreateImageClip( sPath & "\Pictures\noIcon.pic", "NewClip" ) ' Use the clip to create a new image clip operator set oOperator = AddImageClipFxOp( oTree, oClip ) ' Add a Color Correct operator to the same tree set oCCOp = AddFxOp( oTree, "Color Correct" ) ' Connect the two operators ConnectFxOp oOperator, oCCOp, "1" ' Since the ConnectFxOp command does not return the new operator, ' you need to get it from the OperatorCollection on the FxTree object for each oMember in oTree.FxOperators if oMember.Name = "ColorCorrect" then set oGBMatteOp = oMember exit for end if next ' Adjust the HSV Offset and Gain levels so you can see the ' results of the color correction SetValue oGBMatteOp.FullName & ".MasterHueShift," _ & oGBMatteOp.FullName & ".MasterOffset," _ & oGBMatteOp.FullName & ".MasterGain", _ Array(0, 0.820731514055631, 0.852844886888196) ' Add the 2D shape (mask shape) to the GarbageMatte set oRotospline = Add2DShape( oGBMatteOp & ".GarbageShapes", "Polygon" ) Move2DShapePin oRotospline, 122.571428571429, 141.285714285714 Add2DShapePoint oRotospline, 89, 192 Add2DShapePoint oRotospline, 169, 174 Add2DShapePoint oRotospline, 182, 99 Add2DShapePoint oRotospline, 128, 64 Add2DShapePoint oRotospline, 153, 124 Add2DShapePoint oRotospline, 88, 152 Add2DShapePoint oRotospline, 49, 184 |