2011-06-24 97 views
1

如何使用Photoshop脚本添加阴影(具有定义的距离,大小等)?将阴影添加到文本

当前JS代码

var fontSize = 14; 
var fontName = "Arial-Bold"; // NB: must be postscript name of font! 
// This is the colour of the text in RGB 
//Click foreground colour in Photoshop, choose your colour and read off the RGB values 
//these can then be entered below. 
var textColor = new SolidColor(); 
     textColor.rgb.red = 255; 
     textColor.rgb.green =255; 
     textColor.rgb.blue = 255; 

var newTextLayer = doc.artLayers.add(); 
newTextLayer.kind = LayerKind.TEXT; 
newTextLayer.textItem.size = fontSize; 
newTextLayer.textItem.font = fontName; 
newTextLayer.textItem.contents = ++Count; 
newTextLayer.textItem.color = textColor; 
newTextLayer.textItem.kind = TextType.PARAGRAPHTEXT; 
newTextLayer.textItem.height = fontSize; 
newTextLayer.textItem.width = doc.width -20; 
//The line below is the text position (X Y) IE; 10 Pixels Right 10 Pixels Down 
newTextLayer.textItem.position = Array(10, 12); 
// Can be RIGHTJUSTFIED LEFTJUSTIFIED CENTERJUSTIFIED 
newTextLayer.textItem.justification=Justification.CENTERJUSTIFIED; 

回答