Re: Independent X/Y scaling in GnomeCanvas...



>    After reading through the documentation on affine transforms, I've
> come to the unfortunate conclusion that it is impossible to scale the
> canvas, or objects within it, independently in the X and Y dimensions.
> Am I correct about this?
> 
>    The functionality I'm trying to achieve is to have a chart in a
> scrolled window which can be "squeezed" and "expanded" so that varying
> amounts of the chart are visible, but only in the X direction; the
> chart would always be scaled so that its height precisely matches the
> height of the scrolled window viewport.  Clearly, I can accomplish
> this by having a routine which simply goes through every item on the
> canvas and scales its X values or Y values as necessary, but if there
> is a way to compose affine transforms to get this effect, it would
> obviously simplify the code enormously.

Well, how about making a canvas group item, then put all the items that
make up the chart into this group. Finally, apply the appropriate affine
transformation onto the group, which should scale all it's children
appropriately.

    = L

/-------------------------------------------------------------------\
|   LOBAN AMAAN RAHMAN  <-- anagram of -->  AHA! AN ABNORMAL MAN!   |
|  MSC #763, Caltech, Pasadena, CA 91126, USA. Tel: 1-626-395-1035  |
|     loban earthling net, loban caltech edu, http://i.am/loban     |
\-------------------------------------------------------------------/





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]