intersection is seen but could not be marked RRS feed

  • Question

  • Is there any way to detect the intersection of two graphics objects drawn (could be two line or two curves or two splines or a line and a curve etc., any combination) drawn creating a graphics object which derives itself from a bitmap image and then the graphics is transferred to the picturebox1 as bitmap itself

    more like:-

    private bit as new bitmap

    dim g as graphics=graphics.fromimage(bit)



    Right now, I could draw these shapes, and could even see the intersecting points on the screen but can't mark them. Is there any way to mark all the intersecting points made by different shapes?

    Is there a way to check for different point on the screen if its been marked with pen and if it has been marked once or twice? This may also give intersection points.


    ps: explanation in visual basic compatible to visual studio is appreciated but other language is OK too 

    • Edited by Ruchi12 Wednesday, December 27, 2017 6:36 PM
    Wednesday, December 27, 2017 6:28 PM

All replies

  • Hi Ruchi12,

    Thank you for posting here.

    As I know, if you want to get the quadrilateral diagonal intersection, you could use the points with formula which you used to draw the lines.

    A(x1,y1) B(x2,y2) C(x3,y3) D(x4,y4)
    Hence point is

    You could use the formula to get the points in your code.

    But, for curves, I am nor sure what curves you used to get the point. Please provide more information about that.

    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, January 2, 2018 1:46 AM