This project is read-only.

How to get nana::paint::image from nana::paint::graphics

May 22, 2013 at 5:54 PM
I need to get stretched image.
But result of image::stretch is nana::paint::graphics.
So tell me please,how can I convert it back to nana::paint::image?
May 22, 2013 at 6:00 PM
The graphics can not be converted to image. Do you want to save it in a file?
May 22, 2013 at 6:08 PM
No.I wanted to convert graphics to image,because I use nana::gui::picture.
It can load images.But I have fixed size bmp and window,that can be resized.
So I need to use stretch.
I thought that I could use nana::gui::drawing and paint event,but it doesn't seem to exist.
May 22, 2013 at 6:21 PM
Edited May 22, 2013 at 7:01 PM
Maybe there is another way to stretch an image
or to use graphics with picture?
May 22, 2013 at 7:01 PM
It does not need a paint event when you use drawing. You can try it.
May 22, 2013 at 7:05 PM
Edited May 22, 2013 at 7:12 PM
Yes,but I will need to redraw it every time when window updates.
And I don't know how to do it without paint event.
Or do you mean that nana::gui::drawing drawes every time when window updates?
May 22, 2013 at 7:13 PM
drawing.draw(functor); you can do your redraw in the functor.
May 22, 2013 at 7:15 PM
Oh,thank you.I thought that drawing do it only once.
Sorry for this misunderstanding.