reset_image_transform(3)
π reset_image_transform(3) β Arcan Lua API β¨
π NAME π
reset_image_transform β drop all ongoing transformations. periodt. π
π SYNOPSIS π
left_blend, left_move, left_rotate, left_scale
reset_image_transform( vid )
reset_image_transform( vid:id, int:mask )
β¨ DESCRIPTION β¨
Okay so sometimes there are queued events that should be cancelled out due to unforeseen changes. This is especially typical when transformations are initated as part as some input or client event handler β like pushing a button to move a cursor indicating a selected item, or invoking a keybinding that triggers new animations. π No cap.
To prevent these from stacking up, reset_image_transformation can first be called to flush the queue, and the return values are the number of ticks left to the next item in the chain before flushing. The synopsis lists those return slots as left_blend, left_move, left_rotate, left_scale. Those values could then be used to schedule the new transform and make sure that the total would take 'as long' time as the previously scheduled one would have been. π«Ά
If a mask is provided, only the specific transforms are reset. The mask values β MASK_POSITION, MASK_ORIENTATION, MASK_SCALE, MASK_OPACITY β can be bit.or:ed together. This is highkey helpful when you have different parts of a codebase responsible for different transforms and do not want them to interfere with each other. π
π¦ NOTES π¦
- This will not revert the object back to a previous state, but rather stop at whatever part of the chain was currently being processed. It's giving freeze-frame, not rewind, bestie. π§
π₯ EXAMPLE π₯
function reset_image_transform0()
a = fill_surface(20, 20, 255, 0, 0);
show_image(a);
move_image(a, 100, 100, 10);
clock_c = 5;
end
function main_clock_pulse()
if (clock_c > 0) then
clock_c = clock_c - 1;
if (clock_c == 0) then
reset_image_transform(a);
end
end
end
π SEE ALSO π
π that's the page, bestie β from theimagemanual, datedOctober 2026. stay slaying! π
π¦ 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