Imlib2::Color::RgbaColor (Class)

In: imlib2.c  (CVS)
Parent: Object

Methods

[]   []=   a   a=   alpha   alpha=   b   b=   blue   blue=   g   g=   green   green=   new   new   r   r=   red   red=  

Public Class methods

Imlib2::Color::RgbaColor constructor.

Parameters are identical to Imlib2::Color::RgbaColor::new.

Returns a new Imlib2::Color::RgbaColor.

Examples:

  r, g, b, a = 255, 0, 0, 255
  border = Imlib2::Color::RgbaColor.new r, g, b, a

  values = [255, 0, 0, 255]
  border = Imlib2::Color::RgbaColor.new values

Public Instance methods

[]()
[]=(p1, p2)

Get the alpha element of a RgbaColor object.

Examples:

  amount = color.alpha
  amount = color.a

Set the alpha element of a RgbaColor object.

Examples:

  color.alpha = 255
  color.a = 255

Get the alpha element of a RgbaColor object.

Examples:

  amount = color.alpha
  amount = color.a

Set the alpha element of a RgbaColor object.

Examples:

  color.alpha = 255
  color.a = 255

Get the blue element of a RgbaColor object.

Examples:

  amount = color.blue
  amount = color.b

Set the blue element of a RgbaColor object.

Examples:

  color.blue = 255
  color.b = 255

Get the blue element of a RgbaColor object.

Examples:

  amount = color.blue
  amount = color.b

Set the blue element of a RgbaColor object.

Examples:

  color.blue = 255
  color.b = 255

Get the green element of a RgbaColor object.

Examples:

  amount = color.green
  amount = color.g

Set the green element of a RgbaColor object.

Examples:

  color.green = 255
  color.g = 255

Get the green element of a RgbaColor object.

Examples:

  amount = color.green
  amount = color.g

Set the green element of a RgbaColor object.

Examples:

  color.green = 255
  color.g = 255

Get the red element of a RgbaColor object.

Examples:

  amount = color.red
  amount = color.r

Set the red element of a RgbaColor object.

Examples:

  color.red = 255
  color.r = 255

Get the red element of a RgbaColor object.

Examples:

  amount = color.red
  amount = color.r

Set the red element of a RgbaColor object.

Examples:

  color.red = 255
  color.r = 255

[Validate]