[PD] cnv get_pos weirdness

matteo sisti sette matteosistisette at gmail.com
Mon May 9 18:04:19 CEST 2011


Oh I see! It seems that, if it is in a GOP subpatch or abstraction, it
returns its coordinates relative to the GOP area, while if it is in a
visible canvas, it returns its position relative  to the canvas.

Anyway, this is fundamentally wrong for at least two reasons:

1) The coordinate space should be always the same. Whether it is the
containing canvas or the GOP area, it should be the same regardless of
whether the window is open or not

2) This is not consistent with the "pos" message: if you send a "pos"
message to an object, it will _always_ be interpreted as relative to
the containing canvas. So for example if you get the position of a cnv
and send it to another object, it won't be placed at the same position
as the cnv (if they are in a GOP object).

2011/5/9 matteo sisti sette <matteosistisette at gmail.com>:
> Hi,
>
> If I send a "get_pos" message to a cnv while its containing window is
> visible, I get the correct coordinates, relative to the 0,0 of the
> window.
>
> However, if the canvas is in a GOP-enabled subpatch of a GOP-enabled
> abstraction and I it is being shown through the GOP, it returns
> apparently wrong coordinates.
>
> Is this just a bug, or does it return coordinates relative to something else?
>
>
> --
> Matteo Sisti Sette
> matteosistisette at gmail.com
> http://www.matteosistisette.com
>



-- 
Matteo Sisti Sette
matteosistisette at gmail.com
http://www.matteosistisette.com



More information about the Pd-list mailing list