class Fox::FXMemoryBuffer
This class is deprecated. Use FXImage methods instead.
Public Class Methods
Source
SWIGINTERN VALUE
_wrap_new_FXMemoryBuffer(int argc, VALUE *argv, VALUE self) {
FXColor *arg1 = (FXColor *) 0 ;
FXint arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
FXMemoryBuffer *result = 0 ;
if ((argc < 2) || (argc > 2)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_unsigned_int, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXColor *","FXMemoryBuffer", 1, argv[0] ));
}
arg1 = reinterpret_cast< FXColor * >(argp1);
arg2 = NUM2INT(argv[1]);
result = (FXMemoryBuffer *)new FXMemoryBuffer(arg1,arg2);
DATA_PTR(self) = result;
return self;
fail:
return Qnil;
}
Source
# File rdoc-sources/FXMemoryBuffer.rb, line 13 def initialize(data); end
Return a new FXMemoryBuffer instance, initialized with the provided array of FXColor values.
Parameters:¶ ↑
data-
the initial array of
FXColorvalues.
Public Instance Methods
Source
SWIGINTERN VALUE
_wrap_FXMemoryBuffer___getitem__(int argc, VALUE *argv, VALUE self) {
FXMemoryBuffer *arg1 = (FXMemoryBuffer *) 0 ;
FXuint arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
FXColor result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXMemoryBuffer, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXMemoryBuffer const *","__getitem__", 1, self ));
}
arg1 = reinterpret_cast< FXMemoryBuffer * >(argp1);
arg2 = NUM2UINT(argv[0]);
result = (FXColor)FXMemoryBuffer___getitem__((FXMemoryBuffer const *)arg1,arg2);
vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
return vresult;
fail:
return Qnil;
}
Element accessor/slicing.
Source
SWIGINTERN VALUE
_wrap_FXMemoryBuffer___setitem__(int argc, VALUE *argv, VALUE self) {
FXMemoryBuffer *arg1 = (FXMemoryBuffer *) 0 ;
FXuint arg2 ;
FXColor arg3 ;
void *argp1 = 0 ;
int res1 = 0 ;
FXColor result;
VALUE vresult = Qnil;
if ((argc < 2) || (argc > 2)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXMemoryBuffer, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXMemoryBuffer *","__setitem__", 1, self ));
}
arg1 = reinterpret_cast< FXMemoryBuffer * >(argp1);
arg2 = NUM2UINT(argv[0]);
arg3 = to_FXColor(argv[1]);
result = (FXColor)FXMemoryBuffer___setitem__(arg1,arg2,arg3);
vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
return vresult;
fail:
return Qnil;
}
Element setter/slicing.
Source
SWIGINTERN VALUE
_wrap_FXMemoryBuffer_getData(int argc, VALUE *argv, VALUE self) {
FXMemoryBuffer *arg1 = (FXMemoryBuffer *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
VALUE result;
VALUE vresult = Qnil;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXMemoryBuffer, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXMemoryBuffer const *","getData", 1, self ));
}
arg1 = reinterpret_cast< FXMemoryBuffer * >(argp1);
result = (VALUE)FXMemoryBuffer_getData((FXMemoryBuffer const *)arg1);
vresult = result;
return vresult;
fail:
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXMemoryBuffer_getSize(int argc, VALUE *argv, VALUE self) {
FXMemoryBuffer *arg1 = (FXMemoryBuffer *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
FXuint result;
VALUE vresult = Qnil;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXMemoryBuffer, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXMemoryBuffer const *","getSize", 1, self ));
}
arg1 = reinterpret_cast< FXMemoryBuffer * >(argp1);
result = (FXuint)((FXMemoryBuffer const *)arg1)->getSize();
vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
return vresult;
fail:
return Qnil;
}
Also aliased as: size