From 25177cb4765a03da7fab10c500097910e13924e6 Mon Sep 17 00:00:00 2001 From: anbr <vdr07@deltab.de> Date: Sun, 31 Oct 2010 10:19:39 +0100 Subject: Support spectrum analyzer visualization (need span-plugin) --- vfd.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'vfd.c') diff --git a/vfd.c b/vfd.c index c23f871..7f0162b 100644 --- a/vfd.c +++ b/vfd.c @@ -439,6 +439,42 @@ int cVFD::DrawText(int x, int y, const char* string) return -1; } +/** + * Height of framebuffer from current device. + */ +int cVFD::Height() const +{ + if(framebuf) + return framebuf->Height(); + return 0; +} + +/** + * Width of framebuffer from current device. + */ +int cVFD::Width() const +{ + if(framebuf) + return framebuf->Width(); + return 0; +} + +/** + * Draw a rectangle on framebuffer on device. + * + * \param x1 First horizontal corner (column). + * \param y1 First vertical corner (row). + * \param x2 Second horizontal corner (column). + * \param y2 Second vertical corner (row). + * \param filled drawing of rectangle should be filled. + */ +bool cVFD::Rectangle(int x1, int y1, int x2, int y2, bool filled) +{ + if(framebuf) + return framebuf->Rectangle(x1, y1, x2, y2, filled); + return false; +} + /** * Sets the "icons state" for the device. We use this to control the icons -- cgit v1.2.3