illustrator怎么添加渐变滑块(illustrator插件-常用功能-移除非纯黑叠印-js脚本开发-AI插件)
illustrator是矢量编辑软件,画板是绘制处理的重要容器,在印刷方面的一个重要功能就是移除非纯黑叠印,开发一个移除非纯黑叠印功能,以下功能仅用于学习交流,请勿用于非法用途和商业用途,源代码如下所示:,我来为大家讲解一下关于illustrator怎么添加渐变滑块?跟着小编一起来看一看吧!
illustrator怎么添加渐变滑块
1 方法原理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源代码转执行脚本
>文章引用至 作者联系方式
,免责声明:本文仅代表文章作者的个人观点,与本站无关。其原创性、真实性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容文字的真实性、完整性和原创性本站不作任何保证或承诺,请读者仅作参考,并自行核实相关内容。文章投诉邮箱:anhduc.ph@yahoo.com