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

169
Views
Reactjs get SVG Polygon points loaded via image src and place the label text in center / optimal spot

Input can be any SVG Polygon image of different irregular sizes as below

logo.svg
--------
<svg viewBox="0 0 200 100" xmlns="http://www.w3.org/2000/svg">
  <polygon points="100,100 150,25 150,75 200,0"
            fill="none" stroke="black" />
</svg>

Have to find a efficient way to read those polygon points loaded through image tag as mentioned below

import React from 'react';
{/*images*/}
import logo from './logo.svg'

const App = () => {
  return (
    <div className="App">
      <img src={logo } alt="SVG Image" />
    </div>
  );
}
export default App;

With polygon points, have to calculate the optimal spot within a SVG polygon to place the text label dynamically

about 4 years ago · Santiago Trujillo
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!