概要
vistaでillustratorやってみる。
アートボード作って、ベジェ曲線書いて、png出力してみた。
写真
サンプルコード
var docRef = documents.add(DocumentColorSpace.RGB, 400, 400);
var pObj = activeDocument.pathItems.add();
pObj.filled = false;
pObj.stroked = true;
pObj.strokeWidth = 0.3;
var pt = pObj.pathPoints.add();
pt.leftDirection = [100, 50];
pt.anchor = [100, 100];
pt.rightDirection = [100, 150];
var pt = pObj.pathPoints.add();
pt.leftDirection = [200, 150];
pt.anchor = [200, 100];
pt.rightDirection = [200, 50];
pt = pObj.pathPoints.add();
pt.anchor = [0, 0];
pt.leftDirection = [-100, -50];
pt.rightDirection = [50, 200];
pt = pObj.pathPoints.add();
pt.anchor = [300, 200];
pt.leftDirection = [200, 250];
pt.rightDirection = [350, 200];
var pngOpt = new ExportOptionsPNG24();
pngOpt.artBoardClipping = true;
var filePath = new File("/Users/ore/ill3.png");
activeDocument.exportFile(filePath, ExportType.PNG24, pngOpt);
alert("ok");
以上。