Many thanks esteban - works fine now in Gtk
--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
boo... format lost :P
On Jun 16 2021, at 2:27 pm, Esteban Lorenzano 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 :
>
> SpAthensPre
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;
draw
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/Pha
Many thanks Estaban
--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
Hi,
So, I was able to reproduce your problem : for some reason, cairo does not
answer a correct surface extent while in x11 (I didn't noticed before because I
use wayland).
I can hack a solution (and I will), but have fear that will cause future
problems :/
Anyway, I will commit a fix and you w
Here are details of X11, the Image and the VM
X11
---
xdpyinfo | grep version
version number:11.0
X.Org version: 1.20.9
Image
-
/home/kmp/Pharo/images/gtkRoses/gtkRoses.image
Pharo9.0.0
Build information:
Pharo-9.0.0+build.1399.sha.9ae8329dedfbad7915b7b2cdc4accc7ce8109ce0 (64 Bit)
U
and which vm?
On May 25 2021, at 1:43 pm, Esteban Lorenzano wrote:
> x11 ?
>
> On May 25 2021, at 12:43 pm, kmo wrote:
> > I'm running Xubuntu 20.04. I didn't install Gtk - it comes with the OS.
> >
> > I'm using the Nvidia video driver. Perhaps that has an effect.
> >
> >
> > --
> > Sent from:
x11 ?
On May 25 2021, at 12:43 pm, kmo wrote:
> I'm running Xubuntu 20.04. I didn't install Gtk - it comes with the OS.
>
> I'm using the Nvidia video driver. Perhaps that has an effect.
>
>
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>
I'm running Xubuntu 20.04. I didn't install Gtk - it comes with the OS.
I'm using the Nvidia video driver. Perhaps that has an effect.
--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
Hi again,
Mmm that should not be possible. Can you tell me how are you installing and
running your gtk backend?
Also, not today and not tomorrow (because I am busy), but you can contact me
from thursday in discord and I can try to help you pair programming with you.
Esteban
On May 25 2021,
Hi Estaban.
Thank you for your helpful and prompt replies to my problem. Unfortunately,
your code does not work for me.
I pasted your code into a playground. When it runs I get no errors but I get
a completely blank window - no sign of the colour gradient.
If I change the backend to #Morphic,
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 surfa
I should also point out that nothing works unless I also set a surfaceExtent
when the presenter is set up -
initializePresenters
rosesAthensPresenter := RosesAthensPresenter new.
rosesAthensPresenter surfaceExtent: 400 @ 400.
rosesAthensPresenter drawBlock: [ :aCanvas |
I'm afraid it still doesn't work for me.
If I have a drawBlock like this:
drawBlock
^ [ :aCanvas |
| paint surface |
surface := aCanvas surface.
paint := surface
createLinearGradient: {
(0 -> Co
Hi,
short answer: you can't (and you shouldn't) :)
long answer: conceptually, a presenter does not has an extent because it is not
a component by itself, is just a set of other presenters arranged into a layout.
However, that does not means you can't know the extent where your athens
component
16 matches
Mail list logo