summaryrefslogtreecommitdiff
path: root/src/c_fl_tiled_image.cpp
blob: 0fbea0f121b903b4b3d236f43cc35e1c5ccd4f98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64


//  Programmed by Jedidiah Barber
//  Released into the public domain


#include <FL/Fl_Tiled_Image.H>
#include <FL/Fl_Image.H>
#include "c_fl_tiled_image.h"




TILEDIMAGE new_fl_tiled_image(void * i, int w, int h) {
    Fl_Tiled_Image *t = new Fl_Tiled_Image(static_cast<Fl_Image*>(i), w, h);
    return t;
}

void free_fl_tiled_image(TILEDIMAGE t) {
    delete static_cast<Fl_Tiled_Image*>(t);
}

TILEDIMAGE fl_tiled_image_copy(TILEDIMAGE t, int w, int h) {
    //  virtual so disable dispatch
    return static_cast<Fl_Tiled_Image*>(t)->Fl_Tiled_Image::copy(w, h);
}

TILEDIMAGE fl_tiled_image_copy2(TILEDIMAGE t) {
    return static_cast<Fl_Tiled_Image*>(t)->copy();
}




void * fl_tiled_image_get_image(TILEDIMAGE t) {
    return static_cast<Fl_Tiled_Image*>(t)->image();
}




void fl_tiled_image_color_average(TILEDIMAGE t, int c, float b) {
    //  virtual so disable dispatch
    static_cast<Fl_Tiled_Image*>(t)->Fl_Tiled_Image::color_average(c, b);
}

void fl_tiled_image_desaturate(TILEDIMAGE t) {
    //  virtual so disable dispatch
    static_cast<Fl_Tiled_Image*>(t)->Fl_Tiled_Image::desaturate();
}




void fl_tiled_image_draw(TILEDIMAGE t, int x, int y) {
    static_cast<Fl_Tiled_Image*>(t)->draw(x, y);
}

void fl_tiled_image_draw2(TILEDIMAGE t, int x, int y, int w, int h, int cx, int cy) {
    //  virtual so disable dispatch
    static_cast<Fl_Tiled_Image*>(t)->Fl_Tiled_Image::draw(x, y, w, h, cx, cy);
}