DrawShadowRect
Draw a filled rectangle with an automatic drop shadow.
Syntax
Susano.DrawShadowRect(x, y, w, h, r, g, b, a[, shadowOffset][, shadowAlpha][, rounding]) -> void
Parameters
x, y (number): Top-left corner in pixels.
w, h (number): Width and height in pixels.
r, g, b, a (number): Fill color. Accepts 0..1 floats or 0..255 integers.
shadowOffset (number, optional): Shadow offset in pixels. Default: 2.0.
shadowAlpha (number, optional): Shadow opacity (0..1). Default: 0.4.
rounding (number, optional): Corner rounding in pixels. Default: 0.0.
Return(s)
None
Behavior
Draws a black shadow rectangle offset by shadowOffset pixels, then draws the main filled rectangle on top. Creates a simple drop-shadow effect.
Example(s)
Susano.BeginFrame()
Susano.DrawShadowRect(200, 200, 300, 100, 40, 40, 60, 255, 3, 0.5, 8)
Susano.SubmitFrame()