// textArt2.js
//$.bp()
//新規ドキュメントを RGB モデルで開く
frontDocument = documents.add(DocumentColorSpace.RGB,800,600);
lnRGBColor = new RGBColor();
lnColor = new Color();
lnRGBColor.red = 200;
lnRGBColor.green = 100;
lnRGBColor.blue = 0;
lnColor.rgb = lnRGBColor;
Text1 ="両端揃え";
curTextArt = frontDocument.textArtItems.add(); // TextArtItemを追加
curTextArt.contents = "dummy"; // ダミー文字列
curTextArt.kind = TextType.AREATEXT; // テキストのタイプ
curTextArt.textRange().paragraphs.removeAll(); // パラグラフを削除
prag = curTextArt.textRange().paragraphs.add(); // パラグラフを追加
prag.contents = Text1; // パラグラフの内容
prag.justification = Justification.ALLLINES; // 両端揃え
prag.filled = true;
prag.fillColor = lnColor;
prag.stroked = false;
prag.font = "MS-PMincho";
prag.size = 32;
curTextArt.width = 400; // 全体の幅
curTextArt.textRange().scaling = Array(200, 300); // スケーリング
curTextArt.position = Array(100, 400); // 開始位置
|