copy_image_transform(3)

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

πŸ’– copy_image_transform(3) πŸ’–

okay bestie, so this is a page from the Arcan Lua API manual, and it's literally about cloning the whole vibe of one VID's transform chain onto another VID. no cap, it's giving "copy-paste but make it dramatic." πŸŽ€


✨ NAME ✨

copy_image_transform β€” duplicate the transform chain of one VID and transfer it to another. yes, that's the whole errand. πŸ’…


🌸 SYNOPSIS 🌸

nil
copy_image_transform( srcvid, dstvid )

like, it returns nil (nothing, zilch, the void 🫢) and it takes two VIDs. that's it.


πŸ¦‹ DESCRIPTION πŸ¦‹

so what happens is: this function traverses the entire transform chain of srcvid, copying each and every transform step ✨ and then attaches that whole copied chain to a brand-new chain in dstvid. it's like handing your bestie your entire playlist instead of just one song. iconic behavior, honestly. πŸ”₯


πŸ’€ NOTES πŸ’€

  1. this will also initiate a recursive rendering re-order. yeah. it ripples. 🌊
  2. this will irrevocably alter the origw and origh properties in the destination order β€” and it does that on purpose, so that the scale transform is actually usable. can't skip this part, bestie, it's load-bearing. 😭
  3. the original transform chain in the destination VID will be removed. gone. deleted. not coming back. πŸ™ˆ
  4. src and dst cannot be the same VID. no self-copying. we don't do that here. ⭐
  5. transformations are stored relative of the source object's coordinate space and β€” with the exception of scale β€” they won't be translated. so heads up on that. πŸ’œ
okay real talk: notes 2 and 3 are the ones that will catch you slipping. the destination's old chain is straight-up yeeted and origw/origh get changed permanently. proceed with main character energy but, like, read them first. πŸ‘‘

🌈 EXAMPLE 🌈

function copy_image_transform0()
      a = fill_surface(32, 32, 255, 0, 0);
      blend_image(a, 0.5);
      move_image(a, 200, 200, 100);
      rotate_image(a, 350, 100);
      blend_image(a, 1.0, 100);
      b = fill_surface(32, 32, 0, 255, 0);
      copy_image_transform(a, b);
      instant_image_transform(a);
end

see how a gets all dolled up with blends, a move, and a rotate 🧚 and then the whole look gets copied straight onto b? that's the whole slay. and then instant_image_transform(a) just sends it. ⚑


πŸ“ MISUSE πŸ“

function copy_image_transform0()
      a = fill_surface(32, 32, 0, 255, 0);
      copy_image_transform(a, a);
end

ma'am. a and a? that's a note-4 violation, bestie β€” src and dst cannot be the same VID. πŸ’€


πŸ“ MISUSE πŸ“

function copy_image_transform1()
      copy_image_transform(-10, nil);
end

-10 and nil are not it. nope. not valid VIDs, not valid vibes. πŸ™ˆ


πŸ‘‘ SEE ALSO πŸ‘‘


and that's the page!! 🌸 this was brought to you by the image manual source, dated October 2026 β€” mwah, stan, bye! πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from