Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

345
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!