Please see my Road picture, I draw it by QCanvas and use canvasview to show it. I have used : DrawLine , drawrect of QCanvas, and drawcubicbezier of QPainter to draw it.
And now! i have a point. This point can be in anywhere on canvasview. How do i check it inside or outside a road?
--> I thinked about using color to fill the road. And i will check color at position of point. If color at point same color of road => i will say this point inside the road!!!--> is that OK?if it ok! how can i get color at position of point? how can i fill color for road. It not a polygon.
--> OR using point matrix, any point inside the road will have value = 1. and outside have value = 0. But ! it hard to create this matrix with the value.
--> OR using this algorithm : "check a point inside or outside the polygon". This method can use for one part of road. But at confluence or more...It not a polygon.
>>what else?
Bookmarks