mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-04-20 06:59:13 -04:00
44 lines
1.2 KiB
C++
44 lines
1.2 KiB
C++
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
|
|
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
|
|
|
|
#pragma once
|
|
|
|
#include <list>
|
|
|
|
#include <Math.hpp>
|
|
|
|
#include "DrawCommand.hpp"
|
|
#include "Context.hpp"
|
|
#include "DrawCommandForward.hpp"
|
|
|
|
namespace gui
|
|
{
|
|
class RawFont;
|
|
class FontGlyph;
|
|
|
|
class Renderer
|
|
{
|
|
/**
|
|
* convention: all the coordinates are is a pixel. the origin is (0,0) and it's ABOVE (UP) & TO THE LEFT of the
|
|
* topmost left pixel. Therefore to draw 1px wide line spanning the whole topmost row, it will be drawHorizontal
|
|
* (0,0, 1px, length, ::DOWN). It's equvalent to drawHorizontal (0,1, 1px, length, ::UP); default is DOWN &
|
|
* RIGHT a is the first pixel. a is (0,0) DOWN (& RIGHT) == a is (0,1) UP (& RIGHT) b is (2,2) UP (& RIGHT) ==
|
|
* b is (2,1) DOWN (& RIGHT)
|
|
*
|
|
* _| 0 1 2 3
|
|
* 0 a
|
|
* 1 b
|
|
* 2
|
|
* 3
|
|
*
|
|
*/
|
|
|
|
public:
|
|
virtual ~Renderer() = default;
|
|
|
|
void render(Context *ctx, std::list<std::unique_ptr<DrawCommand>> &commands);
|
|
void changeColorScheme(const std::unique_ptr<ColorScheme> &scheme);
|
|
};
|
|
|
|
} /* namespace gui */
|