image_inherit_order(3)

πŸ“¦
version 0.7.1 Β· 2 versions
, in nixos 26.05

πŸ’… image_inherit_order β€” the Arcan Lua API glow-up πŸŽ€

okay bestie, settle in, because this one is a tiny function with a big main-character energy moment ✨ It lives in the Arcan Lua API and its whole job is: it changes the specific object order value so it gets expressed as relative to its parent 🫢


✨ NAME ✨

image_inherit_order β€” changes the specific object order value to be expressed as relative to its parent. like, the order doesn't have to stand alone anymore, it can be a nepo baby of its parent's order 😌 periodt


🌸 SYNOPSIS 🌸

nil
image_inherit_order( vid, bool_state )

(it returns nil, no cap β€” the return value is literally nothing, it's giving "i did my job, don't ask me for a receipt" πŸ’€)


πŸ¦‹ DESCRIPTION πŸ¦‹

so normally, order is expressed as an independent property β€” it's its own girl, it stands alone, it doesn't answer to anybody πŸ‘‘

but for some applications, like, say, user-interfaces, it might be more useful and more intuitive to express it relative to a linked object πŸ’– that way you cut down on the amount of tracking and reordering calls you need to reorder an anchor point that's used for something like a window πŸͺŸβœ¨ like, instead of chasing order values around every time the parent moves, the kid just knows where it belongs. lowkey iconic behaviour ngl.

By default, order inheritance is disabled πŸ™ˆ but you can explicitly enable it by calling this function. it's opt-in, bestie, she's not gonna do it unless you ask πŸŽ€


πŸ’œ NOTES πŸ’œ

  1. for long hierarchies, this can be an expensive operation 😭 because changes to order imply a detach/attach operation, and it's implemented recursively. so like, deep trees = deep recursion = she's doing work. be mindful, fr fr ⭐

🌈 EXAMPLE 🌈

function image_inherit_order0()
      a = fill_surface(32, 32, 255, 0, 0);
      b = fill_surface(16, 16, 0, 255, 0);
      order_image(a, 2);
      order_image(b, 1);
      image_inherit_order(b, true);
      link_image(b, a);
      show_image({a, b});
end

so a is a 32Γ—32 red surface and b is a 16Γ—16 green surface πŸ“ a gets order 2, b gets order 1, then we turn on inheritance for b (image_inherit_order(b, true)), link b to a, and show them both. cute, clean, slay πŸ’…


πŸ’€ MISUSE πŸ’€

function image_inherit_order0()
      a = fill_surface(32, 32, 255, 0, 0);
      order_image(BADID);
end

πŸ‘€ BADID is not a thing, bestie. please don't.

function image_inherit_order1()
      a = fill_surface(32, 32, 255, 0, 0);
      order_image(a, "not a number");
end

πŸ™ˆ "not a number" is a string. it is, in fact, not a number. the name was a warning and we ignored it 😭


that's the whole page, bestie β€” short, sweet, and fully unbothered 🌸

sign-off time πŸŽ€ this lil' page comes from image, dated October 2026, and its manual section is image_inherit_order(3) β€” screenshot it, memorise it, live by it πŸ‘‘πŸ’–

πŸ“¦ where this page comes from