1 #ifndef TERMOX_PAINTER_PAINTER_HPP
2 #define TERMOX_PAINTER_PAINTER_HPP
3 #include <termox/painter/brush.hpp>
4 #include <termox/widget/area.hpp>
5 #include <termox/widget/point.hpp>
13 namespace ox::detail {
39 [[nodiscard]]
auto at(Point p)
const ->
Glyph;
42 [[nodiscard]]
auto at(Point p) ->
Glyph&;
61 void put_global(
Glyph tile, Point p);
65 void hline_global(
Glyph tile, Point a, Point b);
66 void hline_global_no_brush(
Glyph tile, Point a, Point b);
70 void vline_global(
Glyph tile, Point a, Point b);
74 void fill_global(
Glyph tile, Point point, Area area);
75 void fill_global_no_brush(
Glyph tile, Point point, Area area);
Holds the look of any paintable object with Traits and Colors.
Definition: brush.hpp:13
Holds a collection of Glyphs with a similar interface to std::string.
Definition: glyph_string.hpp:19
Contains functions to paint Glyphs to a Widget's screen area.
Definition: painter.hpp:21
auto hline(Glyph tile, Point a, Point b) -> Painter &
Draw a horizontal line from a to b, inclusive, in local coords.
Definition: painter.cpp:59
auto at(Point p) const -> Glyph
Return a copy of the Glyph at p, is U'\0' if Glyph is not set yet.
Definition: painter.cpp:36
auto wallpaper_fill() -> Painter &
Fill the entire widget screen with wallpaper.
Definition: painter.cpp:73
auto fill(Glyph tile, Point point, Area area) -> Painter &
Fill the Widget with tile Glyphs starting at the top left point.
Definition: painter.cpp:48
auto vline(Glyph tile, Point a, Point b) -> Painter &
Draw a vertical line from a to b, inclusive, in local coords.
Definition: painter.cpp:66
Painter(Widget &w, detail::Canvas &canvas)
Construct an object ready to paint Glyphs from w to canvas.
Definition: painter.cpp:12
auto put(Glyph tile, Point p) -> Painter &
Put single Glyph to local coordinates.
Definition: painter.cpp:18
A 2D field of Glyphs, useful as a screen buffer.
Definition: canvas.hpp:18
Holds a description of a paintable tile on the screen.
Definition: glyph.hpp:11