On Fri, Aug 1, 2008 at 9:37 PM, Christopher Barker
<[EMAIL PROTECTED]> wrote:
> You'll see that there is a lot of code to get it to draw just what is
> still visible of the existing buffer. You should be able to replace all
> that with a call to:
>
> self.Canvas.MoveImage(DiffMove, 'Pixel')

This is my OnMove method:

def OnMove(self, event):
        # Allways raise the Move event.
        self.Canvas._RaiseMouseEvent(event,FloatCanvas.EVT_FC_MOTION)
        if event.Dragging() and event.LeftIsDown() and not
self.StartMove is None:
                StartMove = self.StartMove
                EndMove = N.array(event.GetPosition())
                DiffMove = StartMove-EndMove
                if N.sum(DiffMove**2) > 16:
                        self.Canvas.MoveImage(DiffMove, 'Pixel')

it works, however it is not really fluent; I guess it caused by the
constant updating, hence we need the timer stuff you mentioned.

I'm not really sure how to implement it. It would be nice if I could
just set a flag to enable it :)

> By the way, what are you using it for? I like to know.

I would like to build a block diagram editor with ports and lines
between the blocks. I don't anticipate many objects, so high quality
output with anti aliasing is more important than performance.

Ideally I would also like to load a SVG directly since I find it
easier to draw an image in inkscape than to build my image by hand.
However, I know that is not supported by floatcanvas.

(persistance is not necessary for my project. I will just save the
coordinates of my objects)

> Also, be aware that we are in the midst of a Google Summer of Code
> project to re-factor FloatCanvas. We're having some of the discussion on
> this list, so please feel free to take part.

Thank you. I know about the google soc; right now I'm waiting for that
to finish to see how floatcanvas turns out.

Will anti aliasing and hit testing work at the same time in the future?

Regards,

/Chris
_______________________________________________
FloatCanvas mailing list
[email protected]
http://mail.mithis.com/cgi-bin/mailman/listinfo/floatcanvas

Reply via email to