Module: ILU

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

Constant Summary

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

+ (Object) Alienify



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;
}

+ (Object) BlurAvg



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;
}

+ (Object) BlurGaussian



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;
}

+ (Object) BuildMipmaps



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;
}

+ (Object) CompareImage



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;
}

+ (Object) Crop



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;
}

+ (Object) EdgeDetectP



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;    
}

+ (Object) EdgeDetectS



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;    
}

+ (Object) Emboss



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;    
}

+ (Object) EnlargeCanvas



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;
}

+ (Object) ErrorString



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);
}

+ (Object) FlipImage

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;
}

+ (Object) Init



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

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

+ (Object) Mirror



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;    
}

+ (Object) Rotate



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;
}

+ (Object) Sharpen



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;
}

+ (Object) SwapColours



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;    
}