Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

357
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda