wxBufferedPaintDC wxAutoBufferedPaintDC and DC scaling

Bill Baxter wbaxter at gmail.com
Fri Jul 6 21:02:03 PDT 2007


There is also wxGraphicsContext and wxGCDC available now in the latest wx,
which seem to do reasonable scaling on Windows, for some definitions of
reasonable [1].
--bb

[1] The definition of reasonable in this case is that you only expect
uniform scaling to work, and you expect pen widths to scale with the zoom
level.  I.e. you want 3 pixel-wide pen to become a 6-pixel pen when the view
is scaled 2x.  I believe wxArt2D makes it possible to either scale or not
scale pen widths, depending on your needs, and even to do it differently per
object.


On 7/7/07, Doug McCorkle <mccdo at iastate.edu> wrote:
>
> Thanks for the information. I assume this is the project?
>
> http://wxart2d.sourceforge.net/
>
> It looks like it will do the trick. Thanks again!
>
> Doug
>
> On Jul 6, 2007, at 6:02 AM, Klaas Holwerda wrote:
>
> > Hi,
> >
> > In wxArt2D i decided to not scale using wxDC, but build on top of
> > it a drawing context which works in doubles, and does scale
> > properly. This also made it possible to use the Agg Antigrain
> > library to draw with subpixel accuracy and alpla etc.
> > So maybe you should just have a look there, setup a a2dCanvas
> > (scrolling, updating all there), add objects on it,
> > and zoom to whatever deep you like.
> > It much depends on what you need to do, but zooming sounds like
> > drawings that are shown, and that fits wxArt2D.
> >
> > Klaas
> >
> >
> > Doug McCorkle wrote:
> >> Hello,
> >> When using wxBufferedPaintDC and wxAutoBufferedPaintDC is it
> >> possible to utilize the SetUserScale function? I have found
> >> various threads that make it seem like this funcitonality is not
> >> possible. If it is not possible to utilize scaling with these DC
> >> implementations is there another way to setup "zooming" on a DC?
> >> As a side note, with wxMac scaling seems to work well and the
> >> drawing appears to very smooth. With wxMSW, I see artifacts with
> >> scale values other than 1. With wxGTK the problem is also not
> >> present so it appears that this is only an issue with wxMSW. Is
> >> there a simple solution to this or something that needs to be
> >> implemented for the windows specific builds?
> >> I am implementing the DC's in a wxScrolledWindow. Doug
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wx-users/attachments/20070707/6e8=
09f4c/attachment.htm


More information about the wx-users mailing list