In Files

Parent

Imlib2::Color::CmyaColor

Public Class Methods

new(*args) click to toggle source

Returns a new Imlib2::Color::CmyaColor.

Examples:

c, m, y, a = 255, 0, 0, 255
border = Imlib2::Color::CmyaColor.new c, m, y, a

values = [255, 0, 0, 255]
border = Imlib2::Color::CmyaColor.new values
VALUE cmya_color_new(int argc, VALUE *argv, VALUE klass) {
  CmyaColor *color;
  VALUE c_o;
  
  color = malloc(sizeof(CmyaColor));
  memset(color, 0, sizeof(CmyaColor));

  c_o = Data_Wrap_Struct(klass, 0, free, color);
  rb_obj_call_init(c_o, argc, argv);

  return c_o;
}

Public Instance Methods

a() click to toggle source

Get the alpha element of a CmyaColor object.

Examples:

amount = color.alpha
amount = color.a
static VALUE cmya_color_alpha(VALUE self) {
  CmyaColor *b;
  Data_Get_Struct(self, CmyaColor, b);
  return INT2FIX(b->alpha);
}
a=(p1) click to toggle source

Set the alpha element of a CmyaColor object.

Examples:

color.alpha = 255
color.a = 255
static VALUE cmya_color_set_alpha(VALUE self, VALUE val) {
  CmyaColor *b;
  Data_Get_Struct(self, CmyaColor, b);
  b->alpha = NUM2INT(val);
  return val;
}
alpha() click to toggle source

Get the alpha element of a CmyaColor object.

Examples:

amount = color.alpha
amount = color.a
static VALUE cmya_color_alpha(VALUE self) {
  CmyaColor *b;
  Data_Get_Struct(self, CmyaColor, b);
  return INT2FIX(b->alpha);
}
alpha=(p1) click to toggle source

Set the alpha element of a CmyaColor object.

Examples:

color.alpha = 255
color.a = 255
static VALUE cmya_color_set_alpha(VALUE self, VALUE val) {
  CmyaColor *b;
  Data_Get_Struct(self, CmyaColor, b);
  b->alpha = NUM2INT(val);
  return val;
}
c() click to toggle source

Get the cyan element of a CmyaColor object.

Examples:

amount = color.cyan
amount = color.c
static VALUE cmya_color_cyan(VALUE self) {
  CmyaColor *b;
  Data_Get_Struct(self, CmyaColor, b);
  return INT2FIX(b->cyan);
}
c=(p1) click to toggle source

Set the cyan element of a CmyaColor object.

Examples:

color.cyan = 255
color.c = 255
static VALUE cmya_color_set_cyan(VALUE self, VALUE val) {
  CmyaColor *b;
  Data_Get_Struct(self, CmyaColor, b);
  b->cyan = NUM2INT(val);
  return val;
}
cyan() click to toggle source

Get the cyan element of a CmyaColor object.

Examples:

amount = color.cyan
amount = color.c
static VALUE cmya_color_cyan(VALUE self) {
  CmyaColor *b;
  Data_Get_Struct(self, CmyaColor, b);
  return INT2FIX(b->cyan);
}
cyan=(p1) click to toggle source

Set the cyan element of a CmyaColor object.

Examples:

color.cyan = 255
color.c = 255
static VALUE cmya_color_set_cyan(VALUE self, VALUE val) {
  CmyaColor *b;
  Data_Get_Struct(self, CmyaColor, b);
  b->cyan = NUM2INT(val);
  return val;
}
m() click to toggle source

Get the magenta element of a CmyaColor object.

Examples:

amount = color.magenta
amount = color.m
static VALUE cmya_color_magenta(VALUE self) {
  CmyaColor *b;
  Data_Get_Struct(self, CmyaColor, b);
  return INT2FIX(b->magenta);
}
m=(p1) click to toggle source

Set the magenta element of a CmyaColor object.

Examples:

color.magenta = 255
color.m = 255
static VALUE cmya_color_set_magenta(VALUE self, VALUE val) {
  CmyaColor *b;
  Data_Get_Struct(self, CmyaColor, b);
  b->magenta = NUM2INT(val);
  return val;
}
magenta() click to toggle source

Get the magenta element of a CmyaColor object.

Examples:

amount = color.magenta
amount = color.m
static VALUE cmya_color_magenta(VALUE self) {
  CmyaColor *b;
  Data_Get_Struct(self, CmyaColor, b);
  return INT2FIX(b->magenta);
}
magenta=(p1) click to toggle source

Set the magenta element of a CmyaColor object.

Examples:

color.magenta = 255
color.m = 255
static VALUE cmya_color_set_magenta(VALUE self, VALUE val) {
  CmyaColor *b;
  Data_Get_Struct(self, CmyaColor, b);
  b->magenta = NUM2INT(val);
  return val;
}
y() click to toggle source

Get the yellow element of a CmyaColor object.

Examples:

amount = color.yellow
amount = color.y
static VALUE cmya_color_yellow(VALUE self) {
  CmyaColor *b;
  Data_Get_Struct(self, CmyaColor, b);
  return INT2FIX(b->yellow);
}
y=(p1) click to toggle source

Set the yellow element of a CmyaColor object.

Examples:

color.yellow = 255
color.y = 255
static VALUE cmya_color_set_yellow(VALUE self, VALUE val) {
  CmyaColor *b;
  Data_Get_Struct(self, CmyaColor, b);
  b->yellow = NUM2INT(val);
  return val;
}
yellow() click to toggle source

Get the yellow element of a CmyaColor object.

Examples:

amount = color.yellow
amount = color.y
static VALUE cmya_color_yellow(VALUE self) {
  CmyaColor *b;
  Data_Get_Struct(self, CmyaColor, b);
  return INT2FIX(b->yellow);
}
yellow=(p1) click to toggle source

Set the yellow element of a CmyaColor object.

Examples:

color.yellow = 255
color.y = 255
static VALUE cmya_color_set_yellow(VALUE self, VALUE val) {
  CmyaColor *b;
  Data_Get_Struct(self, CmyaColor, b);
  b->yellow = NUM2INT(val);
  return val;
}

[Validate]

Generated with the Darkfish Rdoc Generator 2.