illustrator怎麼添加漸變滑塊?illustrator是矢量編輯軟件,畫闆是繪制處理的重要容器,在印刷方面的一個重要功能就是移除非純黑疊印,開發一個移除非純黑疊印功能,以下功能僅用于學習交流,請勿用于非法用途和商業用途,源代碼如下所示:,我來為大家講解一下關于illustrator怎麼添加漸變滑塊?跟着小編一起來看一看吧!
illustrator是矢量編輯軟件,畫闆是繪制處理的重要容器,在印刷方面的一個重要功能就是移除非純黑疊印,開發一個移除非純黑疊印功能,以下功能僅用于學習交流,請勿用于非法用途和商業用途,源代碼如下所示:
var doc = documents[0];
var pgItm = doc.pageItems;
app.selection = null;
for (var i = 0; i < pgItm.length; i = 1) {
if (pgItm[i].typename == "TextFrame") {
var fiTxtColor = pgItm[i].textRange.fillColor;
if (pgItm[i].textRange.overprintFill == true) {
if (fiTxtColor.black == 100 && fiTxtColor.cyan == 0 && fiTxtColor.magenta == 0 && fiTxtColor.yellow == 0) {
continue;
} else {
pgItm[i].selected = true;
}
}
} else {
var fiColor = pgItm[i].fillColor;
if (pgItm[i].fillOverprint == true) {
if (fiColor.black == 100 && fiColor.cyan == 0 && fiColor.magenta == 0 && fiColor.yellow == 0) {
continue;
} else {
pgItm[i].selected = true;
}
}
}
}
removeOVPfill(app.selection);
app.selection = null;
for (var i = 0; i < pgItm.length; i = 1) {
if (pgItm[i].typename == "TextFrame") {
var stTxtColor = pgItm[i].textRange.strokeColor;
if (pgItm[i].textRange.overprintStroke == true) {
if (stTxtColor.black == 100 && stTxtColor.cyan == 0 && stTxtColor.magenta == 0 && stTxtColor.yellow == 0) {
continue;
} else {
pgItm[i].selected = true;
}
}
} else {
var stColor = pgItm[i].strokeColor;
if (pgItm[i].strokeOverprint == true) {
if (stColor.black == 100 && stColor.cyan == 0 && stColor.magenta == 0 && stColor.yellow == 0) {
continue;
} else {
pgItm[i].selected = true;
}
}
}
}
removeOVPstroke(app.selection);
function removeOVPfill(sel) {
if (sel.length == 0) {
return;
}
c = confirm("删除填充疊印?", false, "PAInt");
if (c == true) {
for (var i = 0; i < sel.length; i = 1) {
sel[i].fillOverprint = false;
try {
sel[i].textRange.overprintFill = false;
} catch (e) {
}
sel[i].selected = false;
}
}
}
function removeOVPstroke(sel) {
if (sel.length == 0) {
return;
}
c = confirm("删除描邊疊印?", false, "Does not");
if (c == true) {
for (var i = 0; i < sel.length; i = 1) {
sel[i].strokeOverprint = false;
try {
sel[i].textRange.overprintStroke = false;
} catch (e) {
}
sel[i].selected = false;
}
}
}
AI源代碼轉執行腳本
>文章引用至 作者聯系方式
,更多精彩资讯请关注tft每日頭條,我们将持续为您更新最新资讯!