|
roo_display
API Documentation for roo_display
|
Display output wrapper that applies a Transformation.
More...
#include <transformation.h>
Public Member Functions | |
| TransformedDisplayOutput (DisplayOutput &delegate, Transformation transformation) | |
| Construct a transformed output. | |
| void | setAddress (uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, BlendingMode mode) override |
Set a rectangular window filled by subsequent calls to write(). | |
| void | write (Color *color, uint32_t pixel_count) override |
| Write pixels into the current address window. | |
| void | fill (Color color, uint32_t pixel_count) override |
Write pixel_count copies of the same color into the current address window. | |
| void | writePixels (BlendingMode mode, Color *color, int16_t *x, int16_t *y, uint16_t pixel_count) override |
| Draw the specified pixels (per-pixel colors). Invalidates the address window. | |
| void | fillPixels (BlendingMode mode, Color color, int16_t *x, int16_t *y, uint16_t pixel_count) override |
| Draw the specified pixels using the same color. Invalidates the address window. | |
| void | writeRects (BlendingMode mode, Color *color, int16_t *x0, int16_t *y0, int16_t *x1, int16_t *y1, uint16_t pixel_count) override |
| Draw the specified rectangles (per-rectangle colors). Invalidates the address window. | |
| void | fillRects (BlendingMode mode, Color color, int16_t *x0, int16_t *y0, int16_t *x1, int16_t *y1, uint16_t count) override |
| Draw the specified rectangles using the same color. Invalidates the address window. | |
| const Box & | clip_box () const |
| Return the effective clip box. | |
| const ColorFormat & | getColorFormat () const override |
| Return the native color format used by this device for direct drawing. | |
Public Member Functions inherited from roo_display::DisplayOutput | |
| virtual | ~DisplayOutput () |
| virtual void | begin () |
| Enter a write transaction. | |
| virtual void | end () |
| Finalize the previously entered write transaction, flushing any pending writes. | |
| virtual void | flush () |
| Wait until pending asynchronous drawing operations complete. | |
| void | setAddress (const Box &bounds, BlendingMode blending_mode) |
Convenience overload for setAddress() using a Box. | |
| void | fillRect (BlendingMode blending_mode, const Box &rect, Color color) |
| Fill a single rectangle. Invalidates the address window. | |
| void | fillRect (BlendingMode blending_mode, int16_t x0, int16_t y0, int16_t x1, int16_t y1, Color color) |
| Fill a single rectangle. Invalidates the address window. | |
| void | fillRect (int16_t x0, int16_t y0, int16_t x1, int16_t y1, Color color) |
Fill a single rectangle using BlendingMode::kSource. | |
| virtual void | drawDirectRect (const roo::byte *data, size_t row_width_bytes, int16_t src_x0, int16_t src_y0, int16_t src_x1, int16_t src_y1, int16_t dst_x0, int16_t dst_y0) |
| Draw a rectangle represented in the device's native color format. | |
| virtual void | drawDirectRectAsync (const roo::byte *data, size_t row_width_bytes, int16_t src_x0, int16_t src_y0, int16_t src_x1, int16_t src_y1, int16_t dst_x0, int16_t dst_y0) |
| Asynchronous variant of drawDirectRect(). | |
Display output wrapper that applies a Transformation.
Definition at line 100 of file transformation.h.
|
inline |
Construct a transformed output.
Definition at line 103 of file transformation.h.
Return the effective clip box.
Definition at line 132 of file transformation.h.
|
overridevirtual |
Write pixel_count copies of the same color into the current address window.
The same preconditions as write() apply: the address must be set via setAddress() and not invalidated by any of the write* / fill* methods. Otherwise, the behavior is undefined.
Default implementation falls back to chunked write(). Drivers and filters can override this for a more efficient single-color path.
Reimplemented from roo_display::DisplayOutput.
Definition at line 230 of file transformation.cpp.
References color, roo_display::DisplayOutput::fill(), roo_display::Transformation::is_abs_rescaled(), roo_display::Transformation::is_rescaled(), roo_display::Transformation::transformRectNoSwap(), roo_display::Transformation::x_offset(), roo_display::Transformation::x_scale(), roo_display::Box::xMax(), roo_display::Box::xMin(), roo_display::Transformation::xy_swap(), roo_display::Transformation::y_offset(), and roo_display::Transformation::y_scale().
|
overridevirtual |
Draw the specified pixels using the same color. Invalidates the address window.
| blending_mode | Blending mode used for drawing. |
| color | The color to use for all pixels. |
| x | Pointer to x-coordinates for each pixel. |
| y | Pointer to y-coordinates for each pixel. |
| pixel_count | Number of pixels. |
Implements roo_display::DisplayOutput.
Definition at line 316 of file transformation.cpp.
References color, roo_display::DisplayOutput::fillPixels(), roo_display::Transformation::is_abs_rescaled(), roo_display::Transformation::is_rescaled(), roo_display::Transformation::is_translated(), roo_display::Transformation::transformRectNoSwap(), roo_display::Transformation::x_offset(), roo_display::Transformation::x_scale(), roo_display::Transformation::xy_swap(), roo_display::Transformation::y_offset(), and roo_display::Transformation::y_scale().
|
overridevirtual |
Draw the specified rectangles using the same color. Invalidates the address window.
| blending_mode | Blending mode used for drawing. |
| color | The color to use for all rectangles. |
| x0 | Pointer to left coordinates for each rectangle. |
| y0 | Pointer to top coordinates for each rectangle. |
| x1 | Pointer to right coordinates for each rectangle. |
| y1 | Pointer to bottom coordinates for each rectangle. |
| count | Number of rectangles. |
Implements roo_display::DisplayOutput.
Definition at line 373 of file transformation.cpp.
References color, roo_display::Transformation::transformRectNoSwap(), and roo_display::Transformation::xy_swap().
|
inlineoverridevirtual |
Return the native color format used by this device for direct drawing.
Implements roo_display::DisplayOutput.
Definition at line 134 of file transformation.h.
References roo_display::DisplayOutput::getColorFormat().
|
overridevirtual |
Set a rectangular window filled by subsequent calls to write().
| x0 | Left coordinate (inclusive). |
| y0 | Top coordinate (inclusive). |
| x1 | Right coordinate (inclusive). |
| y1 | Bottom coordinate (inclusive). |
| blending_mode | Blending mode for subsequent writes. |
Implements roo_display::DisplayOutput.
Definition at line 173 of file transformation.cpp.
References roo_display::Transformation::is_rescaled(), roo_display::DisplayOutput::setAddress(), roo_display::Transformation::x_offset(), roo_display::Transformation::xy_swap(), and roo_display::Transformation::y_offset().
|
overridevirtual |
Write pixels into the current address window.
The address must be set via setAddress() and not invalidated by any of the write* / fill* methods. Otherwise, the behavior is undefined.
| color | Pointer to source pixels. |
| pixel_count | Number of pixels to write. |
Implements roo_display::DisplayOutput.
Definition at line 187 of file transformation.cpp.
References color, roo_display::Transformation::is_abs_rescaled(), roo_display::Transformation::is_rescaled(), roo_display::Transformation::transformRectNoSwap(), roo_display::DisplayOutput::write(), writer, roo_display::Transformation::x_offset(), roo_display::Transformation::x_scale(), roo_display::Box::xMax(), roo_display::Box::xMin(), roo_display::Transformation::xy_swap(), roo_display::Transformation::y_offset(), and roo_display::Transformation::y_scale().
|
overridevirtual |
Draw the specified pixels (per-pixel colors). Invalidates the address window.
| blending_mode | Blending mode used for drawing. |
| color | Pointer to colors for each pixel. |
| x | Pointer to x-coordinates for each pixel. |
| y | Pointer to y-coordinates for each pixel. |
| pixel_count | Number of pixels. |
Implements roo_display::DisplayOutput.
Definition at line 275 of file transformation.cpp.
References color, roo_display::Transformation::is_abs_rescaled(), roo_display::Transformation::is_rescaled(), roo_display::Transformation::is_translated(), roo_display::Transformation::transformRectNoSwap(), roo_display::DisplayOutput::writePixels(), writer, roo_display::Transformation::x_offset(), roo_display::Transformation::x_scale(), roo_display::Transformation::xy_swap(), roo_display::Transformation::y_offset(), and roo_display::Transformation::y_scale().
|
overridevirtual |
Draw the specified rectangles (per-rectangle colors). Invalidates the address window.
| blending_mode | Blending mode used for drawing. |
| color | Pointer to colors for each rectangle. |
| x0 | Pointer to left coordinates for each rectangle. |
| y0 | Pointer to top coordinates for each rectangle. |
| x1 | Pointer to right coordinates for each rectangle. |
| y1 | Pointer to bottom coordinates for each rectangle. |
| count | Number of rectangles. |
Implements roo_display::DisplayOutput.
Definition at line 355 of file transformation.cpp.
References color, roo_display::Transformation::transformRectNoSwap(), writer, and roo_display::Transformation::xy_swap().