Skip to content

When the left side of one rectangle overlaps with the right side of the other rectangle, rectangles are considered not intersecting. #764

@Tanya-Solyanik

Description

@Tanya-Solyanik

It would be good to clarify how IntersectsWith method handles rectangles that overlap borders, X == r.X + Width. WinForms consider this case as not an intersection. WPF considers this as an intersection but does not document this fact either:https://docs.microsoft.com/en-us/dotnet/api/system.windows.rect.intersectswith?view=netframework-4.7.1#System_Windows_Rect_IntersectsWith_System_Windows_Rect_
The difference between the frameworks is confusing. This could be documented with a sample or even a pointer to reference source website.

Another good note would be to mention that this method ignores integer overflows and might be inaccurate due to this fact.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions