|
|
void | fill (SkCanvas *canvas, const SkRRect &shape, const Color color, const bool antiAlias) |
|
void | fill (SkCanvas *canvas, const SkRect &shape, const Color color, const bool antiAlias) |
|
void | stroke (SkCanvas *canvas, const SkRRect &shape, const Color color, const float width, const bool antiAlias) |
| bool | icon (SkCanvas *canvas, const std::string_view name, const SkRect &rect, const Color color, const float strokeWidth, IconRegistry *registry) |
| void | arrow (SkCanvas *canvas, const SkRect &bounds, const Color color, const bool antiAlias) |
| void | disc (SkCanvas *canvas, const SkPoint center, const float radius, const Color color, const bool antiAlias) |
| void | circle (SkCanvas *canvas, const SkPoint center, const float radius, const Color color, const float width, const bool antiAlias) |
Painting primitives for skins: no state, everything comes from the arguments
Small shapes skins draw: arrows, circles
| bool psychic_ui::paint::icon |
( |
SkCanvas * | canvas, |
|
|
std::string_view | name, |
|
|
const SkRect & | rect, |
|
|
Color | color, |
|
|
float | strokeWidth = iconStroke, |
|
|
IconRegistry * | registry = nullptr ) |
Draws a registered icon (IconRegistry::shared(), or registry) in color: its grid fills the largest square centered in rect, whose corner is put on a device pixel when the canvas only scales and translates. strokeWidth is in units of a 16-unit grid, whatever the icon's own grid, so every icon has the same weight at the same size: at 16 px a width of 1.3 is 1.3 px, at 20 px 1.625 px. Returns false, drawing nothing, for an unknown name (reported once).