1#ifndef OSDIMAGEBASEDWIDGET_HH
2#define OSDIMAGEBASEDWIDGET_HH
20 using namespace std::literals;
24 "-rgba"sv,
"-rgb"sv,
"-alpha"sv,
25 "-fadePeriod"sv,
"-fadeTarget"sv,
29 "-scrollPauseRight"sv,
36 [[nodiscard]] uint32_t
getRGBA(uint32_t corner)
const {
return rgba[corner]; }
37 [[nodiscard]] std::span<const uint32_t, 4>
getRGBA4()
const {
return rgba; }
41 [[nodiscard]] std::span<const std::string_view>
getProperties()
const override {
45 std::string_view name,
const TclObject& value)
override;
48 [[nodiscard]]
bool isVisible()
const override;
62 [[nodiscard]]
bool hasError()
const {
return error; }
67 void setRGBA(std::span<const uint32_t, 4> newRGBA);
68 [[nodiscard]]
bool isFading()
const;
69 [[nodiscard]]
float getCurrentFadeValue()
const;
70 [[nodiscard]]
float getCurrentFadeValue(uint64_t now)
const;
71 [[nodiscard]]
bool isAnimating()
const;
72 [[nodiscard]] std::optional<float> getScrollWidth()
const;
73 void updateCurrentFadeValue();
78 uint64_t startFadeTime = 0;
79 float fadePeriod = 0.0f;
80 float fadeTarget = 1.0f;
81 mutable float startFadeValue = 1.0f;
82 float scrollSpeed = 0.0f;
83 float scrollPauseLeft = 0.0f;
84 float scrollPauseRight = 0.0f;
85 uint64_t startScrollTime = 0;
86 std::array<uint32_t, 4> rgba;
Represents the output window/screen of openMSX.
A frame buffer where pixels can be written to.
This file implemented 3 utility functions:
constexpr auto concatArray(const std::array< T, X > &x, const std::array< T, Y > &y)