Renderer.h
Go to the documentation of this file.
171 SceneRenderer(const Location& location, const SceneObject& scene) : MultiRenderer(location), scene(scene)
247 : Renderer(location), rectangles(location.dest, pen, 1), w(pen.width), x1(pt1.x), y1(pt1.y), x2(pt2.x),
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)
355 FilledRectRenderer(const Location& location, const Brush& brush, const Rect& rect, const Blend* blender = nullptr)
361 : Renderer(location), brush(object.brush), rect(object.rect + location.dest.topLeft()), blender(object.blender)
411 : Renderer(location), renderer(new PolylineRenderer(location, polyline)), polyline(object), pen(object.pen),
412 rect(object.rect), radius(object.radius), corners{Point(rect.left() + radius, rect.top() + radius),
477 CircleRenderer(const Location& location, const Pen& pen, Point centre, uint16_t radius, uint8_t corners)
478 : Renderer(location), pixels(location.dest, pen, 8), x0(centre.x), y0(centre.y), f(1 - radius), ddF_x(1),
515 FilledCircleRenderer(const Location& location, const Brush& brush, Point centre, uint16_t radius, uint16_t delta,
517 : Renderer(location), rectangles(location.dest, brush, 4), x0(centre.x), y0(centre.y), f(1 - radius),
556 ycrit((3 * b2 / 4) + 1), t(b2 + a2 - 2 * a2 * b), dxt(b2 * (3 + x + x)), dyt(a2 * (3 - y - y)), d2xt(b2 + b2),
697 ArcRenderer(const Location& location, const Pen& pen, const Rect& rect, int start_angle, int end_angle)
727 FilledArcRenderer(const Location& location, const Brush& brush, const Rect& rect, int start_angle, int end_angle)
753 ImageRenderer(const Location& location, const ImageObject& object) : Renderer(location), object(object)
870 ScrollRenderer(const Location& location, const ScrollObject& object) : Renderer(location), object(object)
966 AlphaBuffer(const TextObject& object, uint16_t ymax) : element{object.elements.head()}, ymax(ymax)
Definition: Renderer.h:585
void fill(const Rect &r, Point p0, Point p1, Point p2, int start_angle, int end_angle)
ArcRenderer(const Location &location, const Pen &pen, const Rect &rect, int start_angle, int end_angle)
Definition: Renderer.h:697
void addRectangles2() override
void addRectangles1() override
bool execute(Surface &surface) override
Called to do some writing to the surface.
BlendRenderer(const Location &location, const Object &object, const Blend *blend)
Definition: Renderer.h:912
bool execute(Surface &surface) override
Called to do some writing to the surface.
A circle outline.
Definition: Libraries/Graphics/src/include/Graphics/Object.h:370
bool execute(Surface &surface) override
Called to do some writing to the surface.
CircleRenderer(const Location &location, const CircleObject &object)
Definition: Renderer.h:465
CircleRenderer(const Location &location, const Pen &pen, Point centre, uint16_t radius, uint8_t corners)
Used to draw corners only.
Definition: Renderer.h:477
Describes a copy operation within the same surface.
Definition: Libraries/Graphics/src/include/Graphics/Object.h:1122
bool execute(Surface &surface) override
Called to do some writing to the surface.
CopyRenderer(const Location &location, const CopyObject &object)
Definition: Renderer.h:805
virtual void readComplete(uint8_t *data, size_t length)
Definition: Renderer.h:827
void init()
void startRead(Surface &surface)
An ellipse outline.
Definition: Libraries/Graphics/src/include/Graphics/Object.h:454
bool execute(Surface &surface) override
Called to do some writing to the surface.
EllipseRenderer(const Location &location, const EllipseObject &object)
Definition: Renderer.h:607
virtual void addRectangles2()
virtual void addRectangles1()
EllipseRenderer(const Location &location, const CircleObject &object)
Definition: Renderer.h:612
EllipseRenderer(const Location &location, const Pen &pen, const Rect &rect)
Definition: Renderer.h:602
void doStep(Ellipse::Step step) override
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:727
A filled circle.
Definition: Libraries/Graphics/src/include/Graphics/Object.h:411
bool execute(Surface &surface) override
Called to do some writing to the surface.
FilledCircleRenderer(const Location &location, const Brush &brush, Point centre, uint16_t radius, uint16_t delta, uint8_t quadrants)
Used to draw rounded parts of a rounded rectangle These are handled by drawing lines between the left...
Definition: Renderer.h:515
FilledCircleRenderer(const Location &location, const FilledCircleObject &object)
Definition: Renderer.h:505
A filled ellipse.
Definition: Libraries/Graphics/src/include/Graphics/Object.h:481
FilledEllipseRenderer(const Location &location, const FilledEllipseObject &object)
Definition: Renderer.h:660
FilledEllipseRenderer(const Location &location, const FilledCircleObject &object)
Definition: Renderer.h:665
virtual void doStep(Ellipse::Step step)
bool execute(Surface &surface) override
Called to do some writing to the surface.
FilledEllipseRenderer(const Location &location, const Brush &brush, const Rect &rect)
Definition: Renderer.h:655
A filled rectangle.
Definition: Libraries/Graphics/src/include/Graphics/Object.h:227
Rect rect
Definition: Libraries/Graphics/src/include/Graphics/Object.h:250
FilledRectRenderer(const Location &location, const PointObject &object)
Definition: Renderer.h:365
FilledRectRenderer(const Location &location, const Brush &brush, const Rect &rect, const Blend *blender=nullptr)
Definition: Renderer.h:355
bool execute(Surface &surface) override
Called to do some writing to the surface.
FilledRectRenderer(const Location &location, const FilledRectObject &object)
Definition: Renderer.h:360
Draws a filled rectangle with rounded corners.
Definition: Renderer.h:437
bool execute(Surface &surface) override
Called to do some writing to the surface.
FilledRoundedRectRenderer(const Location &location, const FilledRectObject &object)
Definition: Renderer.h:439
GfxLineRenderer(const Location &location, const LineObject &object)
Definition: Renderer.h:203
GfxLineRenderer(const Location &location, Pen pen, Point pt1, Point pt2)
Definition: Renderer.h:208
bool execute(Surface &surface) override
Called to do some writing to the surface.
TextOptions Options
Definition: Libraries/Graphics/src/include/Graphics/Object.h:853
Definition: Renderer.h:846
ImageCopyRenderer(const Location &location, const ImageObject &image, const Blend *blend)
Definition: Renderer.h:848
void readComplete(uint8_t *data, size_t length) override
Virtual base class for an image.
Definition: Libraries/Graphics/src/include/Graphics/Object.h:562
uint16_t height() const
Definition: Libraries/Graphics/src/include/Graphics/Object.h:585
uint16_t width() const
Definition: Libraries/Graphics/src/include/Graphics/Object.h:580
ImageRenderer(const Location &location, const ImageObject &object)
Definition: Renderer.h:753
bool execute(Surface &surface) override
Called to do some writing to the surface.
LineRenderer(const Location &location, Pen pen, Point pt1, Point pt2)
Definition: Renderer.h:246
bool execute(Surface &surface) override
Called to do some writing to the surface.
LineRenderer(const Location &location, const LineObject &object)
Definition: Renderer.h:241
virtual const Object * getNextObject()=0
virtual void renderDone(const Object *object)=0
bool execute(Surface &surface) override
Called to do some writing to the surface.
A drawable object inherits from this virtual base class.
Definition: Libraries/Graphics/src/include/Graphics/Object.h:97
Definition: Asset.h:403
PointList(const Rect &bounds, const Brush &brush, uint8_t capacity)
Definition: Renderer.h:90
A single pixel == 1x1 rectangle.
Definition: Libraries/Graphics/src/include/Graphics/Object.h:175
A sequence of lines.
Definition: Libraries/Graphics/src/include/Graphics/Object.h:300
Draws series of lines defined by a PolylineObject
Definition: Renderer.h:296
bool execute(Surface &surface) override
Called to do some writing to the surface.
PolylineRenderer(const Location &location, const PolylineObject &object)
Definition: Renderer.h:298
RectList(const Rect &bounds, const Brush &brush, uint8_t capacity)
Definition: Renderer.h:122
bool render(Surface &surface)
A rectangular outline.
Definition: Libraries/Graphics/src/include/Graphics/Object.h:197
RectRenderer(const Location &location, const RectObject &object)
Definition: Renderer.h:334
bool execute(Surface &surface) override
Called to do some writing to the surface.
Definition: Renderer.h:338
RectRenderer(const Location &location, const Pen &pen, const Rect &rect)
Definition: Renderer.h:317
Virtual base class to manage rendering of various types of information to a surface.
Definition: Libraries/Graphics/src/include/Graphics/Object.h:66
Location location
Definition: Libraries/Graphics/src/include/Graphics/Object.h:90
Renderer(const Location &location)
Constructor.
Definition: Libraries/Graphics/src/include/Graphics/Object.h:75
Draws a rectangle outline with rounded corners.
Definition: Renderer.h:408
bool execute(Surface &surface) override
Called to do some writing to the surface.
RoundedRectRenderer(const Location &location, const RectObject &object)
Definition: Renderer.h:410
A scene is a list of other objects, so we just iterate through the list and draw each in turn.
Definition: Renderer.h:169
const Object * getNextObject() override
Definition: Renderer.h:180
void renderDone(const Object *object) override
Definition: Renderer.h:176
SceneRenderer(const Location &location, const SceneObject &scene)
Definition: Renderer.h:171
Describes a scrolling operation.
Definition: Libraries/Graphics/src/include/Graphics/Object.h:1146
ScrollRenderer(const Location &location, const ScrollObject &object)
Definition: Renderer.h:870
bool execute(Surface &surface) override
Called to do some writing to the surface.
Describes a target surface and corresponding source location.
Definition: Libraries/Graphics/src/include/Graphics/Object.h:1095
SurfaceRenderer(const Location &location, Surface &target, const Rect &dest, Point source)
Definition: Renderer.h:778
bool execute(Surface &surface) override
Called to do some writing to the surface.
SurfaceRenderer(const Location &location, const SurfaceObject &object)
Definition: Renderer.h:773
Definition: Asset.h:666
Definition: Libraries/Graphics/src/include/Graphics/Object.h:932
Definition: Libraries/Graphics/src/include/Graphics/Object.h:989
A block of text consisting of zero or more segments.
Definition: Libraries/Graphics/src/include/Graphics/Object.h:902
bool execute(Surface &surface) override
Called to do some writing to the surface.
TextRenderer(const Location &location, const TextObject &object)
Definition: Renderer.h:943
Class to enable buffering of a single line of text, with simple editing.
Definition: LineBuffer.h:139
void init(IDataSourceStream *stream)
Application calls this method to set source for graphics resourcess.
Definition: Virtual.h:31
Rect intersect(Rect r1, const Rect &r2)
Definition: Libraries/Graphics/src/include/Graphics/Types.h:582
TPoint< int16_t > Point
Definition: Libraries/Graphics/src/include/Graphics/Types.h:280
@ None
Step step()
Identifies position within bounding rectangle.
Definition: Libraries/Graphics/src/include/Graphics/Types.h:683
Point pos
Position relative to dest/source top-left corner.
Definition: Libraries/Graphics/src/include/Graphics/Types.h:702
Rect source
Reference source area.
Definition: Libraries/Graphics/src/include/Graphics/Types.h:697
Rect dest
Where to write pixels on surface.
Definition: Libraries/Graphics/src/include/Graphics/Types.h:687
Buffer used for reading pixel data from device.
Definition: Graphics/src/include/Graphics/Buffer.h:186
Composite ReadBuffer with status.
Definition: Graphics/src/include/Graphics/Buffer.h:222
Location and size of rectangular area (x, y, w, h)
Definition: Libraries/Graphics/src/include/Graphics/Types.h:287
Size size() const
Definition: Libraries/Graphics/src/include/Graphics/Types.h:447
bool contains(Point pt) const
Definition: Libraries/Graphics/src/include/Graphics/Types.h:481
Point clip(Point pt) const
Definition: Libraries/Graphics/src/include/Graphics/Types.h:508
Point topLeft() const
Definition: Libraries/Graphics/src/include/Graphics/Types.h:417
Size of rectangular area (width x height)
Definition: Libraries/Graphics/src/include/Graphics/Types.h:105