Hi.
Thanks for all your answer!!
My goal is a merge of MovingTriangle (floatCanvas SVN demo) and OGL
wxdemo example... I would to use the draggable object in map, easy way
to draw the lines between the object (persistent in moving) and
zoomable app...
Thanks again!!
Marco

On 5/14/07, Christopher Barker <[EMAIL PROTECTED]> wrote:
> Welcome Marco,
>
> First, thanks to everyone that has already replied to Marco -- I try to
> have email-free weekends, and it's great to know that a little community
> has sprung up around FloatCanvas.
>
> Marco Meoni - Sbaush wrote:
> > Good!! I've downloaded the svn Demo directory and i've try some demos!
> > For my goal the best demo is MovingTriangle.py. To be perfect i should
> > can draw lines between objects and can use simple png instead of
> > triangles. Is it possible?
>
> Yes, it certainly is. Most of the code in MovingTriangle is not the
> least bit specific to triangles. You should be able to translate it to
> any other type of FloatCanvas.DrawObject, including either a Bitmap or a
> ScaledBitmap.
>
> > Is there a simple how to that i can read to learn the FloatCanvas basics?
>
> I'm afraid not. It would be great to have one, but I haven't found the
> time to write such a thing yet. Your only option is to look at the
> sample code and the sources. Also the Doxygen-generated docs that are
> linked to from the Wiki may be helpful. Be sure to browse the archives
> of this list too, it will help you get to know FloatCanvas.
>
> It would be great if you took this learning opportunity to write things
> down as you learn them -- it could be a good start to a tutorial. If you
> put what you do in the Wiki, then the rest of us can edit it and offer
> suggestions.
>
> As for drawing lines between the bitmaps -- there are a couple options
> for that. Adding the lines is easy, but I'm not sure the best way to
> keep them synchronized with the bitmaps. The easiest way would be to
> keep track of it yourself -- when you move a bitmap, make sure you move
> the line too.
>
> More elegant would be to have the lines reference the bitmaps so that
> they are always in sync. I haven't fully fleshed this idea out yet, but
> I think It might work well to create a new DrawObject, a "Connector",
> that would take as input a reference to the two objects you want
> connected. Then, in its _draw method, it would get the coords of the two
> other objects( If it is derived from XYObjectMixin, then it will have a
> .XY attribute that is it's coords). You can then  draw the line from there.
>
> Come to think of it, this is a good opportunity for a tutorial on making
> a custom DrawObject too.
>
> Keep the questions coming,
>
> -Chris
>
> --
> Christopher Barker, Ph.D.
> Oceanographer
>
> Emergency Response Division
> NOAA/NOS/OR&R            (206) 526-6959   voice
> 7600 Sand Point Way NE   (206) 526-6329   fax
> Seattle, WA  98115       (206) 526-6317   main reception
>
> [EMAIL PROTECTED]
> _______________________________________________
> FloatCanvas mailing list
> [email protected]
> http://mail.mithis.com/cgi-bin/mailman/listinfo/floatcanvas
>


-- 
Marco Meoni (Sbaush)
_______________________________________________
FloatCanvas mailing list
[email protected]
http://mail.mithis.com/cgi-bin/mailman/listinfo/floatcanvas

Reply via email to