From 2cbec01126c34e70fc8e11d77553ef5bfd94cec7 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Fri, 18 May 2018 16:21:25 +1000 Subject: Added Choices, Pixmaps, GIFs, XPMs --- src/c_fl_pixmap.cpp | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 src/c_fl_pixmap.cpp (limited to 'src/c_fl_pixmap.cpp') diff --git a/src/c_fl_pixmap.cpp b/src/c_fl_pixmap.cpp new file mode 100644 index 0000000..18e6b5d --- /dev/null +++ b/src/c_fl_pixmap.cpp @@ -0,0 +1,44 @@ + + +#include +#include "c_fl_pixmap.h" + + + + +void free_fl_pixmap(PIXMAP b) { + delete reinterpret_cast(b); +} + +PIXMAP fl_pixmap_copy(PIXMAP b, int w, int h) { + return reinterpret_cast(b)->Fl_Pixmap::copy(w, h); +} + +PIXMAP fl_pixmap_copy2(PIXMAP b) { + return reinterpret_cast(b)->copy(); +} + + + + +void fl_pixmap_color_average(PIXMAP p, int c, float b) { + // virtual so disable dispatch + reinterpret_cast(p)->Fl_Pixmap::color_average(c, b); +} + +void fl_pixmap_desaturate(PIXMAP p) { + // virtual so disable dispatch + reinterpret_cast(p)->Fl_Pixmap::desaturate(); +} + + + + +void fl_pixmap_draw2(PIXMAP b, int x, int y) { + reinterpret_cast(b)->draw(x, y); +} + +void fl_pixmap_draw(PIXMAP b, int x, int y, int w, int h, int cx, int cy) { + reinterpret_cast(b)->Fl_Pixmap::draw(x, y, w, h, cx, cy); +} + -- cgit