|
| template<typename Coord> |
| Coord | fl::gfx::aaRatio (Coord num, Coord denom, Coord inv_denom) FL_NO_EXCEPT |
| | Compute num/denom using the best strategy for the Coord type:
|
| |
| template<typename Coord> |
| Coord | fl::gfx::detail::aaRatioDispatch (Coord num, Coord denom, Coord, fl::true_type) FL_NO_EXCEPT |
| |
| template<typename Coord> |
| Coord | fl::gfx::detail::aaRatioDispatch (Coord num, Coord, Coord inv_denom, fl::false_type) FL_NO_EXCEPT |
| |
| template<typename PixelT, bool Overwrite> |
| void | fl::gfx::addPixelToBuffer (PixelT *pixels, int width, int height, int x, int y, const PixelT &color) FL_NO_EXCEPT |
| | Internal helper: add or set pixel to rectangular buffer with bounds checking Direct row-major indexing: pixels[y * width + x] Templated on Overwrite for compile-time dispatch (no per-pixel branch).
|
| |
| void | fl::gfx::detail::computeBandShift (fl::i32 band, fl::u8 &shift_out, fl::u16 &inv_out) FL_NO_EXCEPT |
| | Precompute right-shift and reciprocal multiplier for AA division.
|
| |
| template<typename T> |
| fl::u8 | fl::gfx::coordToU8 (T alpha) FL_NO_EXCEPT |
| | sqrt is provided by fl::sqrt overloads in math.h for:
|
| |
| template<> |
| fl::u8 | fl::gfx::coordToU8< double > (double alpha) FL_NO_EXCEPT |
| |
| template<> |
| fl::u8 | fl::gfx::coordToU8< fl::s16x16 > (fl::s16x16 alpha) FL_NO_EXCEPT |
| |
| template<> |
| fl::u8 | fl::gfx::coordToU8< float > (float alpha) FL_NO_EXCEPT |
| |
| template<> |
| fl::u8 | fl::gfx::coordToU8< int > (int alpha) FL_NO_EXCEPT |
| |
| template<typename PixelT, typename Coord> |
| void | fl::gfx::drawDisc (Canvas< PixelT > &canvas, const PixelT &color, Coord cx, Coord cy, Coord r, fl::DrawMode mode=fl::DrawMode::DRAW_MODE_BLEND) FL_NO_EXCEPT |
| |
| template<typename PixelT, typename Coord, bool Overwrite> |
| void | fl::gfx::detail::drawDiscCore (Canvas< PixelT > &canvas, const PixelT &color, Coord cx, Coord cy, Coord r) FL_NO_EXCEPT |
| |
| template<typename PixelT, typename Coord> |
| void | fl::gfx::drawLine (Canvas< PixelT > &canvas, const PixelT &color, Coord x0, Coord y0, Coord x1, Coord y1, fl::DrawMode mode) FL_NO_EXCEPT |
| | ============================================================================
|
| |
| template<typename PixelT, typename Coord, bool Overwrite> |
| void | fl::gfx::detail::drawLineCore (Canvas< PixelT > &canvas, const PixelT &color, Coord x0, Coord y0, Coord x1, Coord y1) FL_NO_EXCEPT |
| |
| template<typename PixelT, typename Coord, int N> |
| void | fl::gfx::drawPolygon (Canvas< PixelT > &canvas, const PixelT &color, const PolyPoint< Coord >(&pts)[N], fl::DrawMode mode) FL_NO_EXCEPT |
| |
| template<typename PixelT, typename Coord, int N, int MAXN = FL_GFX_POLYGON_DEFAULT_MAXN, int CHUNK = FL_GFX_POLYGON_DEFAULT_CHUNK, PolyFill Fill = PolyFill::Exact> |
| void | fl::gfx::drawPolygon (Canvas< PixelT > &canvas, const PixelT &color, const PolyPoint< Coord >(&pts)[N], fl::DrawMode mode=fl::DrawMode::DRAW_MODE_BLEND) FL_NO_EXCEPT |
| |
| template<typename PixelT, typename Coord> |
| void | fl::gfx::drawPolygon (Canvas< PixelT > &canvas, const PixelT &color, fl::span< const PolyPoint< Coord > > pts, fl::DrawMode mode) FL_NO_EXCEPT |
| |
| template<typename PixelT, typename Coord, int MAXN = FL_GFX_POLYGON_DEFAULT_MAXN, int CHUNK = FL_GFX_POLYGON_DEFAULT_CHUNK, PolyFill Fill = PolyFill::Exact> |
| void | fl::gfx::drawPolygon (Canvas< PixelT > &canvas, const PixelT &color, fl::span< const PolyPoint< Coord > > pts, fl::DrawMode mode=fl::DrawMode::DRAW_MODE_BLEND) FL_NO_EXCEPT |
| | Fill selects the polygon backend (PolyFill::Exact by default; PolyFill::ABuffer for the faster 8x4 A-buffer kernel, which ignores CHUNK).
|
| |
| template<typename PixelT, typename Coord, bool Overwrite, int MAXN, int CHUNK> |
| void | fl::gfx::detail::drawPolygonCore (Canvas< PixelT > &canvas, const PixelT &color, fl::span< const PolyPoint< Coord > > pts) FL_NO_EXCEPT |
| |
| template<typename PixelT, typename Coord> |
| void | fl::gfx::drawRing (Canvas< PixelT > &canvas, const PixelT &color, Coord cx, Coord cy, Coord r, Coord thickness, fl::DrawMode mode=fl::DrawMode::DRAW_MODE_BLEND) FL_NO_EXCEPT |
| |
| template<typename PixelT, typename Coord, bool Overwrite> |
| void | fl::gfx::detail::drawRingCore (Canvas< PixelT > &canvas, const PixelT &color, Coord cx, Coord cy, Coord r, Coord thickness) FL_NO_EXCEPT |
| |
| template<typename PixelT, typename Coord> |
| void | fl::gfx::drawStrokeLine (Canvas< PixelT > &canvas, const PixelT &color, Coord x0, Coord y0, Coord x1, Coord y1, Coord thickness, LineCap cap, fl::DrawMode mode=fl::DrawMode::DRAW_MODE_BLEND) FL_NO_EXCEPT |
| |
| template<typename PixelT, typename Coord, bool Overwrite> |
| void | fl::gfx::detail::drawStrokeLineCore (Canvas< PixelT > &canvas, const PixelT &color, Coord x0, Coord y0, Coord x1, Coord y1, Coord thickness, LineCap cap) FL_NO_EXCEPT |
| |
| fl::i32 | fl::gfx::detail::floorDiv16I32 (fl::i32 v) FL_NO_EXCEPT |
| | Floor(v / 65536) for i32.
|
| |
| fl::i64 | fl::gfx::detail::floorDiv16I64 (fl::i64 v) FL_NO_EXCEPT |
| | Same for i64 (line crossings can exceed i32 for steep short edges).
|
| |
| fl::i64 | fl::gfx::detail::floorDivI64 (fl::i64 a, fl::i64 b) FL_NO_EXCEPT |
| | Floor-divide a by positive b (rounds toward -inf).
|
| |
| template<typename T> |
| T | fl::gfx::fromFrac (int p, int q) FL_NO_EXCEPT |
| | Convert rational p/q to Coord without float.
|
| |
| template<> |
| fl::s16x16 | fl::gfx::fromFrac< fl::s16x16 > (int p, int q) FL_NO_EXCEPT |
| |
| template<typename T> |
| T | fl::gfx::fromInt (int n) FL_NO_EXCEPT |
| | Convert an integer to Coord without float intermediate.
|
| |
| template<> |
| fl::s16x16 | fl::gfx::fromInt< fl::s16x16 > (int n) FL_NO_EXCEPT |
| |
| template<typename T> |
| T | fl::gfx::halfOf (T val) FL_NO_EXCEPT |
| | Divide Coord by 2 using shift (avoids expensive division on embedded).
|
| |
| template<> |
| double | fl::gfx::halfOf< double > (double val) |
| |
| template<> |
| fl::s16x16 | fl::gfx::halfOf< fl::s16x16 > (fl::s16x16 val) FL_NO_EXCEPT |
| |
| template<> |
| float | fl::gfx::halfOf< float > (float val) |
| |
| template<> |
| int | fl::gfx::halfOf< int > (int val) FL_NO_EXCEPT |
| |
| void | fl::gfx::detail::polyAdd128 (fl::u64 &hi, fl::u64 &lo, fl::u64 ahi, fl::u64 alo) FL_NO_EXCEPT |
| | 128-bit add: (hi, lo) += (ahi, alo).
|
| |
| int | fl::gfx::detail::polyClz32 (fl::u32 v) FL_NO_EXCEPT |
| | Count leading zeros of a non-zero 32-bit value (branch form: portable to MSVC where __builtin_clz is unavailable, and branch-free on x86).
|
| |
| int | fl::gfx::detail::polyColClamped (fl::i64 v, int width) FL_NO_EXCEPT |
| | Pixel column floor(v / 65536) of a row-extent bound v = x +/- hw, clamped to [-1, width].
|
| |
| FL_NO_INLINE fl::i32 | fl::gfx::detail::polyDivRoundT28 (fl::u64 mhi, fl::u64 mlo, fl::u64 dv) FL_NO_EXCEPT |
| | T = round_half_up(M / dv) clamped to kPolyOne, for M = (mhi, mlo) and 0 < dv < 2^63 (polyLineT28's quotient step).
|
| |
| fl::i32 | fl::gfx::detail::polyLineT28 (fl::i32 B, fl::i32 D, fl::i64 u, fl::i32 ta, fl::i32 tb) FL_NO_EXCEPT |
| | Exact left-of-line coverage of one pixel for one polygon edge.
|
| |
| void | fl::gfx::detail::polyMul128 (fl::u64 a, fl::u64 b, fl::u64 &hi, fl::u64 &lo) FL_NO_EXCEPT |
| | Multiply two unsigned values < 2^48, returning the 128-bit product as a (hi, lo) u64 pair.
|
| |
| void | fl::gfx::detail::polySortBand (fl::u8 *idx, fl::i64 *keys, const PolyEdge *edges, int nc, fl::i32 mid) FL_NO_EXCEPT |
| | Sort a band's active edges (idx[0..nc)) by the committed implementation's midpoint key: the FLOORED Q16.16 crossing at the band midpoint, key_e = floor((2*dy_e*x_e + B_e*mid) / (2*dy_e)), mid = a + b with a stable insertion sort (equal keys keep edge-index order).
|
| |
| int | fl::gfx::detail::polyTopBit128 (fl::u32 m3, fl::u32 m2, fl::u32 m1, fl::u32 m0) FL_NO_EXCEPT |
| | Index (0..127) of the highest set bit of a 128-bit value held in four 32-bit lanes (m3 most significant), or -1 when the value is zero.
|
| |
| template<typename PixelT, bool Overwrite> |
| void | fl::gfx::detail::renderDiscRow (PixelT *buf, int w, int py, fl::i32 d2_row, const DiscCtx< PixelT > &f) FL_NO_EXCEPT |
| | Render one scanline of a disc using incremental d².
|
| |
| template<typename PixelT, bool Overwrite> |
| void | fl::gfx::detail::renderRingRow (PixelT *buf, int w, int py, fl::i32 d2_row, const RingCtx< PixelT > &g) FL_NO_EXCEPT |
| | Render one scanline of a ring using incremental d² with phase-based scanning.
|
| |
| template<typename PixelT, bool Overwrite> |
| void | fl::gfx::detail::renderStrokeRow (PixelT *buf, int w, int py, fl::i32 cross_start, fl::i32 dot_start, const StrokeCtx< PixelT > &sc) FL_NO_EXCEPT |
| | Render one scanline of a stroke line using phase-based scanning.
|
| |
| template<typename Coord> |
| fl::i32 | fl::gfx::detail::toFixed8 (Coord val) FL_NO_EXCEPT |
| | Convert any Coord type to 8.8 fixed-point (fl::i32).
|
| |
| template<> |
| fl::i32 | fl::gfx::detail::toFixed8< double > (double val) FL_NO_EXCEPT |
| |
| template<> |
| fl::i32 | fl::gfx::detail::toFixed8< fl::s16x16 > (fl::s16x16 val) FL_NO_EXCEPT |
| |
| template<> |
| fl::i32 | fl::gfx::detail::toFixed8< float > (float val) FL_NO_EXCEPT |
| |
| template<> |
| fl::i32 | fl::gfx::detail::toFixed8< int > (int val) FL_NO_EXCEPT |
| |
| template<typename T> |
| int | fl::gfx::toInt (const T &val) FL_NO_EXCEPT |
| | Helper to convert any coordinate type to int Supports: s16x16 (via to_int()), float, int, and other arithmetic types.
|
| |
| template<> |
| int | fl::gfx::toInt< double > (const double &val) FL_NO_EXCEPT |
| |
| template<> |
| int | fl::gfx::toInt< float > (const float &val) FL_NO_EXCEPT |
| |
| template<> |
| int | fl::gfx::toInt< int > (const int &val) FL_NO_EXCEPT |
| |
| template<typename Coord> |
| fl::i32 | fl::gfx::detail::toQ16 (Coord val) FL_NO_EXCEPT |
| | Convert any Coord type to Q16.16 raw i32 for integer inner loops.
|
| |
| template<> |
| fl::i32 | fl::gfx::detail::toQ16< double > (double val) FL_NO_EXCEPT |
| |
| template<> |
| fl::i32 | fl::gfx::detail::toQ16< fl::s16x16 > (fl::s16x16 val) FL_NO_EXCEPT |
| |
| template<> |
| fl::i32 | fl::gfx::detail::toQ16< float > (float val) FL_NO_EXCEPT |
| |
| template<> |
| fl::i32 | fl::gfx::detail::toQ16< int > (int val) FL_NO_EXCEPT |
| |
| template<typename Coord> |
| fl::i32 | fl::gfx::detail::toQ16Clamped (Coord val) FL_NO_EXCEPT |
| | Convert any Coord type to Q16.16, clamped to ±8191 px (NaN -> 0).
|
| |