tft每日頭條

 > 圖文

 > illustrator繪制螺旋線

illustrator繪制螺旋線

圖文 更新时间:2025-01-29 11:07:56

illustrator繪制螺旋線?illustrator是矢量編輯軟件,畫闆是繪制處理的重要容器,在印刷方面的一個重要功能就是标注縱尺寸,開發一個标注縱尺寸功能,以下功能僅用于學習交流,請勿用于非法用途和商業用途,源代碼如下所示:,今天小編就來說說關于illustrator繪制螺旋線?下面更多詳細答案一起來看看吧!

illustrator繪制螺旋線(illustrator插件-常用功能開發-标注縱尺寸-js腳本開發-AI插件)1

illustrator繪制螺旋線

illustrator是矢量編輯軟件,畫闆是繪制處理的重要容器,在印刷方面的一個重要功能就是标注縱尺寸,開發一個标注縱尺寸功能,以下功能僅用于學習交流,請勿用于非法用途和商業用途,源代碼如下所示:

doc = app.activeDocument; theSelect = doc.selection; for (var i = 0; i < theSelect.length; i = 1) { x = theSelect[i].left; y = theSelect[i].top; w = theSelect[i].width; h = theSelect[i].height; s = 30; asize = 20; if (h < 50 || w < 50) { asize = 5; } tsize = 36; if (h < 60 || w < 60) { tsize = 12; } redColor = new CMYKColor(); redColor.black = 1; redColor.cyan = 1; redColor.magenta = 100; redColor.yellow = 100; var g1 = doc.groupItems.add(); var line1 = g1.pathItems.add(); line1.setEntirePath(new Array(new Array(x - s, y), new Array(x - s, y - h))); line1.strokeColor = redColor; var line1 = g1.pathItems.add(); line1.setEntirePath(new Array(new Array((x - s) - (s / 2), y), new Array(x - (s / 2), y))); line1.strokeColor = redColor; var line1 = g1.pathItems.add(); line1.setEntirePath(new Array(new Array((x - s) - (s / 2), y - h), new Array(x - (s / 2), y - h))); line1.strokeColor = redColor; var ar1 = g1.pathItems.add(); ar1.setEntirePath(new Array(new Array(x - s, y), new Array((x - s) - (asize / 2), y - asize), new Array((x - s) (asize / 2), y - asize))); ar1.strokeColor = NoColor; ar1.fillColor = redColor; ar1.closed = true; var ar1 = g1.pathItems.add(); ar1.setEntirePath(new Array(new Array(x - s, y - h), new Array((x - s) - (asize / 2), (y - h) asize), new Array((x - s) (asize / 2), (y - h) asize))); ar1.strokeColor = NoColor; ar1.fillColor = redColor; ar1.closed = true; var t1 = g1.textFrames.add(); t1.contents = (Math.round(h * 0.35277778 * 1000) / 1000) " mm"; t1.textRange.characterAttributes.size = tsize; t1.textRange.characterAttributes.fillColor = redColor; t1.left = ((x - s) - s) - (t1.width / 2); t1.top = (y - (h / 2)) (t1.height / 2); t1.rotate(90); }

>文章引用至 作者聯系方式

,

更多精彩资讯请关注tft每日頭條,我们将持续为您更新最新资讯!

查看全部

相关圖文资讯推荐

热门圖文资讯推荐

网友关注

Copyright 2023-2025 - www.tftnews.com All Rights Reserved