<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 7/4/2020 5:46 PM, Hilaire Fernandes via Cuis-dev wrote:
<blockquote cite="mid:72ef517f-7bf8-d77e-6a72-eda16b04582e@drgeo.eu"
type="cite">
<pre><font size="+1"><font color="#863266">containsPoint: aPoint
(super containsPoint: aPoint) ifFalse: [^ false].
(closed and: [color isTransparent not]) ifTrue:
[ ^ (self filledForm pixelValueAt: aPoint - bounds topLeft + 1) > 0].
self lineSegmentsDo:
[ :p1 :p2 |
(aPoint onLineFrom: p1 to: p2 within: (3 max: borderWidth+1//2) asFloat)
ifTrue: [^ true]].
self arrowForms do:
[ :f | (f pixelValueAt: aPoint - f offset) > 0 ifTrue: [^ true]].
^ false</font></font></pre>
</blockquote>
<br>
Hi Hilaire,<br>
<br>
The first thing to mention is that PolygonMorph should not inherit
from RectangleLikeMorph. PolygonMorph is more like M3Exp01Morph,
M3Exp02Morph and M3Exp03Morph. But these also don't work well yet.
Damage areas are not reported correctly and morphContainsPoint:
doesn't work either.<br>
<br>
The VectorGraphicsPasteUpMorph was just a hack to let you play with
vector graphics drawing, but I guess it is time to clean it up, make
it usable, and integrate it. Then it will make sense to start
building things like PolygonMorph in a clean style.<br>
<br>
Please give me a few days to work on this.<br>
<br>
Cheers,<br>
<pre class="moz-signature" cols="72">--
Juan Vuletich
<a class="moz-txt-link-abbreviated" href="http://www.cuis-smalltalk.org">www.cuis-smalltalk.org</a>
<a class="moz-txt-link-freetext" href="https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev">https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev</a>
<a class="moz-txt-link-freetext" href="https://github.com/jvuletich">https://github.com/jvuletich</a>
<a class="moz-txt-link-freetext" href="https://www.linkedin.com/in/juan-vuletich-75611b3">https://www.linkedin.com/in/juan-vuletich-75611b3</a>
@JuanVuletich</pre>
</body>
</html>