copy_surface_properties(3)
π copy_surface_properties β an Arcan Lua API moment
okay bestie, welcome to the Arcan Lua API page for copy_surface_properties(3) β yes the manual name is literally right there, i folded it in for u, ur welcome π«Ά
β¨ NAME β¨
copy_surface_properties β copies the key surface properties from one VID to another. that's it. that's the whole job. no cap π
πΈ SYNOPSIS πΈ
nil
copy_surface_properties( srcvid, dstvid )
π¦ DESCRIPTION π¦
okay so here's what happens: this function first resolves the current surface properties of srcvid into world space, and then stores the result in dstvid. and what does "properties" mean here? it covers position, orientation, opacity and scale. the whole glow-up package, literally π
π NOTES π
- the resolved properties will NOT be translated into the local coordinate space of
dstvidβ so the results may be undesired ifdstvidhas its dimensions linked relative to another object thanworldid. like, it's giving world-space-only energy, and if ur dstvid is living in some other object's coordinate world, that's a vibe mismatch, ngl π - Scale is treated differently because of its relation with the initial
width,heightof the source. this is solved by translating the resolved dimension into a scale factor. slay, math queen π§ - the rotation transfer does not take any rotation origo offset into account. so if u had an origo situation going on, it's not coming with u. periodt.
- using the same object for
srcand fordstis prohibited. just don't. it's in MISUSE for a reason, bestie π
π EXAMPLE π
here's the cute little function doing its thing:
function copy_surface_properties0()
a = fill_surface(64, 64, 255, 0, 0);
blend_image(a, 0.5);
move_image(a, 100, 100);
rotate_image(a, 300);
resize_image(a, 128, 128);
b = fill_surface(16, 16, 0, 255, 0);
copy_surface_properties(a, b);
move_image(a, 0, 0);
end
π MISUSE π
absolutely do not do these. they're here so u know what NOT to do, not so u can try them π
misuse number one β copying onto itself, which is prohibited (see note 4):
function copy_surface_properties0()
a = fill_surface(32, 32, 255, 0, 0);
copy_surface_properties(a, a);
end
misuse number two β passing nil as the source. no bestie, nil is not a VID:
function copy_surface_properties1()
copy_surface_properties(nil, 1);
end
β SEE ALSO β
copy_image_transform(3)β go read that one too, iykyk π
k that's the whole page, mwah π this was the image page (that's the source/version btw), dated October 2026. now go copy some surface properties responsibly bestie, and remember: never src = dst πβ¨
π¦ 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