Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

180
Visualizações
Extendscript - Adobe Illustrator - Ellipse not in right location

I'm trying to do something that seems simple, but not sure how it's not working. I have a map layer and I'm trying to draw circles via Extendscript. I'm trying to test just by trying to draw a simple circle at point 100,100 (I assume top left of map is 0,0), but when I execute it, the circle appears way further down than it should be (seems close to 200,700). Below is my code I'm using...

var dotRadius = 8.136 / 2;
var testDOT = mapLayer.pathItems.ellipse(100, 100, dotRadius*2, dotRadius*2, false, false);
testDOT.strokeWidth = 0.25;
testDOT.strokeColor = getColor("MAROON"); // defined above
testDOT.fillColor = getColor("MAROON");

the getColor just creates a CYMK Color object. Can anyone give me a clue on why the 100,100 point is not where I expect it to be?

TIA!

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Just in case, it looks like your script used the 'relative' coordinate system (relative to zero point of current artboard).

To made it to use 'absolute' coordinates (relative to the top-left corner of the first artboard for a new document) you can add this line at the start of your script:

app.coordinateSystem = CoordinateSystem.DOCUMENTCOORDINATESYSTEM;

Or you can use the 'relative' coordinate system:

app.coordinateSystem = CoordinateSystem.ARTBOARDCOORDINATESYSTEM;

In this case you can move zero point of any artboard with this commands:

var doc = app.activeDocument;
doc.artboards[0].rulerOrigin = [0,0];
doc.artboards[1].rulerOrigin = [200,700];
// etc
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda