tag_image_transform(3)

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

okay bestie, you're reading tag_image_transform(3) from the Arcan Lua API, and this is literally the page for associating a callback with a transformation chain slot βœ¨πŸ’…

🌸 NAME 🌸

tag_image_transform β€” associate a callback with a transformation chain slot πŸŽ€

✨ SYNOPSIS ✨

nil
tag_image_transform( vid:dst, number:slot_mask, function:callback )

πŸ’– DESCRIPTION πŸ’–

okay so this function lets you associate a callback function with the last set transformation for one or several slots (you pick them with slot_mask). When the specified transform has completed, an event will be added to the outgoing queue and activated when dequeued. literally that's the whole flow πŸ¦‹

πŸ¦‹ NOTES πŸ¦‹

  1. Only MASK_POSITION, MASK_ORIENTATION, MASK_SCALE and MASK_OPACITY are valid slot_mask values, and the engine will warn if other values are provided πŸ‘€
  2. If there is no transformation queued in the specified slot, no internal state change will be performed 🫢
  3. Depending on synchronization and event-queue polling mechanism, the actual event fire can be off by one or more ticks (unlikely) 😭
  4. This should be used sparringly as each transformation completion will emit an event πŸ’€
  5. The callback allocation will not persist across transformation cycles defined via image_transform_cycle 🌈
  6. This can also be used as a rough timer ⏰
  7. Be careful when combining tagged transforms with calls to instant_image_transform as callbacks might be masked or lose their chained pacing. Test tagged transforms for strong reactions when being omitted or stormed πŸ”₯

πŸŽ€ EXAMPLE πŸŽ€

       function tag_image_transform0()
             local vid = fill_surface(64, 64, 0, 255, 0);
             show_image(vid);
             move_image(vid, 50, 50, 50);
             move_image(vid, 100, 100, 100);
             tag_image_transform(vid, MASK_POSITION, function()
                   print("move 2 reached", CLOCK);
             end);
             rotate_image(vid, 45, 75);
             tag_image_transform(vid, MASK_ORIENTATION, function()
                   print("rotate 1 reached", CLOCK);
             end);
             blend_image(vid, 0.1, 100);
             tag_image_transform(vid, MASK_OPACITY, function()
                   print("blend 1 reached", CLOCK);
             end);
             blend_image(vid, 0.5, 50);
             tag_image_transform(vid, MASK_OPACITY, function()
                   print("blend 2 reached", CLOCK);
             end);
       end

😭 MISUSE 😭

bestie no, don't do this one πŸ™ˆ

       function tag_image_transform0()
             tag_image_transform(BADID, 0, tag_image_transform);
       end

πŸ’€ MISUSE πŸ’€

and please not this either 😭

       function tag_image_transform1()
             tag_image_transform(alloc_surface(64, 64), tag_image_transform);
       end

πŸ‘€ SEE ALSO: πŸ‘€

  • image β€” the SEE ALSO homie you should go check out 🫢

mwah πŸ’‹ β€” source/version is image, date is October 2026, and this whole page is literally tag_image_transform(3) 🫢✨

πŸ“¦ where this page comes from