FreeBSD Manual Pages
image_parent(3) Arcan Lua API image_parent(3) NAME image_parent - Return a reference to the parent object. SYNOPSIS nil image_parent( vid:src ) image_parent( vid:src, vid:reference ) DESCRIPTION This function is used to figure out if vid is linked to another object from a previous call to link_image and which primary attachement the image has. This is normally WORLDID , but can be another vid through any of the define_rendertarget class of functions. If the reference argument is provided, the function will only return if src is a decen- dent of reference . and the parentvid will match reference . EXAMPLE function image_parent0() a = fill_surface(32, 32, 255, 0, 0); b = fill_surface(32, 32, 255, 0, 0); c = fill_surface(32, 32, 255, 0, 0); link_image(c, a); image_tracetag(a, "(a)"); print(image_tracetag(image_parent(b))); print(image_tracetag(image_parent(c))); print(image_tracetag(image_parent(a))); end EXAMPLE function image_parent1() a = fill_surface(32, 32, 255, 0, 0) b = fill_surface(32, 32, 255, 0, 0) c = fill_surface(32, 32, 255, 0, 0) d = fill_surface(32, 32, 255, 0, 0) link_image(a, b) link_image(b, c) print(image_parent(a, b)) print(image_parent(a, c)) print(image_parent(a, d)) -- not a parent end MISUSE function image_parent0() print(image_parent(BADID)); end MISUSE function image_parent1() print(image_parent(WORLDID)); end SEE ALSO: image_children(3) link_image(3) valid_vid(3) image April 2025 image_parent(3)
NAME | SYNOPSIS | DESCRIPTION | EXAMPLE | EXAMPLE | MISUSE | MISUSE | SEE ALSO:
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=image_parent&sektion=3&manpath=FreeBSD+Ports+14.3.quarterly>