Files
Upsilon/apps/shared/round_cursor_view.h
Léa Saviot e67160b878 [apps/graph] Faster cursor scrolling on device
This commit is quite dirty but works well
2019-09-09 16:56:32 +02:00

25 lines
671 B
C++

#ifndef SHARED_ROUND_CURSOR_VIEW_H
#define SHARED_ROUND_CURSOR_VIEW_H
#include "cursor_view.h"
namespace Shared {
class RoundCursorView : public CursorView {
public:
RoundCursorView(KDColor color = KDColorBlack) : m_color(color), m_underneathPixelBufferLoaded(false) {}
void drawRect(KDContext * ctx, KDRect rect) const override;
KDSize minimalSizeForOptimalDisplay() const override;
void setColor(KDColor color);
void setCursorFrame(KDRect frame) override;
private:
constexpr static int k_cursorSize = 10;
mutable KDColor m_underneathPixelBuffer[k_cursorSize*k_cursorSize];
KDColor m_color;
mutable bool m_underneathPixelBufferLoaded;
};
}
#endif