[etoys-dev] x-y plane questions

Ricardo Moran richi.moran at gmail.com
Sun Mar 18 15:44:40 EDT 2012


I think this could be a useful usage of the "transform" tiles I proposed a
while back and never sit down to implement. You could change the rotation
center to the 0 point a lot more easily and all within Etoys (without
Smalltalk code).
I'll try to make the tiles today even if it's too late to include them in
the release.

Cheers,
Richo


On Sun, Mar 18, 2012 at 4:30 PM, Ricardo Moran <richi.moran at gmail.com>wrote:

>
>
> On Sun, Mar 18, 2012 at 10:12 AM, Steve Thomas <sthomas1 at gosargon.com>wrote:
>
>> Scott,
>>
>> I started looking at the code and was able to change the tick mark
>> width's for the number lines and playing with the marksWidth/marksHeight.
>> Part of the issue I was having was that the GraphPaper's line width was
>> 1, but the mark's with was 2, so there was no way to center them.
>> See samples below:
>> [image: Inline image 1]
>>
>> But I couldn't figure out how to change the pixel width of the graph
>> paper, could you point me in the right direction, thanks.
>> Also any hints on how can I set the rotational center of the number line
>> to its "0" point?  I can do it with Etoys tiles, But need hints on where
>> would I modify the code and figure out the zero point.
>>
>
> Hi Steve,
>
> I think you can change the rotation center to its 0 point by evaluating
> this:
>
> For horizontal number lines:
>
>> self rotationCenter: ((self left + self offset + (0 - minValue *
>> pixelsPerUnit)) @ (self top + self marksHeight)) - self topLeft / self
>> extent * 1.0
>
>
> For vertical number lines:
>
>> self rotationCenter: (self left + self legendsWidth) @ (self bottom -
>> self offset - (0 - minValue * pixelsPerUnit)) - self topLeft / self extent
>> * 1.0
>
>
> To keep it updated this would have to be hooked up everywhere the number
> line can change its size. And (maybe) something should be done in case the
> 0 point is not visible.
>
> Cheers,
> Richo
>
>
>> Thanks,
>> Stephen
>>
>> _______________________________________________
>> etoys-dev mailing list
>> etoys-dev at squeakland.org
>> http://lists.squeakland.org/mailman/listinfo/etoys-dev
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakland.org/pipermail/etoys-dev/attachments/20120318/489b3628/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen shot 2012-03-18 at 8.57.56 AM.png
Type: image/png
Size: 59439 bytes
Desc: not available
URL: <http://lists.squeakland.org/pipermail/etoys-dev/attachments/20120318/489b3628/attachment-0001.png>


More information about the etoys-dev mailing list