Sam wrote:
> I remember reading in the source code that ScaledBitmap2 is 
> experimental.  Have you made any progress on this since the wx 2.8 release?

not really.

> I was using the original ScaledBitmap, but it was causing X Windows to 
> run out of memory and have a BadAlloc error.

Quite possible - the way ScaledBitmap works when you zoom in is to scale 
the entire image up to the zoomed size, and then display it, even if 
only a fraction of the image is shown. That works fine for little 
bitmaps like icons and the like, but not for larger images, as you've seen.

> ScaledBitmap2 behaves, and seems to do exactly what I want, but there 
> are two problems at the moment. 
> 1) If I zoom out or pan such that the bitmap gets near the window 
> border, the bitmap will move but objects such as lines do not.

That is very odd -- it shouldn't have any effect on any other objects.

> 2) If I zoom in on the bitmap, it disappears!!

That sounds like a bounding box issue. What Position are you using? I 
think "tl" (Top Left) may be the only one that works.

As it happens, I just started looking at this the last couple days. Just 
day I did a project using it -- using a 5000x5000 pixel PNG as a 
background map for something, and it worked just fine -- but I know it 
does have bugs.

Do try the SVN version -- it may be better, but it's been a while since 
I've changed anything in it.

What you can do:

1) Make a as-small-as-possible example that demonstrates some of the 
problems you're having and send that here, I don't know how much time 
I'll have to take a look, but it's worth a try.

2) Take a look at the code yourself -- it's probably hard to decipher if 
you don't know the guts of FloatCanvas, but you never know! I do confess 
that I kept getting all confused with all the different coordinate 
systems, but maybe with fresh eyes you'll see things I didn't.

-Chris








-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

[EMAIL PROTECTED]
_______________________________________________
FloatCanvas mailing list
[email protected]
http://mail.mithis.com/cgi-bin/mailman/listinfo/floatcanvas

Reply via email to