Adobe 23101764 Scripting Guide - Page 81
Text item object
UPC - 718659340025
View all Adobe 23101764 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 81 highlights
Scripting Photoshop 3 Text item object 3.10.4 Applying styles to layers Styles can be applied to layers from your scripts. The styles correspond directly to the styles in the Photoshop Styles palette and are referenced by their literal string name. Here is an example of how to set a layer style to the layer named "L1." NOTE: The layer styles name is case sensitive. AS: apply layer style art layer "L1" of current document using ¬ "Puzzle (Image)" VB: docRef.ArtLayers("L1").ApplyStyle "Puzzle (Image)" JS: docRef.artLayers["L1"].applyStyle("Puzzle (Image)"); 3.10.5 Rotating layers Use the rotate (Rotate/rotate) command on the layer to rotate the entire layer. Positive integers rotate the layer clockwise. Negative integers rotate it counterclockwise. AS: rotate current layer of current document angle 45.0 VB: docRef.ActiveLayer.Rotate 45.0 JS: docRef.activeLayer.rotate(45.0); 3.11 Text item object In Photoshop, the Text object is a property of the art layer. To create a new text layer, you must create a new art layer and then set the art layer's kind (Kind/kind) property to text layer (psTextLayer/ LayerKind.TEXT). NOTE: You may want to refer back to chapter 1 for a quick explanation of the multi-language format used above. See "Conventions in this guide" on page 1. Photoshop CS Scripting Guide 77