1.10
memoryscreen.h
1/*
2 * Copyright (C) 2018 Microchip Technology Inc. All rights reserved.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6#ifndef EGT_DETAIL_SCREEN_MEMORYSCREEN_H
7#define EGT_DETAIL_SCREEN_MEMORYSCREEN_H
8
14#include <egt/canvas.h>
15#include <egt/screen.h>
16#include <string>
17
18namespace egt
19{
20inline namespace v1
21{
22namespace detail
23{
24
28class MemoryScreen : public Screen
29{
30public:
31
32 explicit MemoryScreen(const Size& size = Size(800, 480));
33
34 void schedule_flip() override {}
35
36 virtual void save_to_file(const std::string& filename) const;
37
38protected:
40};
41
42}
43}
44}
45
46#endif
Manages a unique drawing surface and context.
Definition canvas.h:41
Manages one of more buffers that make up a Screen.
Definition screen.h:34
EGT_NODISCARD Size size() const
Size of the screen.
Definition screen.h:75
Screen in an in-memory buffer.
Definition memoryscreen.h:29
MemoryScreen(const Size &size=Size(800, 480))
virtual void save_to_file(const std::string &filename) const
void schedule_flip() override
Schedule a flip to occur later.
Definition memoryscreen.h:34
Canvas m_canvas
Definition memoryscreen.h:39
SizeType< DefaultDim, detail::Compatible::normal > Size
Helper type alias.
Definition geometry.h:573
EGT framework namespace.
Definition animation.h:24