Hi,
i am developing an application prototype and i would like to use wxWindows ( i tried Fox - nice but not much useful in my case - and QT - lovely, but no free edition under Windows, so goodbye ).
The most important component of my application ( a neural network that works on images to produce data for a BDI agent ) wil be an image-showing control on which i have to draw polygons and detect the underlying pixels.
Now i spent not much time looking at docs ( maybe tonight i'll find few time ), so i would like to know if there's any wx control that works this way ( something like a canvas ) and if there are sample apps / tutorials.
I am quite sure they exist, but little help will be appreciated.
Thanks in advance,
j0k3r
Canvas
Hi!
For a canvas, there is no such specific class, but a wxPanel will just be fine. Then construct a wxDC derived class like wxClientDC and use that for doing the actual drawing.
For a canvas, there is no such specific class, but a wxPanel will just be fine. Then construct a wxDC derived class like wxClientDC and use that for doing the actual drawing.
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4
"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4
"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda
Or a wxScrolledWindow which is also good for your purpose. Check the Life demo it contains a lot of custom drawing, although no pixel detection.
If you are going to detect pixels directly off the canvas be aware that after an expose event, things get redrawn. I think the best solution is keeping a x,y array in memory and using the control only for display .. this is to minimize the risk of colour displacement (256 colors dithering etc) exposure events or overlaps.
If I misinderstood that part about pixel detection, then never mind
- Jorgen
If you are going to detect pixels directly off the canvas be aware that after an expose event, things get redrawn. I think the best solution is keeping a x,y array in memory and using the control only for display .. this is to minimize the risk of colour displacement (256 colors dithering etc) exposure events or overlaps.
If I misinderstood that part about pixel detection, then never mind
- Jorgen