I'm not familiar with PGU's api in regard to diagramming capabilities, but
if I were using pygame for something like this, i'd do something like the
following.

It seems like you should be able to write a handler for mouse clicks.  In
that handler, you'd check to see if the user clicked on one of your
sprites.  if so, you'd probably set it up to be selected and maybe throw up
grabbable "handles" around it.  Then, just set up additional logic for
dragging a handle (or edge of the sprite if not using handles) to resize the
sprite.  you could also change the mouse cursor when over a handle.
similarly, you may want to handle drag events for the sprite itself, not
just the edges (so you can move them around).  So, you want to handle
MOUSEBUTTONDOWN (to select a sprite or a handle and start a drag operation),
MOUSEBUTTONUP (to finish the drag operation), and MOUSEMOTION (to update the
screen during the drag operation).

Oddly enough, I've been looking for a diagramming library myself, but since
I am using wxPython this time around, I will probably go with something like
wxOGL (unless I find something more suited to my needs).

Also, for future reference,  screenshots are more or less useless (as I am
familiar with both visio and google image search), but source code is
appreciated, since I don't know if the above approach works for you or not,
what you've tried so far, etc.


--p

On Thu, Aug 7, 2008 at 3:50 AM, Paulo Silva <[EMAIL PROTECTED]> wrote:

> please show us screenshots - there are lots of people, like me, having
> absolutelly no idea about what Visio is (and as well not that curious
> about Microsoft's applications)
>
> thanks,
> Paulo
>
> -----------------
>
>
>
> On Thu, Aug 7, 2008 at 7:25 AM, Sibtey Mehdi <[EMAIL PROTECTED]>
> wrote:
> > Hi,
> >
> > How to write the resizable Notes on pygame surface similar to paste it
> note
> > in Microsoft visio. I have just gone through the pgu utilities but
> couldn't
> > get it properly. Any help on how to use pgu or any better way to write
> the
> > note is appreciated.
> >
> >
> >
> >
> >
> > Thanks,
> >
> > Sibtey
> >
> >
>

Reply via email to