Renderer.h
Go to the documentation of this file.
100 }
114 };
141 };
171 SceneRenderer(const Location& location, const SceneObject& scene) : MultiRenderer(location), scene(scene)
227 int16_t dy;
247 : Renderer(location), rectangles(location.dest, pen, 1), w(pen.width), x1(pt1.x), y1(pt1.y), x2(pt2.x),
257 simple,
260 vertical,
298 PolylineRenderer(const Location& location, const PolylineObject& object) : Renderer(location), object(object)
334 RectRenderer(const Location& location, const RectObject& object) : RectRenderer(location, object.pen, object.rect)
336 }
353 {
355 FilledRectRenderer(const Location& location, const Brush& brush, const Rect& rect, const Blend* blender = nullptr)
357 {
361 : Renderer(location), brush(object.brush), rect(object.rect + location.dest.topLeft()), blender(object.blender)
456 };
478 CircleRenderer(const Location& location, const Pen& pen, Point centre, uint16_t radius, uint16_t delta,
480 : Renderer(location), pixels(location.dest, pen, 8), x0(centre.x), y0(centre.y), f(1 - radius), ddF_x(1),
482 {
518 FilledCircleRenderer(const Location& location, const Brush& brush, Point centre, uint16_t radius, uint16_t delta,
520 : Renderer(location), rectangles(location.dest, brush, 4), x0(centre.x), y0(centre.y), f(1 - radius),
537 int16_t ddF_x;
560 ycrit((3 * b2 / 4) + 1), t(b2 + a2 - 2 * a2 * b), dxt(b2 * (3 + x + x)), dyt(a2 * (3 - y - y)), d2xt(b2 + b2),
594 };
604 {
630 };
657 {
661 {
699 {
701 ArcRenderer(const Location& location, const Pen& pen, const Rect& rect, int start_angle, int end_angle)
731 FilledArcRenderer(const Location& location, const Brush& brush, const Rect& rect, int start_angle, int end_angle)
757 ImageRenderer(const Location& location, const ImageObject& object) : Renderer(location), object(object)
850 {
854 {
874 ScrollRenderer(const Location& location, const ScrollObject& object) : Renderer(location), object(object)
893 int16_t cx;
932 std::unique_ptr<MemoryImageObject> image;
970 AlphaBuffer(const TextObject& object, uint16_t ymax) : element{object.elements.head()}, ymax(ymax)
int16_t bottom() const
Definition: Libraries/Graphics/src/include/Graphics/Types.h:431
bool contains(Point pt) const
Definition: Libraries/Graphics/src/include/Graphics/Types.h:500
@ None
virtual void readComplete(uint8_t *data, size_t length)
Definition: Renderer.h:850
SurfaceRenderer(const Location &location, const SurfaceObject &object)
Definition: Renderer.h:796
bool render(Surface &surface)
bool execute(Surface &surface) override
Called to do some writing to the surface.
Draws a filled rectangle with rounded corners.
Definition: Renderer.h:456
void init()
FilledCircleRenderer(const Location &location, const FilledCircleObject &object)
Definition: Renderer.h:527
bool execute(Surface &surface) override
Called to do some writing to the surface.
FilledRoundedRectRenderer(const Location &location, const FilledRectObject &object)
Definition: Renderer.h:459
bool execute(Surface &surface) override
Called to do some writing to the surface.
A circle outline.
Definition: Libraries/Graphics/src/include/Graphics/Object.h:389
int16_t right() const
Definition: Libraries/Graphics/src/include/Graphics/Types.h:421
bool execute(Surface &surface) override
Called to do some writing to the surface.
A filled rectangle.
Definition: Libraries/Graphics/src/include/Graphics/Object.h:245
bool execute(Surface &surface) override
Called to do some writing to the surface.
Location and size of rectangular area (x, y, w, h)
Definition: Libraries/Graphics/src/include/Graphics/Types.h:306
virtual const Object * getNextObject()=0
bool execute(Surface &surface) override
Called to do some writing to the surface.
ImageCopyRenderer(const Location &location, const ImageObject &image, const Blend *blend)
Definition: Renderer.h:871
Virtual base class to manage rendering of various types of information to a surface.
Definition: Libraries/Graphics/src/include/Graphics/Object.h:84
ImageRenderer(const Location &location, const ImageObject &object)
Definition: Renderer.h:776
TextOptions Options
Definition: Libraries/Graphics/src/include/Graphics/Object.h:874
A filled ellipse.
Definition: Libraries/Graphics/src/include/Graphics/Object.h:500
void init(IDataSourceStream *stream)
Application calls this method to set source for graphics resourcess.
Composite ReadBuffer with status.
Definition: Graphics/src/include/Graphics/Buffer.h:241
bool execute(Surface &surface) override
Called to do some writing to the surface.
A single pixel == 1x1 rectangle.
Definition: Libraries/Graphics/src/include/Graphics/Object.h:193
Definition: Asset.h:421
bool execute(Surface &surface) override
Called to do some writing to the surface.
Identifies position within bounding rectangle.
Definition: Libraries/Graphics/src/include/Graphics/Types.h:702
uint16_t width() const
Definition: Libraries/Graphics/src/include/Graphics/Object.h:600
CopyRenderer(const Location &location, const CopyObject &object)
Definition: Renderer.h:828
void addRectangles2() override
virtual void renderDone(const Object *object)=0
bool execute(Surface &surface) override
Called to do some writing to the surface.
Size of rectangular area (width x height)
Definition: Libraries/Graphics/src/include/Graphics/Types.h:124
PointList(const Rect &bounds, const Brush &brush, uint8_t capacity)
Definition: Renderer.h:109
Definition: Virtual.h:30
TPoint< int16_t > Point
Definition: Libraries/Graphics/src/include/Graphics/Types.h:299
bool execute(Surface &surface) override
Called to do some writing to the surface.
bool execute(Surface &surface) override
Called to do some writing to the surface.
FilledArcRenderer(const Location &location, const Brush &brush, const Rect &rect, int start_angle, int end_angle)
Definition: Renderer.h:750
A drawable object inherits from this virtual base class.
Definition: Libraries/Graphics/src/include/Graphics/Object.h:115
RectList(const Rect &bounds, const Brush &brush, uint8_t capacity)
Definition: Renderer.h:141
An ellipse outline.
Definition: Libraries/Graphics/src/include/Graphics/Object.h:473
bool execute(Surface &surface) override
Called to do some writing to the surface.
uint16_t height() const
Definition: Libraries/Graphics/src/include/Graphics/Object.h:605
FilledEllipseRenderer(const Location &location, const Brush &brush, const Rect &rect)
Definition: Renderer.h:678
bool execute(Surface &surface) override
Called to do some writing to the surface.
Step step()
void readComplete(uint8_t *data, size_t length) override
virtual void doStep(Ellipse::Step step)
BlendRenderer(const Location &location, const Object &object, const Blend *blend)
Definition: Renderer.h:935
SceneRenderer(const Location &location, const SceneObject &scene)
Definition: Renderer.h:190
A filled circle.
Definition: Libraries/Graphics/src/include/Graphics/Object.h:430
EllipseRenderer(const Location &location, const Pen &pen, const Rect &rect)
Definition: Renderer.h:625
PolylineRenderer(const Location &location, const PolylineObject &object)
Definition: Renderer.h:317
void renderDone(const Object *object) override
Definition: Renderer.h:195
void fill(const Rect &r, Point p0, Point p1, Point p2, int start_angle, int end_angle)
A scene is a list of other objects, so we just iterate through the list and draw each in turn.
Definition: Renderer.h:187
int16_t left() const
Definition: Libraries/Graphics/src/include/Graphics/Types.h:416
const Object * getNextObject() override
Definition: Renderer.h:199
virtual void addRectangles1()
bool execute(Surface &surface) override
Called to do some writing to the surface.
Rect dest
Where to write pixels on surface.
Definition: Libraries/Graphics/src/include/Graphics/Types.h:706
bool execute(Surface &surface) override
Called to do some writing to the surface.
TextRenderer(const Location &location, const TextObject &object)
Definition: Renderer.h:966
Size size() const
Definition: Libraries/Graphics/src/include/Graphics/Types.h:466
Rect source
Reference source area.
Definition: Libraries/Graphics/src/include/Graphics/Types.h:716
Describes a target surface and corresponding source location.
Definition: Libraries/Graphics/src/include/Graphics/Object.h:1115
bool execute(Surface &surface) override
Called to do some writing to the surface.
FilledRectRenderer(const Location &location, const Brush &brush, const Rect &rect, const Blend *blender=nullptr)
Definition: Renderer.h:374
ScrollRenderer(const Location &location, const ScrollObject &object)
Definition: Renderer.h:893
CircleRenderer(const Location &location, const CircleObject &object)
Definition: Renderer.h:485
Class to enable buffering of a single line of text, with simple editing.
Definition: LineBuffer.h:22
Describes a scrolling operation.
Definition: Libraries/Graphics/src/include/Graphics/Object.h:1166
void startRead(Surface &surface)
Virtual base class for an image.
Definition: Libraries/Graphics/src/include/Graphics/Object.h:581
Renderer(const Location &location)
Constructor.
Definition: Libraries/Graphics/src/include/Graphics/Object.h:94
Definition: Renderer.h:607
A rectangular outline.
Definition: Libraries/Graphics/src/include/Graphics/Object.h:215
GfxLineRenderer(const Location &location, const LineObject &object)
Definition: Renderer.h:222
virtual void addRectangles2()
bool execute(Surface &surface) override
Called to do some writing to the surface.
Definition: Renderer.h:357
void addRectangles1() override
bool execute(Surface &surface) override
Called to do some writing to the surface.
int16_t top() const
Definition: Libraries/Graphics/src/include/Graphics/Types.h:426
RoundedRectRenderer(const Location &location, const RectObject &object)
Definition: Renderer.h:429
bool execute(Surface &surface) override
Called to do some writing to the surface.
ArcRenderer(const Location &location, const Pen &pen, const Rect &rect, int start_angle, int end_angle)
Definition: Renderer.h:720
LineRenderer(const Location &location, const LineObject &object)
Definition: Renderer.h:260
Location location
Definition: Libraries/Graphics/src/include/Graphics/Object.h:109
RectRenderer(const Location &location, const Pen &pen, const Rect &rect)
Definition: Renderer.h:336
void doStep(Ellipse::Step step) override
bool execute(Surface &surface) override
Called to do some writing to the surface.
Rect intersect(Rect r1, const Rect &r2)
Definition: Libraries/Graphics/src/include/Graphics/Types.h:601