boo... format lost :P On Jun 16 2021, at 2:27 pm, Esteban Lorenzano <estebanlm@netc.eu> wrote:
Hi, Yes, it is there. Thing is... since cairo does not informs correctly extent of surface in x11, what I did is to add an extra parameter to the drawing block, as you can see in the example :
SpAthensPresenter>>#exampleResizing | extent | extent := 350@300. self new surfaceExtent: extent; drawBlock: [ :aCanvas :boundingBox | | paint surface | "Since sometimes a cairo surface does not brings the correct extent (in X11 or Windows, for example), we use the bounding box of the component." surface := aCanvas surface. paint := surface createLinearGradient: { 0->Color red. 1->Color green } start: 0@0 stop: boundingBox extent. surface clear. aCanvas setPaint: paint. aCanvas drawShape: (0@0 extent: boundingBox extent) ]; openWithSpec
That was tested on Wayland and x11 and it was working properly :) Esteban
On Jun 16 2021, at 2:20 pm, kmo <voxkmp@gmail.com> wrote:
Hi Esteban
Do you know when the fix for the extent problem under Gtk will be in the image? I downloaded the latest Pharo 9 image a couple of days ago and, though the fix was in for the extent problem in Morphic, it still didn't work in Gtk.
Thanks. Ken
-- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html