On Tue, Aug 25, 2009 at 10:13 PM, Eric Wilhelm<[email protected]> wrote: > # from Gabor Szabo > # on Tuesday 25 August 2009 09:16: > >>I am playing with an idea for which I need to be able to have >>a canvas and move around images either by the mouse (drag-and-drop) >>or on their own. >> >>I could not find an example in the Wx::Demo. > > The demo has drag-n-drop for images, but you don't actually want that > (clipboard copy+paste) behavior, right? > > It sounds like you're just looking to reposition an image object on a > canvas. If so, you want EVT_LEFT_DOWN() then maybe motion and up > events. This example might help: > > http://svn.scratchcomputing.com/wx_hacks/trunk/bin/cropper > > What I'm doing there is moving a crop box around on a still image. It > sounds like you want exactly that where s/crop box/image/. See also > the description here: http://scratchcomputing.com/software/ . > > --Eric
I tired it $ perl cropper Use of uninitialized value $file in pattern match (m//) at /home/gabor/perl5lib/lib/File/Fu/File.pm line 105. Use of uninitialized value $file in pattern match (m//) at /home/gabor/perl5lib/lib/File/Fu/File.pm line 105. Use of uninitialized value in concatenation (.) or string at /home/gabor/perl5lib/lib/File/Fu/File.pm line 146. Illegal division by zero at cropper line 216. then I tried $perl cropper image.jpg I had to enlarge the window to see anything besides a white window. Once I did that I saw the picture with a green - - - line around it but could not do anything. What have I missed ? Gabor
