Guidance
指路人
g.yi.org
Guidance Forums / wxWidgets (wxWindows) in C++ / zoom

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. zoom
#4045
Posted by: 2004-05-06 15:43:21
Hi,
I'm a student and I have to do a zoom on a wxBitmap image. So I paint it in a
wxClientDc with dc.DrawBitmap and I use dc.SetUserScale in order to zoom. But it seems that this way doesn't give an exact result: I compare my result with the result given by an other software and it's quite different.

Is there another mean to make a zoom?
Is there a bug?


thank you for your help
Message2. Re: zoom
#4046
Posted by: upCASE 2004-05-06 16:39:59
Hi!
What do you mean with "the result given by an other software and it's quite different"? In how far are they different, what did you expect?
Maybe using wxImage helps. Create an wxImage, use wxImage::Scale() on it and draw the result. Just a guess, though, but I suppose that wxImage processed images may look better than just scaled bitmaps...
In general I'd advise you to use wxImage instead of wxBitmap whenever possible and convert wxImages to wxBitmaps if needed.
upCASE
-----------------------------------
If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Message3. Re: zoom
#4048
Posted by: 2004-05-06 16:48:37
Hi,
I mean that when I tried to view the coordinates (in pixel) of my mouse, there is a shift between what I see and what the functions GetLogicalPosition and GetViewStart give. For exemple, with an image 160x160, the last columns of pixels is the number 160 whereas it should be the numbre 159 because it starts by 0.
It seems to be as if SetUserScale was not exact.
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Fri 2024-3-29  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0