Laurent Veilleux wrote: > I am trying to display an image as a background of my doc that's why I > have override the > > a2dCanvasView::PaintBackground(x,y,width,height) in my custom canvas view > > Currently I use the m_drawer2D->DrawImage(...) call to draw my image > but it's slow with big image when zooming, cause it seems that it draw > even on not displayed area
I think that is right. a2dDcDrawer::DrawImage() Maybe there is a way to optimize it a bit, but in any case you need to make a bitmap in order to draw it using wxDC. The scaled image that needs to be drawn, would be best generated by first calculating its size, and next take for each pixel in the image to draw a sample from the original image with the inverse matrix. This is how Agg does it. I only never came to implementing this myself. > > How can i do ? i can get the wxDc of the window but i will have to > recompute by myself the image to display according to mapping value :/ Right, that is what happens now, but search dcdrawer.cpp for DrawImage. Klaas -- Unclassified ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Wxart2d-users_dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wxart2d-users_dev
