force_image_blend(3)
π force_image_blend(3) β the Arcan Lua API glow-up π
okay so bestie, welcome to force_image_blend β the little function that decides how your translucent surfaces vibe when they overlap. yes, it's called force_image_blend and it lives in the Arcan Lua API. she's giving backstage-pass energy, ngl.
β¨ NAME β¨
force_image_blend β Control image blend behaviour π¦
like, literally the boss of how overlapping images combine. periodt.
πΈ SYNOPSIS πΈ
nil
force_image_blend( vid:dst )
force_image_blend( vid:dst, int:mode )
two ways to call her, both iconic π
π DESCRIPTION π
so here's the tea β β there are a bunch of controls for adjusting how overlapping objects that are translucent, or that have transparent contents described by an alpha color channel, are supposed to combine. this function is your remote control for that whole situation. change the behaviour, no cap.
if no mode is set, the system default will be set. that's it, that's the fallback. π
other blend-modes are, and I need you to pay attention because this is the whole menu:
BLEND_NORMALβ disable blending if object opacity is marked as opaqueBLEND_ADDβone, one: additive blending, rgb channels will be combinedBLEND_SUBβone: dst will be subtracted based on one-src alphaBLEND_MULβdst-color, one-src alphaBLEND_PREMULTIPLIEDβone, one-src alpha: the source object has its alpha values pre-multiplied into the color channels
slay. five modes, each one a different flavor of glow β¨
π§ NOTES π§
- the default can be changed by calling
switch_default_blendmodeβ so you're not stuck with it forever, bestie π«Ά
π₯ EXAMPLE π₯
function force_image_blend0()
a = fill_surface(32, 32, 255, 0, 0);
blend_image(a, 0.5);
force_image_blend(a, BLEND_ADD);
end
iconic behaviour: make a 32Γ32 red surface, set its blend to 0.5, then force it to BLEND_ADD. additive glow incoming π«
π MISUSE π
this is the part where it goes wrong, and honestly? watch out π
function force_image_blend0()
force_image_blend(BADID, BLEND_NORMAL);
end
BADID is not a real vid and the universe will simply not accept it. π
function force_image_blend1()
a = fill_surface(32, 32, 255, 0, 0);
force_image_blend(a, -10);
end
mode -10?? that's not a blend mode bestie, that's a cry for help π the function is not gonna hold your hand through that one.
okay that's the whole page, mwah π this masterpiece came from image, dated October 2026, and she's filed as force_image_blend(3) β go forth and blend responsibly, queen ππΈ
π¦ 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