Scenario: I need to replicate the solar power plant field configuration on web page(set of rectangles for mirrors and receiver). I need to dynamically add rectangles to webpages with given X,Y,width and height parameters using c#.net. I will receive the user input a set of coordinates for rectangles as X,Y full page graph. Eg: (-42.34,-240.34,2.25,16.65) (10.34,-140.34,10.25,5.65)
The coordinates I receive from user input are related to X & Y full page graph that includes negative coordinates also. But the DrawRectangle accepts the X & Y values as positive and only integer values.
My query is how should I relate the user input X & Y Coords ( -ve & +ve) on the web page and float width values to integer?
When I try to convert to Int, the rectangles are either getting overlapped or not displaying at all. The set of input values for rectangles are closer and there is difference in point values only.