From: Keith <wahooney@gm...> - 2008-05-08 23:05:13
I'm busy developing a cool new drawing tool for Inkscape (one that I've
been dying to implement since using Inkscape :D ), the core is pretty
much finished, but I'm running into a bug which can be resolved by
implementing a feature of the tool that I have no clue on how to achieve
My tool creates a GrayMap when the mouse button is pressed, updates it
as the mouse is moved then processes and destroys it when the mouse
button is released. I need to be able to show the GrayMap, any other
kind of bitmap will do, on the canvas and then hide it when not used.
How can I do this? I've been looking around and I can't find any
examples in the existing code that does something like it.
I'd really appreciate any help guys.
On Thu, May 8, 2008 at 8:04 PM, Keith <wahooney@...> wrote:
> My tool creates a GrayMap when the mouse button is pressed, updates it
> as the mouse is moved then processes and destroys it when the mouse
> button is released. I need to be able to show the GrayMap, any other
> kind of bitmap will do, on the canvas and then hide it when not used.
I'm afraid we don't have a CanvasItem that would display bitmaps, at
this time. We have them for paths, rects, filled quadrilaterals, and
small things like handles or controls of various shapes, but not for
bitmaps. If your helper display really requires bitmaps, I think you
will need to create a new kind of canvas item for that. You can take
e.g. the sp-ctrquadr as the canvas item boilerplate and use the image
displaying code from the image arena item in nr-arena-image.
Inkscape. Draw Freely.