dotnet / dotnet/dotnet-api-docs
When the left side of one rectangle overlaps with the right side of the other rectangle, rectangles are considered not intersecting.
- Lingua principale
- C#
- Stelle
- 949
- Fork
- 1.7k
- Merge medio
- 2g 19h
- PR unite (30g)
- 52
Descrizione
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.*
* ID: 7f5cd207-cade-dd01-bfe0-5303b2bacf49
* Version Independent ID: 931eae53-8fac-b6d6-6324-ca94473f610a
* Content: [Rectangle.IntersectsWith(Rectangle) Method (System.Drawing)](https://docs.microsoft.com/en-us/dotnet/api/system.drawing.rectangle.intersectswith?view=netframework-4.7.1#System_Drawing_Rectangle_IntersectsWith_System_Drawing_Rectangle_)
* Content Source: [xml/System.Drawing/Rectangle.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System.Drawing/Rectangle.xml)
* Service: **unspecified**
* GitHub Login: @dotnet-bot
* Microsoft Alias: **dotnetcontent**
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Apri xml/System.Drawing/Rectangle.xml e trova la voce IntersectsWith(Rectangle). Confronta la formulazione attuale con il comportamento di WinForms e WPF descritto nell’issue, quindi documenta i rettangoli che si toccano sui bordi e la limitazione dovuta all’overflow degli interi; facoltativamente, aggiungi l’esempio richiesto o un collegamento a Reference Source. Il lavoro è completato quando il riferimento dell’API indica chiaramente entrambi i comportamenti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- csharp
- Ambito
- documentation
- Tipo di issue
- Documentazione
- Difficoltà
- 1/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 38/100