TermOx
Public Member Functions | List of all members
ox::Painter Class Reference

Contains functions to paint Glyphs to a Widget's screen area. More...

#include <painter.hpp>

Public Member Functions

 Painter (Widget &w, detail::Canvas &canvas)
 Construct an object ready to paint Glyphs from w to canvas.
 
 Painter (Painter const &)=delete
 
 Painter (Painter &&)=delete
 
Painteroperator= (Painter const &)=delete
 
Painteroperator= (Painter &&)=delete
 
auto put (Glyph tile, Point p) -> Painter &
 Put single Glyph to local coordinates.
 
auto put (Glyph_string const &text, Point p) -> Painter &
 Put Glyph_string to local coordinates.
 
auto at (Point p) const -> Glyph
 Return a copy of the Glyph at p, is U'\0' if Glyph is not set yet.
 
auto at (Point p) -> Glyph &
 Return a reference of the Glyph at p, is U'\0' if Glyph not set yet.
 
auto fill (Glyph tile, Point point, Area area) -> Painter &
 Fill the Widget with tile Glyphs starting at the top left point. More...
 
auto hline (Glyph tile, Point a, Point b) -> Painter &
 Draw a horizontal line from a to b, inclusive, in local coords.
 
auto vline (Glyph tile, Point a, Point b) -> Painter &
 Draw a vertical line from a to b, inclusive, in local coords.
 
auto wallpaper_fill () -> Painter &
 Fill the entire widget screen with wallpaper.
 

Detailed Description

Contains functions to paint Glyphs to a Widget's screen area.

For use within Widget::paint_event(...), and virtual overrides.

Member Function Documentation

◆ fill()

auto ox::Painter::fill ( Glyph  tile,
Point  point,
Area  area 
) -> Painter&

Fill the Widget with tile Glyphs starting at the top left point.

point is in Widget local coordinates.


The documentation for this class was generated from the following files: