Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::view::SkinImage Struct Reference

Derives native-widget skin styling from a captured design asset (a flat PNG exported by a design tool such as the Figma plugin). More...

#include <widget_skin_derive.hpp>

Public Member Functions

bool valid () const

Public Attributes

const uint8_t * pixels = nullptr
int width = 0
int height = 0

Detailed Description

Derives native-widget skin styling from a captured design asset (a flat PNG exported by a design tool such as the Figma plugin).

Rationale: the figma-plugin export ships a single flat PNG per recognized widget — a fader baked at its captured value, a meter baked at its captured level. Skinning the native widget with that image verbatim would FREEZE the control (the thumb / fill couldn't move). Instead we sample the captured pixels to recover the underlying style (track / fill / thumb colors for a fader; the gradient stops for a meter) and hand those to the widget, which redraws them procedurally — value-driven, so the thumb still moves with set_value() and the fill still tracks set_level().

This is a GENERALIZABLE importer rule: it reads the design data (the actual exported pixels) and derives style. It hardcodes no per-instance colors, pixel offsets, or widget names. Minimal RGBA8 image view consumed by the derivation. Row-major, 4 bytes/pixel. Borrowed — the caller owns the storage.

Member Function Documentation

◆ valid()

bool pulp::view::SkinImage::valid ( ) const
inline

Member Data Documentation

◆ height

int pulp::view::SkinImage::height = 0

◆ pixels

const uint8_t* pulp::view::SkinImage::pixels = nullptr

◆ width

int pulp::view::SkinImage::width = 0

The documentation for this struct was generated from the following file: