Re: Strange scaling issue



On Fri, 2008-12-05 at 09:42 +0100, Till Harbaum wrote:
> Hi,
> 
> i am facing an issue with my goocanvas based mapping application. So far goocanvas always
> worked well, but there's no an issue i cannot explain.
> 
> This is happening when i try to display small icons. If you've seen screenshots
> of my application you have perhaps seen those little red and green circles. These are "nodes", e.g.
> points defining a road or points representing a restaurant or so. I'd now like to use small icons 
> for these (in fact the styling presets i am importing from another application include icons).
> 
> Since the default icons are too big i'd like to scale them and this is where things go wrong. As
> long as i just load the icon images without scaling them they work fine. They still scale 
> perfectly with zooming and all other non-image nodes being in the same group are also 
> displayed just well.
> 
> But if i change the items scale to e.g. 50% by doing 
>    goo_canvas_item_scale(item, 0.5, 0.5);
> strange things start to happen. 
> 
> No icon is displayed anymore regardless what zoom i set.  And other nodes (all simple circles) 
> being part of the same canvas group aren't displayed anymore above a zoom level of ~ 1.0.
> 
> This only happens on the n810 (arm), not on the Maemo x86 emulation on the PC and not on the 
> desktop PC running stock ubuntu. This also happens regardless  of the goocanavs version. I've 
> seen this with ubuntus goocanvas 0.9 as well as a goocanvas 0.13 compiled by me.

That is pretty odd. Maybe try running it under valgrind on Linux to
check for any memory errors. (They can cause different problems on
different platforms.)

Other than that I can't really think of anything. Is the code for this
available somewhere?


> I know that you won't probably be able to help since the only setup showing these symptoms is the
> n810 based one. It may very well be an issue with the underlying graphics libraries which have a 
> problem scaling images down or so. The only thing that makes me think that perhaps the goocanvas
> itself is involved is the fact that other items in the same group are affected. And only these are affected
> and no other items. Are these groups a pure goocanvas internal thing or are these somehow exported
> to underlying graphics layers? E.g. in form of seperate windows/drawables/whatever?

The groups are pretty much an internal GooCanvas thing, so GooCanvas may
be involved. Though just changing the scale of one item is pretty simple
for GooCanvas to do - there isn't much to go wrong!

Damon




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