Well, I noticed that it was working on gtk backend but not in morphic this works perfect: exampleResizing | extent | extent := 350@300. SpAthensPresenter new application: (SpApplication new useBackend: #Gtk); surfaceExtent: extent; drawBlock: [ :aCanvas | | paint surface | surface := aCanvas surface. paint := surface createLinearGradient: { 0->Color red. 1->Color green } start: 0@0 stop: surface extent. surface clear. aCanvas setPaint: paint. aCanvas drawShape: (0@0 corner: surface extent) ]; openWithSpec. but it does not work if you change the backend for morphic. Anyway, I submit a fix: https://github.com/pharo-spec/Spec/pull/1075 It will be in image soon :) Esteban On May 24 2021, at 8:06 pm, kmo <voxkmp@gmail.com> wrote:
I should also point out that nothing works unless I also set a surfaceExtentwhen the presenter is set up -
initializePresenters rosesAthensPresenter := RosesAthensPresenter new. rosesAthensPresenter surfaceExtent: 400 @ 400. rosesAthensPresenter drawBlock: [ :aCanvas | | paint surface | surface := aCanvas surface. paint := surface createLinearGradient: { (0 -> Color blue). (1 -> Color black) } start: 0 @ 0 stop: 300 @ 300. surface clear. aCanvas setPaint: paint. aCanvas drawShape: (0 @ 0 corner: 300 @ 300) ].
-- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html