mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
20 lines
461 B
C++
20 lines
461 B
C++
#include "fltklcd.h"
|
|
#include <stdlib.h>
|
|
#include <FL/Fl_draw.H>
|
|
|
|
FltkLCD::FltkLCD(int x, int y, int w, int h, const char * label) :
|
|
Fl_Widget(x, y, w, h, label) {
|
|
m_framebuffer = malloc(w*h);
|
|
// FIXME: Delete the framebuffer!
|
|
}
|
|
|
|
void FltkLCD::draw() {
|
|
fl_draw_image_mono((const uchar *)m_framebuffer,
|
|
x(), // x
|
|
y(), // y
|
|
w(), // width
|
|
h(), // height,
|
|
1, // byte-delta between pixels
|
|
0); // byte-delta between lines;
|
|
}
|