概要
vistaでillustratorやってみる。
アートボード作って、sin波書いて、png出力してみた。
写真
サンプルコード
var v = [];
for (var i = 0; i < 400; i++)
{
var s = Math.sin(i * 2.0 * Math.PI / 100.0) * 200 + 200;
v.push([i, s]);
}
var docRef = documents.add(DocumentColorSpace.RGB, 400, 400);
var lineColor = new RGBColor();
lineColor.red = 255;
lineColor.green = 0;
lineColor.blue = 0;
var line = activeDocument.pathItems.add();
line.filled = false;
line.strokeColor = lineColor;
line.setEntirePath(v);
var pngOpt = new ExportOptionsPNG24();
pngOpt.artBoardClipping = true;
var filePath = new File("/Users/ore/ill4.png");
activeDocument.exportFile(filePath, ExportType.PNG24, pngOpt);
alert("ok");
以上。