image_inherit_order(3)
π 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 π
- for long hierarchies, this can be an expensive operation π because changes to
orderimply 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
- nixos 26.05: arcan 0.7.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms