In Files

Parent

Imlib2::Border

Public Class Methods

new(*args) click to toggle source

Returns a new Imlib2::Border object.

Examples:

left, top, right, bottom = 10, 10, 20, 20
border = Imlib2::Border.new left, top, right, bottom

values = [10, 10, 20, 20]
border = Imlib2::Border.new values

edges = {
  'left'   => 10,
  'right'  => 20,
  'top'    => 10,
  'bottom' => 20,
}
border = Imlib2::Border.new edges
VALUE border_new(int argc, VALUE *argv, VALUE klass) {
  Imlib_Border *border;
  VALUE b_o;
  
  border = malloc(sizeof(Imlib_Border));
  memset(border, 0, sizeof(Imlib_Border));

  b_o = Data_Wrap_Struct(klass, 0, free, border);
  rb_obj_call_init(b_o, argc, argv);

  return b_o;
}

Public Instance Methods

b() click to toggle source
Alias for: bottom
b=(p1) click to toggle source
Alias for: bottom=
bottom() click to toggle source

Get the bottom height (in pixels) of a border.

Examples:

edge = border.bottom
edge = border.b
static VALUE border_bottom(VALUE self) {
  Imlib_Border *b;
  Data_Get_Struct(self, Imlib_Border, b);
  return INT2FIX(b->bottom);
}
Also aliased as: b
bottom=(p1) click to toggle source

Set the bottom height (in pixels) of a border.

Examples:

border.bottom = 10
border.b = 10
static VALUE border_set_bottom(VALUE self, VALUE val) {
  Imlib_Border *b;
  Data_Get_Struct(self, Imlib_Border, b);
  b->bottom = NUM2INT(val);
  return val;
}
Also aliased as: b=
l() click to toggle source
Alias for: left
l=(p1) click to toggle source
Alias for: left=
left() click to toggle source

Get the left width (in pixels) of a border.

Examples:

edge = border.left
edge = border.l
static VALUE border_left(VALUE self) {
  Imlib_Border *b;
  Data_Get_Struct(self, Imlib_Border, b);
  return INT2FIX(b->left);
}
Also aliased as: l
left=(p1) click to toggle source

Set the left width (in pixels) of a border.

Examples:

border.left = 10
border.l = 10
static VALUE border_set_left(VALUE self, VALUE val) {
  Imlib_Border *b;
  Data_Get_Struct(self, Imlib_Border, b);
  b->left = NUM2INT(val);
  return val;
}
Also aliased as: l=
r() click to toggle source
Alias for: right
r=(p1) click to toggle source
Alias for: right=
right() click to toggle source

Get the right width (in pixels) of a border.

Examples:

edge = border.right
edge = border.r
static VALUE border_right(VALUE self) {
  Imlib_Border *b;
  Data_Get_Struct(self, Imlib_Border, b);
  return INT2FIX(b->right);
}
Also aliased as: r
right=(p1) click to toggle source

Set the right width (in pixels) of a border.

Examples:

border.right = 10
border.r = 10
static VALUE border_set_right(VALUE self, VALUE val) {
  Imlib_Border *b;
  Data_Get_Struct(self, Imlib_Border, b);
  b->right = NUM2INT(val);
  return val;
}
Also aliased as: r=
t() click to toggle source
Alias for: top
t=(p1) click to toggle source
Alias for: top=
top() click to toggle source

Get the top height (in pixels) of a border.

Examples:

edge = border.top
edge = border.t
static VALUE border_top(VALUE self) {
  Imlib_Border *b;
  Data_Get_Struct(self, Imlib_Border, b);
  return INT2FIX(b->top);
}
Also aliased as: t
top=(p1) click to toggle source

Set the top height (in pixels) of a border.

Examples:

border.top = 10
border.t = 10
static VALUE border_set_top(VALUE self, VALUE val) {
  Imlib_Border *b;
  Data_Get_Struct(self, Imlib_Border, b);
  b->top = NUM2INT(val);
  return val;
}
Also aliased as: t=

[Validate]

Generated with the Darkfish Rdoc Generator 2.