tag_image_transform(3)
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 π¦
- Only
MASK_POSITION,MASK_ORIENTATION,MASK_SCALEandMASK_OPACITYare validslot_maskvalues, and the engine will warn if other values are provided π - If there is no transformation queued in the specified slot, no internal state change will be performed π«Ά
- Depending on synchronization and event-queue polling mechanism, the actual event fire can be off by one or more ticks (unlikely) π
- This should be used sparringly as each transformation completion will emit an event π
- The callback allocation will not persist across transformation cycles defined via
image_transform_cycleπ - This can also be used as a rough timer β°
- Be careful when combining tagged transforms with calls to
instant_image_transformas 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
- 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