GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
image_parent(3) Arcan Lua API image_parent(3)

image_parent - Return a reference to the parent object.

nil
image_parent( vid:src )
image_parent( vid:src, vid:reference )

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 decendent of reference . and the parentvid will match reference .

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

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

function image_parent0()
      print(image_parent(BADID));
end

function image_parent1()
      print(image_parent(WORLDID));
end

image_children(3) link_image(3) valid_vid(3)

June 2022 image

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.