|
rigImage 0.1.0
RigKit pack API - rigImage
|
CPU brush dabs into a Raster - the pixel half of an editor Brush tool. More...
Functions | |
| int | rig::image::paintDab (pixel::Raster &raster, const glm::vec2 ¢er, float radiusPx, const glm::vec4 &rgba) |
| Stamp one soft round dab, alpha-blended over the pixels. | |
| int | rig::image::paintStroke (pixel::Raster &raster, const glm::vec2 &from, const glm::vec2 &to, float radiusPx, const glm::vec4 &rgba) |
| Stamp dabs along a segment so a drag reads as one stroke. | |
CPU brush dabs into a Raster - the pixel half of an editor Brush tool.
Pure pixel writes, no GL and no UI. The caller owns the raster, re-uploads the texture, and persists the file.
| int rig::image::paintDab | ( | pixel::Raster & | raster, |
| const glm::vec2 & | center, | ||
| float | radiusPx, | ||
| const glm::vec4 & | rgba ) |
Stamp one soft round dab, alpha-blended over the pixels.
| center | Dab centre in raster pixels. |
| radiusPx | Dab radius in pixels (>= 0.5 to mark anything). |
| rgba | Brush colour; a scales dab opacity. |
| int rig::image::paintStroke | ( | pixel::Raster & | raster, |
| const glm::vec2 & | from, | ||
| const glm::vec2 & | to, | ||
| float | radiusPx, | ||
| const glm::vec4 & | rgba ) |
Stamp dabs along a segment so a drag reads as one stroke.
Dab spacing is a quarter radius - close enough that round caps fuse into a band. Endpoints included.