INNER CODE UNIT · TypeScript
applyBg
PerryTS/perry · packages/perry-styling/src/index.ts:129
export function applyBg(handle: number, r: number, g: number, b: number, a: number): void {
perry_ui_widget_set_background_color(handle, r, g, b, a);
}
export function applyRadius(handle: number, radius: number): void {
perry_ui_widget_set_corner_radius(handle, radius);
}
export function applyWidth(handle: number, width: number): void {
perry_ui_widget_set_width(handle, width);
}
export function applyTooltip(handle: number, text: string): void {
perry_ui_widget_set_tooltip(handle, text);
}
// -------------------------------------------------------------------
// Gradient — direction: 0 = vertical (top→bottom), 1 = horizontal (left→right)