how do I create text with an outline, I can't seem to get my selection right.
I'm trying to add text with an outline to an image;
The text is showing up fine and has it's own layer
When I make the layer active and do SelectAll() and then add a stroke on the selection I get a big ole box around my image.
I realize that this is likely a simple fix, but my google foo has failed me so far.
Thank you for your help
var artLayerRef = docRef.artLayers.add();
artLayerRef.kind = LayerKind.TEXT;
artLayerRef.name = "Text";
// Set the contents of the text layer.
var textItemRef = artLayerRef.textItem;
textItemRef.size = 25;
textItemRef.contents = "wubwub";
textItemRef.position = new Array(
50,
50);
//textItemRef.rasterize(RasterizeType.TEXTCONTENTS);
docRef.activeLayer = docRef.layers["Text"];
docRef.selection.selectAll();
//draw the stroke
var strokeLayerRef = docRef.artLayers.add();
strokeLayerRef.kind = LayerKind.NORMAL;
strokeLayerRef.name = "Stroke";
var strokeColor= new SolidColor();
strokeColor.rgb.red = 255;
strokeColor.rgb.blue = 0;
strokeColor.rgb.green = 0;
docRef.selection.stroke(
strokeColor,
15,
StrokeLocation.CENTER); // OUTSIDE / INSIDE