2016-09-13 23:18 GMT+02:00 Alexandre Bergel <alexandre.bergel(a)me.com>om>:
Hi Nicolai,
This is old code. Maybe at that time we did not have a great understanding
of Athens. We use it to create path. For example:
TRBoxShape>>computePath
canvas ifNil: [ ^ self ].
path := self athensCanvas
createPath: [ :builder |
builder
absolute;
moveTo: rectangle topLeft;
lineTo: rectangle topRight;
lineTo: rectangle bottomRight;
lineTo: rectangle bottomLeft;
lineTo: rectangle topLeft;
closePath ]
We can easily rename the variable. But I am wondering whether we can
remove that variable
Yes I see, it is still needed for creating paths. But it is overall
confusing :)
In this piece of code:
TRBoxShape>>computePath
canvas ifNil: [ ^ self ].
path := self athensCanvas
canvas is a TRCanvas
self athensCanvas is
self canvas athensCanvas
TRCanvas>>athensCanvas is "self canvas"
and TRCanvas>>canvas is "check session and create a Surface if needed".
: )
Cheers,
Alexandre
On Sep 12, 2016, at 6:56 AM, Nicolai Hess
<nicolaihess(a)gmail.com> wrote:
During debugging the Athens-Crash I found something strange about
TRCanvas
(not responsible for the crash)
1. TRCanvas canvas instance variable is not a AthensCairoCanvas at all
but an
AthensCairoSurface
2. the canvas resp. surface is initialized with
TRCanvas initial extent
but a change on TRCanvas extent does not change the
surfaces extent
3. Is this canvas resp. surface actually used ?
Do we only need it to
manage some external resources (path/ image forms) ?
Can it be removed or at least renamed to something different.
regards
nicolai
_______________________________________________
Moose-dev mailing list
Moose-dev(a)list.inf.unibe.ch
https://www.list.inf.unibe.ch/listinfo/moose-dev
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________
Moose-dev mailing list
Moose-dev(a)list.inf.unibe.ch
https://www.list.inf.unibe.ch/listinfo/moose-dev