GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
blend_image(3) Arcan Lua API blend_image(3)

blend_image - Change image opacity.

nil
blend_image( VID or VIDtbl, opacity, time, interp )

Changes the opacity of the selected VID s either immediately (default) or by setting an optional time argument to a non-negative integer. This function either accepts single VID s or a group of VID s in a table (iteration will follow the behavior of pairs() Interp can be set to one of the constants ( INTERP_LINEAR , INTERP_SINE , INTERP_EXPIN , INTERP_EXPOUT , INTERP_EXPINOUT , INTERP_SMOOTHSTEP ).

1

VID s with an opacity other than 0.0 (hidden) and 1.0 (opaque, visible) will be blended.

2
Values outside the allowed range will be clamped.
3
The blend behavior is dictated by the default global blendfunc value (src_alpha, 1-src_alpha) and can be overridden with force_image_blend(mode)

function blend_image0()
      a = fill_surface(128, 128, 255, 0, 0);
      b = fill_surface(128, 128, 0, 255, 0);
      move_image(b, 64, 64);
      show_image({a,b});
      blend_image(b, 0.5, 100);
end

function blend_image0()
      a = fill_surface(128, 128, 255, 0, 0);
      b = fill_surface(128, 128, 0, 255, 0);
      move_image(b, 64, 64);
      show_image({a,b});
      blend_image(b, -0.5, -100);
end

function blend_image1()
      a = fill_surface(128, 128, 255, 0, 0);
      b = fill_surface(128, 128, 0, 255, 0);
      move_image(b, 64, 64);
      show_image({a,b});
      blend_image("a", 0.5, 100);
end

function blend_image2()
      a = fill_surface(128, 128, 255, 0, 0);
      b = fill_surface(128, 128, 0, 255, 0);
      move_image(b, 64, 64);
      show_image({a,b});
      blend_image({-1, "a", true, 5.0}, true, "error");
end

image_force_blend(3)

June 2022 image

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.