[PD] gop drawing
jancsika at yahoo.com
Sat Mar 21 00:06:03 CET 2015
On 03/20/2015 04:35 PM, Miller Puckette wrote:
> My memory on this isn't altogether reliable, but I believe I put in the
> extra deletion to fix a situation in which sometimes inlets and outlets
> on GOPs never got erased when the object was deleted. I wasn't able to
> figure out at the time how to get everything reliably erased exactly one
> time, so I gave up and erased it all twice.
> I have found the issue of when to draw and when to erase GOP stuff very hard
> to understand....
Ok, sounds like it's easiest to leave in the extra deletion for now.
One thing that simplifies all that is the svg group. For text objects
and iemguis the xlets are children of a parent "gobj" group. The
children inherit the translated position of the parent, as well as any
scaling factors (which saves many glist_x/ytopixels calls). Also, you
only have to create the parent "gobj" group to delete all the children.
(Other modern toolkits like Qt have similar grouping APIs, too.)
I think it's possible to do the same on the level of the gop, and make
all the visible xlets and gobjs be children of the parent gop group. I
was going to try that with garrays, but miraculously they seem to be
working at the moment. So I'm just going to back away slowly... :)
> On Thu, Mar 19, 2015 at 04:08:40PM -0400, Jonathan Wilkes via Pd-list wrote:
>> Hi list,
>> I'm implementing graph-on-parent drawing in my port of the Pd-l2ork GUI to
>> What I've come across is that both glist_delete and graph_vis will send a
>> message to the GUI to erase the objects shown in the GOP window. So when
>> you select a gop subpatch and click <BackSpace>, Pd sends two "delete"
>> messages to the GUI for each object shown in the GOP window.
>> Is there an easy way to change this so that only one "delete" message gets
>> sent to the GUI per object? It's easy enough to ignore the extra messages.
>> But it's _way_ easier to maintain and debug when you don't have to track
>> down and analyze two sources of GUI deletions, especially when the dataflow
>> is obscured by function callbacks in C.
>> Pd-list at lists.iem.at mailing list
>> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
More information about the Pd-list