Skip to content

Commit

Permalink
added thick lines and gradient fill support
Browse files Browse the repository at this point in the history
  • Loading branch information
tobozo committed Feb 16, 2024
1 parent caa0616 commit 2ec0252
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lgfx/v1/LGFXBase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,9 @@ namespace lgfx
const colors_t createGradient( const rgb888_t(&colors)[N] ) { const colors_t ret = { colors, N }; return ret; }
const colors_t createGradient( const rgb888_t* colors, const uint32_t count ) { const colors_t ret = { colors, count }; return ret; }
template <typename T=rgb888_t>
auto mapGradient( double val, double min, double max, const colors_t gr ) { rgb888_t c=map_gradient(val, min, max, gr); return T(c.r, c.g, c.b); }
T mapGradient( double val, double min, double max, const colors_t gr ) { rgb888_t c=map_gradient(val, min, max, gr); return T(c.r, c.g, c.b); }
template <typename T=rgb888_t>
auto mapGradient( double val, double min, double max, const rgb888_t *colors, uint32_t count ) { rgb888_t c=map_gradient(val, min, max, colors, count); return T(c.r, c.g, c.b); }
T mapGradient( double val, double min, double max, const rgb888_t *colors, uint32_t count ) { rgb888_t c=map_gradient(val, min, max, colors, count); return T(c.r, c.g, c.b); }

LGFX_INLINE_T void drawSmoothLine ( int32_t x0, int32_t y0, int32_t x1, int32_t y1, const T& color ) { drawWideLine( x0, y0, x1, y1, 0.5f, color); }
void drawGradientLine ( int32_t x0, int32_t y0, int32_t x1, int32_t y1, const colors_t colors ) { draw_gradient_line(x0, y0, x1, y1, colors); }
Expand Down

0 comments on commit 2ec0252

Please sign in to comment.