|
roo_display
API Documentation for roo_display
|
Smooth (anti-aliased) shape rasterizable. More...
#include <smooth.h>
Data Structures | |
| struct | Arc |
| struct | Pixel |
| struct | RoundRect |
| struct | Triangle |
| struct | Wedge |
Public Member Functions | |
| SmoothShape () | |
| Box | extents () const override |
| Return the bounding box encompassing all pixels that need to be drawn. | |
| void | readColors (const int16_t *x, const int16_t *y, uint32_t count, Color *result) const override |
| Read colors for the given points. | |
| bool | readColorRect (int16_t xMin, int16_t yMin, int16_t xMax, int16_t yMax, Color *result) const override |
| Read colors for a rectangle. | |
Public Member Functions inherited from roo_display::Rasterizable | |
| void | readColorsMaybeOutOfBounds (const int16_t *x, const int16_t *y, uint32_t count, Color *result, Color out_of_bounds_color=color::Transparent) const |
| Read colors for points that may be out of bounds. | |
| std::unique_ptr< PixelStream > | createStream () const override |
Default createStream() using readColors(). | |
| std::unique_ptr< PixelStream > | createStream (const Box &bounds) const override |
Default createStream() for a clipped box using readColors(). | |
Public Member Functions inherited from roo_display::Streamable | |
| virtual TransparencyMode | getTransparencyMode () const |
| Return the transparency mode for pixels in this stream. | |
Public Member Functions inherited from roo_display::Drawable | |
| virtual | ~Drawable () |
| virtual Box | anchorExtents () const |
| Return the bounds used for alignment. | |
Friends | |
| SmoothShape | SmoothWedgedLine (FpPoint a, float width_a, FpPoint b, float width_b, Color color, EndingStyle ending_style) |
| Create a wedged line with different start/end widths. | |
| SmoothShape | SmoothThickRoundRect (float x0, float y0, float x1, float y1, float radius, float thickness, Color color, Color interior_color) |
| Create an outlined round-rect with thickness. | |
| SmoothShape | SmoothRotatedFilledRect (FpPoint center, float width, float height, float angle, Color color) |
| Create a rotated filled rectangle. | |
| SmoothShape | SmoothThickArcImpl (FpPoint center, float radius, float thickness, float angle_start, float angle_end, Color active_color, Color inactive_color, Color interior_color, EndingStyle ending_style, bool trim_to_active) |
| SmoothShape | SmoothFilledTriangle (FpPoint a, FpPoint b, FpPoint c, Color color) |
| Create a filled triangle. | |
Additional Inherited Members | |
Static Public Member Functions inherited from roo_display::Drawable | |
| static const Drawable * | Empty () |
| A singleton representing a no-op drawable with no bounding box. | |
| roo_display::SmoothShape::SmoothShape | ( | ) |
Definition at line 9 of file smooth.cpp.
|
inlineoverridevirtual |
Return the bounding box encompassing all pixels that need to be drawn.
This method is called during a transaction and must not block or perform I/O.
Implements roo_display::Drawable.
|
overridevirtual |
Read colors for a rectangle.
Returns true if all colors are identical (then only result[0] is valid). The caller must ensure the rectangle is within bounds.
Reimplemented from roo_display::Rasterizable.
Definition at line 1888 of file smooth.cpp.
References arc_, roo_display::SmoothShape::Pixel::color, pixel_, roo_display::Rasterizable::readColorRect(), round_rect_, and triangle_.
|
overridevirtual |
Read colors for the given points.
The caller must ensure all points are within bounds.
Implements roo_display::Rasterizable.
Definition at line 1854 of file smooth.cpp.
References arc_, roo_display::SmoothShape::Pixel::color, pixel_, round_rect_, triangle_, and wedge_.
|
friend |
Create a filled triangle.
Definition at line 454 of file smooth.cpp.
|
friend |
Create a rotated filled rectangle.
Definition at line 91 of file smooth.cpp.
|
friend |
Definition at line 214 of file smooth.cpp.
|
friend |
Create an outlined round-rect with thickness.
Definition at line 104 of file smooth.cpp.
|
friend |
Create a wedged line with different start/end widths.
Definition at line 38 of file smooth.cpp.
| Arc roo_display::SmoothShape::arc_ |
Definition at line 240 of file smooth.h.
Referenced by readColorRect(), and readColors().
| Pixel roo_display::SmoothShape::pixel_ |
Definition at line 242 of file smooth.h.
Referenced by readColorRect(), and readColors().
| RoundRect roo_display::SmoothShape::round_rect_ |
Definition at line 239 of file smooth.h.
Referenced by readColorRect(), and readColors().
| Triangle roo_display::SmoothShape::triangle_ |
Definition at line 241 of file smooth.h.
Referenced by readColorRect(), and readColors().
| Wedge roo_display::SmoothShape::wedge_ |
Definition at line 238 of file smooth.h.
Referenced by readColors().