8#include "roo_io/memory/fill.h"
19 roo::byte*
buffer() {
return buffer_; }
20 const roo::byte*
buffer()
const {
return buffer_; }
26 return (
uint8_t)(buffer_[y * width_bytes_ + x / 2] >> ((1 - (x % 2)) * 4)) &
34 b |= (roo::byte)(value << 4);
37 b |= (roo::byte)value;
44 roo_io::NibbleFill(buffer_,
rect.yMin() *
width(),
45 rect.height() *
width(), (roo::byte)value);
50 roo_io::NibbleFill(buffer_, offset, w, (roo::byte)value);
67 : ptr_(
rect->buffer() + (y0 *
rect->width_bytes() + x0 / 2)),
70 width_(x0 == 0 && x1 ==
rect->width() - 1
73 width_skip_(
rect->width() - (x1 - x0 + 1)) {}
77 ptr_ += (width_skip_ + nibble_idx_) / 2;
78 nibble_idx_ = (width_skip_ + nibble_idx_) % 2;
84 ptr_ += (nibble_idx_ >= 2);
90 const roo::byte* ptr_;
Axis-aligned integer rectangle.
void writeRect(int16_t x0, int16_t y0, int16_t x1, int16_t y1, Color color)
ARGB8888 color stored as a 32-bit unsigned integer.
NibbleRectWindowIterator(const NibbleRect *rect, int16_t x0, int16_t y0, int16_t x1, int16_t y1)
void fillRect(const Box &rect, uint8_t value)
const roo::byte * buffer() const
NibbleRect(roo::byte *buffer, int16_t width_bytes, int16_t height)
int16_t width_bytes() const
uint8_t get(int16_t x, int16_t y) const
void set(int16_t x, int16_t y, uint8_t value)
Defines 140 opaque HTML named colors.
void fillRect(int16_t x0, int16_t y0, int16_t x1, int16_t y1) const
BufferedRectWriter & writer