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

347
Visualizações
CEP/JavaScript : How to get the center of a circle?

I create a circle with this method:

var yMinCir = height - 1515.80/2.667+8.5;
var yMaxCir = height - 1545.80/2.667+8.5;
var myCircle = page.ovals.add({geometricBounds:[yMinCir, 1312.63/2.667+8.5, yMaxCir, 1342.63/2.667+8.5]});

Is there a way to recover the center by doing for example :

var centerOfMyCircle = myCircle.center;

Or does it have to be calculated ? If yes, how ?

I searched everywhere but I did not find anything..

Thank you in advance for your help !

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

0

You can get the geometricBounds of the object (the same you are setting). Then the center of your circle will be

var gb = myCircle.geometricBounds;
var centery = (gb[2] - gb[0]) / 2;
var centerx = (gb[3] - gb[1]) / 2;
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