[Etoys] repairs for one vertex polygons
peace_the_dreamer at yahoo.com
Mon Mar 2 17:49:58 EST 2009
Hayashi-san works fast! :)
I have downloaded his fix and will play with it soon.
Hayashi-san's fix seems to address other code than my fixes.
Other than updateHandles (and setVertices: ) they don't seem to collide. So my general recommendation would be to combine both.
His fix does not address the ungrowable one vertex problem which would be considered a separate bug from what antonio reported.
Also having a factored out midPoints method gives a lot of useful options going forward. You could create a polygon from just the midPoints for example.
The tests hasArrows and isCurvy are also frequently needed and factoring them out simplifies code and reduces bugs.
When a curve is down to two points isCurvy recognizes that there is no reason to use the curve calculations. This benefits a little bit in terms of speed and it also helps proper placement of the midpoints.
The code I sent you has been in use in 3.9 and 3.10.2 so I have some confidence in it being solid.
What are Hayashi-san's thoughts?
Yours in curiosity and service, --Jerome Peace
--- On Mon, 3/2/09, Yoshiki Ohshima <yoshiki at vpri.org> wrote:
> From: Yoshiki Ohshima <yoshiki at vpri.org>
> Subject: Re: [Etoys] repairs for one vertex polygons
> To: etoys at lists.laptop.org
> Date: Monday, March 2, 2009, 3:35 PM
> Thanks, Jerome,
> In the meantime (ah this happened again), Hayashi-san had
> proposed fix that looks like attached. This is really the
> minimum fix
> and easier to adapt I consider, but what is your opinion?
> -- Yoshiki
> Etoys mailing list
> Etoys at lists.laptop.org
More information about the etoys-dev