Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67527

How to draw a rectangle using specific cordinates, that we get from backend/API?

$
0
0

In the backgroud i have image,Here I need to draw a rectangle using specific coordinates (they come from API)on a image. How to draw dynamically because coordinates keep changing.

I have tried using canvas, svg but dind't work. Link for previous question How to draw svg on image?

cordinates:

        var a = _self.sendObjCoordinates[0].coordinates.xmin;
        var b = _self.sendObjCoordinates[0].coordinates.ymin;
        var c = _self.sendObjCoordinates[0].coordinates.xmax;
        var d  = _self.sendObjCoordinates[0].coordinates.ymax;

sample values:

     {xmin: 399, ymin: 191, xmax: 1166, ymax: 742}

Viewing all articles
Browse latest Browse all 67527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>