home *** CD-ROM | disk | FTP | other *** search
- /***************************************************************
- ADOBE SYSTEMS INCORPORATED
- Copyright 2002 Adobe Systems Incorporated
- All Rights Reserved
-
- NOTICE: Adobe permits you to use, modify, and distribute this
- file in accordance with the terms of the Adobe license agreement
- accompanying it. If you have received this file from a source
- other than Adobe, then your use, modification, or distribution
- of it requires the prior written permission of Adobe.
- ***************************************************************/
-
- /***************************************************************
- Author: Henry Lee
- ***************************************************************/
-
- /***************************************************************
-
- This script takes a selected LMGeometricObject and adds a stroke.
- If the object is already a stroke, it will convert it into a
- fill then add the stroke.
-
- Function:
- MakeStrokeFill(objs, red, green, blue, width)
-
- Arguments:
- <objs> LMGeometricObjects - the array of objects to which
- the script will be applied
- <red>,<green>,<blue> integer - the RGB values of the stroke.
- Ranges from 0 to 255.
- <width> integer - the width of the stroke
-
- ***************************************************************/
-
- /***************************************************************
- To change the behavior of this script, make your changes below
- ***************************************************************/
-
- var comp = application.currentComposition;
- var objects = comp.selection;
-
- MakeStrokeFill(objects, 0, 0, 0, 1);
-
- /***************************************************************
- DO NOT EDIT BELOW THIS LINE
- ***************************************************************/
-
- function MakeStrokeFill(objs, red, green, blue, width) {
- var i;
- var newGroup = new Array();
- var tempObj;
- var objName;
- var strokeLayer;
-
- for (i=0;i<objs.length;i++) {
- if ((objs[i] == "[object LMPolygonObject]")||(objs[i] == "[object LMRectangleObject]")||
- (objs[i] == "[object LMRoundedRectangleObject]")||(objs[i] == "[object LMEllipseObject]")||
- (objs[i] == "[object LMPathObject]")) {
- objs[i].stroke.type = LMStrokeType.fill;
- objs[i].addLayer();
- strokeLayer = objs[i].layers.length - 1;
- objs[i].layers[strokeLayer].width = width;
- objs[i].layers[strokeLayer].colorGradient.startColor.red = red;
- objs[i].layers[strokeLayer].colorGradient.startColor.green = green;
- objs[i].layers[strokeLayer].colorGradient.startColor.blue = blue;
- }
- }
- }
-
-
-
-
-
-
-
-