Hi From previous old discussion ( https://lists.puredata.info/pipermail/pd-list/2006-04/037622.html ) I understood that datastructure z-orderdrawing depends of creation order, but when you programmatically create a new scalar (with [traverse ... , bang( -> [pointer] -> [append struct_name]), it's placed on the top of the list of scalars, although it's drawn at last. A refreshing of the window restablishes the correct drawing order.
Would it be possible to get a new pointer at the end of the list (and not at the top) ?
Thanks
JYG
On Sat, 22 Apr 2006, Federico wrote:
/i'm seeing there is no z-order tracking in data-structures (i.e.: a
repaint />/event, or a mouse action, can bring an object to the top). />/is this true? / DS scalars are stored as linked-lists in the same way as objectboxes, so you might reorder them the way objectboxes may be reordered (Cut and then Paste once will bring the selection to the top).
DS arrays are stored like float arrays, so I suppose you can reorder them like you might reorder elements in a float array (that is, painfully...) (maybe that there's a lib to help you do it with float arrays, but with DS arrays, I doubt it)
Oh, I didn't realize that I can go to the last position using [next( message sent to [pointer] and then append a scalar to the end of the scalar list..
Everything is ok now for me. The last created scalar is the last one to be drawn, even when refreshing display of the patch.
JYG
On 25/02/2020 19:11, Jean-Yves Gratius wrote:
Hi From previous old discussion ( https://lists.puredata.info/pipermail/pd-list/2006-04/037622.html ) I understood that datastructure z-orderdrawing depends of creation order, but when you programmatically create a new scalar (with [traverse ... , bang( -> [pointer] -> [append struct_name]), it's placed on the top of the list of scalars, although it's drawn at last. A refreshing of the window restablishes the correct drawing order.
Would it be possible to get a new pointer at the end of the list (and not at the top) ?
Thanks
JYG
On Sat, 22 Apr 2006, Federico wrote:
/i'm seeing there is no z-order tracking in data-structures (i.e.: a
repaint />/event, or a mouse action, can bring an object to the top). />/is this true? / DS scalars are stored as linked-lists in the same way as objectboxes, so you might reorder them the way objectboxes may be reordered (Cut and then Paste once will bring the selection to the top).
DS arrays are stored like float arrays, so I suppose you can reorder them like you might reorder elements in a float array (that is, painfully...) (maybe that there's a lib to help you do it with float arrays, but with DS arrays, I doubt it)
Note that [append] will update its pointer to point to the new scalar. The new pointer is also output. So for consecutive appends you only need to send a pointer once in the beginning.
Christof
On 25.02.2020 21:44, Jean-Yves Gratius wrote:
Oh, I didn't realize that I can go to the last position using [next( message sent to [pointer] and then append a scalar to the end of the scalar list..
Everything is ok now for me. The last created scalar is the last one to be drawn, even when refreshing display of the patch.
JYG
On 25/02/2020 19:11, Jean-Yves Gratius wrote:
Hi From previous old discussion ( https://lists.puredata.info/pipermail/pd-list/2006-04/037622.html ) I understood that datastructure z-orderdrawing depends of creation order, but when you programmatically create a new scalar (with [traverse ... , bang( -> [pointer] -> [append struct_name]), it's placed on the top of the list of scalars, although it's drawn at last. A refreshing of the window restablishes the correct drawing order.
Would it be possible to get a new pointer at the end of the list (and not at the top) ?
Thanks
JYG
On Sat, 22 Apr 2006, Federico wrote:
/i'm seeing there is no z-order tracking in data-structures (i.e.: a
repaint />/event, or a mouse action, can bring an object to the top). />/is this true? / DS scalars are stored as linked-lists in the same way as objectboxes, so you might reorder them the way objectboxes may be reordered (Cut and then Paste once will bring the selection to the top).
DS arrays are stored like float arrays, so I suppose you can reorder them like you might reorder elements in a float array (that is, painfully...) (maybe that there's a lib to help you do it with float arrays, but with DS arrays, I doubt it)
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list