pharo-graphics / Roassal

The Roassal Visualization Engine
MIT License
16 stars 12 forks source link

Wrong answer of "contains point" of polygon with radius #62

Open tinchodias opened 7 months ago

tinchodias commented 7 months ago

The orange polygon, that has rounded corners, shouldn't highlight (the gray triangle is just a visual reference).

https://github.com/pharo-graphics/Roassal/assets/3044265/11bce704-ebdc-49f1-805a-b4cec52d1fbe

Reproduce with:

c := RSCanvas new.

triangleCorners := { 0 @ -50. 200 @ 0. -200 @ 0 }.

reference := RSPolygon new
        points: triangleCorners;
        color: Color lightGray;
        yourself.
c add: reference.

polygon := RSPolygon new
        points: triangleCorners;
        color: Color orange;
        yourself.
polygon cornerRadii: 20.
polygon @ (RSHighlightable new highlightColor: Color blue).
c add: polygon.

c open