Module: ILU

Included in:
Devil
Defined in:
ext/devil/ruby_ilu.c

Constant Summary collapse

FILTER =

constants added by banisterfiend

INT2NUM(ILU_FILTER)
NEAREST =
INT2NUM(ILU_NEAREST)
LINEAR =
INT2NUM(ILU_LINEAR)
BILINEAR =
INT2NUM(ILU_BILINEAR)
SCALE_BOX =
INT2NUM(ILU_SCALE_BOX)
SCALE_TRIANGLE =
INT2NUM(ILU_SCALE_TRIANGLE)
SCALE_BELL =
INT2NUM(ILU_SCALE_BELL)
SCALE_BSPLINE =
INT2NUM(ILU_SCALE_BSPLINE)
SCALE_LANCZOS3 =
INT2NUM(ILU_SCALE_LANCZOS3)
SCALE_MITCHELL =
INT2NUM(ILU_SCALE_MITCHELL)
PLACEMENT =
INT2NUM(ILU_PLACEMENT)
UPPER_LEFT =
INT2NUM(ILU_UPPER_LEFT)
LOWER_LEFT =
INT2NUM(ILU_LOWER_LEFT)
LOWER_RIGHT =
INT2NUM(ILU_LOWER_RIGHT)
UPPER_RIGHT =
INT2NUM(ILU_UPPER_RIGHT)
CENTER =
INT2NUM(ILU_CENTER)

Class Method Summary collapse

Class Method Details

.AlienifyObject



18
19
20
21
# File 'ext/devil/ruby_ilu.c', line 18

static VALUE ilu_Alienify(VALUE obj) {
    ILboolean flag = iluAlienify();
    return flag ? Qtrue : Qfalse;
}

.BlurAvg(rb_iter) ⇒ Object



23
24
25
26
27
# File 'ext/devil/ruby_ilu.c', line 23

static VALUE ilu_BlurAvg(VALUE obj, VALUE rb_iter) {
    ILuint iter = NUM2INT(rb_iter);
    ILboolean flag = iluBlurAvg(iter);
    return flag ? Qtrue : Qfalse;
}

.BlurGaussian(rb_iter) ⇒ Object



29
30
31
32
33
# File 'ext/devil/ruby_ilu.c', line 29

static VALUE ilu_BlurGaussian(VALUE obj, VALUE rb_iter) {
    ILuint iter = NUM2INT(rb_iter);
    ILboolean flag = iluBlurGaussian(iter);
    return flag ? Qtrue : Qfalse;
}

.BuildMipmapsObject



87
88
89
90
# File 'ext/devil/ruby_ilu.c', line 87

static VALUE ilu_BuildMipmaps(VALUE obj) {
    ILboolean flag = iluBuildMipmaps();
    return flag ? Qtrue : Qfalse;
}

.CompareImage(rb_cmp_img) ⇒ Object



166
167
168
169
170
171
172
173
# File 'ext/devil/ruby_ilu.c', line 166

static VALUE ilu_CompareImage(VALUE obj, VALUE rb_cmp_img)
{
    ILuint cmp_img = NUM2INT(rb_cmp_img);
    
    ILboolean flag = iluCompareImage(rb_cmp_img);

    return flag ? Qtrue : Qfalse;
}

.Contrast(rb_cont) ⇒ Object



35
36
37
38
39
# File 'ext/devil/ruby_ilu.c', line 35

static VALUE ilu_Contrast(VALUE obj, VALUE rb_cont) {
    ILfloat cont = NUM2DBL(rb_cont);
    ILboolean flag = iluContrast(cont);
    return flag ? Qtrue : Qfalse;
}

.Crop(rb_XOff, rb_YOff, rb_ZOff, rb_width, rb_height, rb_depth) ⇒ Object



106
107
108
109
110
111
112
113
114
115
116
117
118
# File 'ext/devil/ruby_ilu.c', line 106

static VALUE ilu_Crop(VALUE obj, VALUE rb_XOff, VALUE rb_YOff, VALUE rb_ZOff, VALUE rb_width, VALUE rb_height, VALUE rb_depth)
{
    ILuint XOff = NUM2INT(rb_XOff);
    ILuint YOff = NUM2INT(rb_YOff);
    ILuint ZOff = NUM2INT(rb_ZOff);
    ILuint width = NUM2INT(rb_width);
    ILuint height = NUM2INT(rb_height);
    ILuint depth = NUM2INT(rb_depth);
                       	
    ILboolean flag = iluCrop(XOff, YOff, ZOff, width, height, depth);

    return flag ? Qtrue : Qfalse;
}

.EdgeDetectPObject



131
132
133
134
135
136
# File 'ext/devil/ruby_ilu.c', line 131

static VALUE ilu_EdgeDetectP(VALUE obj)
{
    ILboolean flag = iluEdgeDetectP();

    return flag ? Qtrue : Qfalse;    
}

.EdgeDetectSObject



138
139
140
141
142
143
# File 'ext/devil/ruby_ilu.c', line 138

static VALUE ilu_EdgeDetectS(VALUE obj)
{
    ILboolean flag = iluEdgeDetectS();

    return flag ? Qtrue : Qfalse;    
}

.EmbossObject



145
146
147
148
149
150
# File 'ext/devil/ruby_ilu.c', line 145

static VALUE ilu_Emboss(VALUE obj)
{
    ILboolean flag = iluEmboss();

    return flag ? Qtrue : Qfalse;    
}

.EnlargeCanvas(rb_width, rb_height, rb_depth) ⇒ Object



120
121
122
123
124
125
126
127
128
129
# File 'ext/devil/ruby_ilu.c', line 120

static VALUE ilu_EnlargeCanvas(VALUE obj, VALUE rb_width, VALUE rb_height, VALUE rb_depth)
{
    ILuint width = NUM2INT(rb_width);
    ILuint height = NUM2INT(rb_height);
    ILuint depth = NUM2INT(rb_depth);

    ILboolean flag = iluEnlargeCanvas(width, height, depth);

    return flag ? Qtrue : Qfalse;
}

.EqualizeObject



41
42
43
44
# File 'ext/devil/ruby_ilu.c', line 41

static VALUE ilu_Equalize(VALUE obj) {
    ILboolean flag = iluEqualize();
    return flag ? Qtrue : Qfalse;
}

.ErrorString(rb_error) ⇒ Object



12
13
14
15
16
# File 'ext/devil/ruby_ilu.c', line 12

static VALUE ilu_ErrorString(VALUE obj, VALUE rb_error) {
    ILenum num = NUM2INT(rb_error);
    const char* error = iluErrorString(num);
    return rb_str_new2(error);
}

.FlipImageObject

functions added by banisterfiend



93
94
95
96
# File 'ext/devil/ruby_ilu.c', line 93

static VALUE ilu_FlipImage(VALUE obj) {
    ILboolean flag = iluFlipImage();
    return flag ? Qtrue : Qfalse;
}

.GammaCorrectObject



46
47
48
49
50
# File 'ext/devil/ruby_ilu.c', line 46

static VALUE ilu_GammaCorrect (VALUE obj, VALUE rb_gamma) {
    ILfloat gamma = NUM2DBL(rb_gamma);
    ILboolean flag = iluGammaCorrect(gamma);
    return flag ? Qtrue : Qfalse;
}

.ImageParameter(rb_PName, rb_Param) ⇒ Object



80
81
82
83
84
85
# File 'ext/devil/ruby_ilu.c', line 80

static VALUE ilu_ImageParameter(VALUE obj, VALUE rb_PName, VALUE rb_Param) {
    ILenum PName = NUM2INT(rb_PName);
    ILenum Param = NUM2INT(rb_Param);
    iluImageParameter(PName, Param);
    return Qnil;
}

.InitObject



7
8
9
10
# File 'ext/devil/ruby_ilu.c', line 7

static VALUE ilu_Init(VALUE obj) {
    iluInit();
    return Qnil;
}

.MirrorObject



152
153
154
155
156
157
# File 'ext/devil/ruby_ilu.c', line 152

static VALUE ilu_Mirror(VALUE obj)
{
    ILboolean flag = iluMirror();

    return flag ? Qtrue : Qfalse;    
}

.NegativeObject



51
52
53
54
# File 'ext/devil/ruby_ilu.c', line 51

static VALUE ilu_Negative (VALUE obj) {
    ILboolean flag = iluNegative();
    return flag ? Qtrue : Qfalse;
}

.NoisifyObject



55
56
57
58
59
# File 'ext/devil/ruby_ilu.c', line 55

static VALUE ilu_Noisify (VALUE obj, VALUE rb_tolerance) {
    ILclampf tolerance = NUM2DBL(rb_tolerance);
    ILboolean flag = iluNoisify(tolerance);
    return flag ? Qtrue : Qfalse;
}

.PixelizeObject



60
61
62
63
64
# File 'ext/devil/ruby_ilu.c', line 60

static VALUE ilu_Pixelize (VALUE obj, VALUE rb_pix_size) {
    ILuint pix = NUM2INT(rb_pix_size);
    ILboolean flag = iluPixelize(pix);
    return flag ? Qtrue : Qfalse;
}

.Rotate(rb_angle) ⇒ Object



98
99
100
101
102
103
104
# File 'ext/devil/ruby_ilu.c', line 98

static VALUE ilu_Rotate(VALUE obj, VALUE rb_angle) {
    ILfloat angle = NUM2DBL(rb_angle);

    ILboolean flag = iluRotate(angle);

    return flag ? Qtrue : Qfalse;
}

.Scale(rb_Width, rb_Height, rb_Depth) ⇒ Object



72
73
74
75
76
77
78
# File 'ext/devil/ruby_ilu.c', line 72

static VALUE ilu_Scale(VALUE obj, VALUE rb_Width, VALUE rb_Height, VALUE rb_Depth) {
    ILuint Width = NUM2INT(rb_Width);
    ILuint Height = NUM2INT(rb_Height);
    ILuint Depth = NUM2INT(rb_Depth);
    ILboolean flag = iluScale(Width, Height, Depth);
    return flag ? Qtrue : Qfalse;
}

.SharpenObject



65
66
67
68
69
70
# File 'ext/devil/ruby_ilu.c', line 65

static VALUE ilu_Sharpen (VALUE obj, VALUE rb_factor, VALUE rb_iter) {
    ILfloat factor = NUM2DBL(rb_factor);
    ILuint iter = NUM2INT(rb_iter);
    ILboolean flag = iluSharpen(factor, iter);
    return flag ? Qtrue : Qfalse;
}

.SwapColoursObject



159
160
161
162
163
164
# File 'ext/devil/ruby_ilu.c', line 159

static VALUE ilu_SwapColours(VALUE obj)
{
    ILboolean flag = iluSwapColours();

    return flag ? Qtrue : Qfalse;    
}