>
> > > Most systems that support display rotation do so at the WM=20
> > level, not at
> > > the GUI level, so you probably need to investigate xrandr=20
> > and so forth
> > > to see how that is done.
> > >
> > Thanks, I tried xrandr, it can rotate the frame buffer, but=20
> > the widget are still the previous size, I use fltk::scale()=20
> > function to scale the widget, but failed, why? Thanks.
>
>
> I doubt that ::scale() will work for you like that - it modifies the
> rendering context for some of the more elaborate drawing functions by
> applying a scaling transform, but AFAIK none of the basic widgets are
> affected by the transform.
> And you would not want them to be, as that would stretch/squeeze the
> widget, nit re-draw it with its axes flipped. That would have a pretty
> nasty effect on text rendering, for example...
>
> What we normally do is detect the rotation event from xrandr, and when
> we see the display flip from portrait to landscape we walk the widget
> tree calling widget->resize(x,y,w,h); on each widget to reset its
> size/position for the new display layout.
>
> Then at the end of the tree-walk, call redraw() on the outermost window
> and it all magically flips to the new layout...
>
> There may be some better way, but I don't know what it is. This way is
> not that hard though.
>
>
Thanks. I have use resize function to resize the window, and it's widget, it is 
OK. But has one problem, if the widget has image in it, the image will not 
scale with it.  How to make the image also scale together with the widget?

Best regards,
Leo Wang
>
>
> SELEX Galileo Ltd
> Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS=
> 14 3EL
> A company registered in England & Wales.  Company no. 02426132
> ********************************************************************
> This email and any attachments are confidential to the intended
> recipient and may also be privileged. If you are not the intended
> recipient please delete it from your system and notify the sender.
> You should not copy it or use it for any purpose nor disclose or
> distribute its contents to any other person.
> ********************************************************************
>

_______________________________________________
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to