【问题标题】:How to draw a graphicLines in InDesign using CEP / ExtendScript?如何使用 CEP / ExtendScript 在 InDesign 中绘制图形线?
【发布时间】:2021-11-26 16:36:28
【问题描述】:

我看到有一个类似的问题,但我的问题不一样: Drawing a Line in InDesign CS5.5 using ExtendScript

这就是我创建图形线的方式:

var myArr = [
   [x1, y1],
   [x2, y2],
   ...
]
// Get the active document
var doc = app.activeDocument;

// Get item from the page
var page = doc.pages.item(0);

var line = page.graphicLines.add();
line.paths.item(0).entirePath = myArr;

我应该有这个(蓝色圈出来的线):

但我明白了(蓝色圈出的矩形):

当我点击焦点时会出现这个矩形,否则它是不存在的。

矩形似乎是线条的大小并且位置很好,但我没有得到我想要的线条。我忘记了什么?

提前致谢!

【问题讨论】:

    标签: draw adobe-indesign extendscript adobe-extension


    【解决方案1】:

    尝试在你的 sn-p 末尾添加这一行:

    line.strokeWeight = 1;
    

    【讨论】:

      猜你喜欢
      • 2021-11-15
      • 1970-01-01
      • 2021-12-27
      • 2023-02-12
      • 2019-11-13
      • 2022-07-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多