Re: canvas notes [zoom dependent container]
- From: Alexander Larsson <alexl redhat com>
- To: "Gustavo J. A. M. Carneiro" <gjc inescporto pt>
- Cc: Havoc Pennington <hp redhat com>, gtk-devel-list gnome org, Arjan Molenaar <a molenaar yirdis nl>, Soeren Sandmann <sandmann daimi au dk>
- Subject: Re: canvas notes [zoom dependent container]
- Date: Thu, 08 Sep 2005 19:16:47 +0200
On Thu, 2005-09-08 at 17:00 +0100, Gustavo J. A. M. Carneiro wrote:
> On Thu, 2005-09-08 at 14:31 +0200, Alexander Larsson wrote:
> > At some level this is perfectly fine, however when you start to change
> > the geometry (i.e. the size, position and number of canvas items) things
> > get really hairy. In a design where you can have multiple views of one
> > canvas you suddenly get different canvas layouts depending on what view
> > you look at.
>
> Maybe the best solution is to simply apply scaling transformation
> normally for zooming, but let canvas items call userspace-to-pixels[1]
> cairo mapping functions to determine how much information to display
> considering the physical screen space available. This way, naïve/simple
> canvas items just scale naturally with no intervention, while more
> advanced items can peek into the zoom factor to decide if more
> information should be displayed.
This is what most canvas implementations do to get this. As I said, this
is all fine if you just change how you render the canvas in the view.
However, if you use the canvas-to-view transformation from the view
affect the actual layout of the canvas items (e.g. add a new child item
depending on zoom factor) things break. I mean, if you show two views of
the same canvas, one with a large zoom factor and one with a small zoom
factor, does the child item get added?
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
alexl redhat com alla lysator liu se
He's a time-tossed shark-wrestling gangster who must take medication to keep
him sane. She's a brilliant wisecracking bodyguard who hides her beauty behind
a pair of thick-framed spectacles. They fight crime!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]