如何使用JavaScript在Adobe Illustrator中设置笔划对齐

如何使用JavaScript在Adobe Illustrator中设置笔划对齐,javascript,alignment,adobe,stroke,Javascript,Alignment,Adobe,Stroke,Adobe Illustrator提供JavaScript库来构建批处理脚本 var doc = activeDocument; var rect = doc.pathItems.rectangle(700, 80, 400, 70); rect.stroked = true; // open stroke rect.strokeWidth = 3; var newRGBColor = new RGBColor(); newRGBColor.red = 200; newRGBColor.g

Adobe Illustrator提供JavaScript库来构建批处理脚本

var doc = activeDocument;
var rect = doc.pathItems.rectangle(700, 80, 400, 70);
rect.stroked = true;    // open stroke
rect.strokeWidth = 3;
var newRGBColor = new RGBColor();
newRGBColor.red = 200;
newRGBColor.green = 120;
newRGBColor.blue = 240;
rect.strokeColor = newRGBColor;
// and we also can set StrokeJoin and StrokeCap
但是我找不到如何设置笔划对齐…

很晚了,但现在您可以:

rect.strokeCap = StrokeCap.BUTTENDCAP;//ROUNDENDCAP, PROJECTINGENDCAP
rect.strokeJoin = StrokeJoin.ROUNDENDJOIN;//BEVELENDJOIN, MITERENDJOIN

考虑在你的问题中增加一些细节。