Skip to main content

Visual Effect (visual-effect)

Built-in visual effects for Surface.

API

FunctionDescription
surface_effect_glass(s, clip, x, y, w, h, radius)Frosted glass blur effect
surface_effect_shadow(s, clip, x, y, w, h, radius, c)Drop shadow
surface_effect_gradient(s, clip, x, y, w, h, lt, rt, rb, lb)Four-corner bilinear gradient
surface_effect_checkerboard(s, clip, x, y, w, h)Checkerboard transparency pattern

Description

EffectDescription
Frosted GlassApplies a blur effect to the specified region, simulating frosted glass texture
Drop ShadowDraws a blurred colored shadow below the region
GradientSpecifies colors at four corners with bilinear interpolation filling the interior
CheckerboardDraws a checkerboard pattern to display transparent regions