graphics.canvas · function ·
DrawRectGradientVRgba
Linear gradients interpolate between a start and end authored color across the rectangle: V runs top to bottom, H runs left to right.
Draw 2D shapes, text, images, and composited interface content.
external DrawRectGradientVRgba(int x, int y, int width, int height, int startRed, int startGreen, int startBlue, int startAlpha, int endRed, int endGreen, int endBlue, int endAlpha)Status: source-declared
Parameters
int x- Supply x as int.
int y- Supply y as int.
int width- Supply width as int.
int height- Supply height as int.
int startRed- Supply start red as int.
int startGreen- Supply start green as int.
int startBlue- Supply start blue as int.
int startAlpha- Supply start alpha as int.
int endRed- Supply end red as int.
int endGreen- Supply end green as int.
int endBlue- Supply end blue as int.
int endAlpha- Supply end alpha as int.
Use DrawRectGradientVRgba
A complete small caller. Values are illustrative; check the returned result and package requirements before connecting live resources.
cpu · source-example · type checked
using graphics.canvas
// Draw 2D shapes, text, images, and composited interface content.
int x = 1
int y = 1
int width = 1
int height = 1
int startRed = 1
int startGreen = 1
int startBlue = 1
int startAlpha = 1
int endRed = 1
int endGreen = 1
int endBlue = 1
int endAlpha = 1
DrawRectGradientVRgba(x, y, width, height, startRed, startGreen, startBlue, startAlpha, endRed, endGreen, endBlue, endAlpha)
Console.Log("DrawRectGradientVRgba completed")
project.mech
manifestVersion = "2"
package = "api.example.graphics_canvas__drawrectgradientvrgba"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"
[app]
kind = "headless"
[[dependencies]]
package = "graphics.canvas"
version = "0.1.0"
path = "../../../yeho/packages/graphics/canvas"
Notes and source
Package presence and a declaration do not establish support on every host. Host services need their platform and lifecycle setup.
yeho/packages/graphics/canvas/canvas.yh:46