[squeak-dev] Squeak clock face
arning315 at comcast.net
Mon Dec 18 19:15:02 UTC 2017
On 12/18/17 1:51 PM, Louis LaBrunda wrote:
> Hi Tim,
> Can you please explain what this does:
> pointerMorph position: pointerMorph extent * ( -0.5@ -0.65).
> especially what does "* ( -0.5@ -0.65)" do
multiplication of a point (extent) by another point (-0.5 @ -0.65) gives
a point as the result. The x-coords are multiplied together and the
y-coords similarly. In this case, the pointerMorph will be positioned
centered on 0 in the x axis (from -0.5 width to +0.5 width) and mostly
above 0 on the y axis (from -0.65 height to +0.35 height). This likely
will result in pleasing rotation about 0 at 0. Of course, you could put a
halt in the code and check this for yourself.
> and why and what do -0.5 and -0.65 relate to?
> On Fri, 15 Dec 2017 14:33:34 -0800, tim Rowledge <tim at rowledge.org> wrote:
>>> On 15-12-2017, at 2:01 PM, Louis LaBrunda <Lou at Keystone-Software.com> wrote:
>>> I have sub-classed RotaryDialMorph similar to Tim's ClockDialMorph. Tim has
>>> the hands (minute and hour) rotate around one of their ends. I'm trying to get them to rotate
>>> around a point say 20 pixels in from that end. How should I do this?
>> Take a look also at Barometer (etc) morph>>initialize to see how the fancy needle is created and positioned
More information about the Squeak-dev