Class: Cute::Pixel

Inherits:
Object
  • Object
show all
Defined in:
docstub/color.rb

Instance Method Summary collapse

Constructor Details

#initializePixel

Returns a new instance of Pixel.

Parameters:

  • r (Integer)

    Red component (0 to 255), defaults to 0

  • g (Integer)

    Green component (0 to 255), defaults to 0

  • b (Integer)

    Blue component (0 to 255), defaults to 0

  • a (Integer)

    Alpha component (0 to 255), defaults to 255



117
118
# File 'docstub/color.rb', line 117

def initialize(r = 0, g = 0, b = 0, a = 255)
end

Instance Method Details

#aInteger

Returns Alpha component value (0 to 255).

Returns:

  • (Integer)

    Alpha component value (0 to 255)



162
163
# File 'docstub/color.rb', line 162

def a
end

#a=Integer

Returns The new value.

Parameters:

  • value (Integer)

    New alpha component value (0 to 255)

Returns:

  • (Integer)

    The new value



169
170
# File 'docstub/color.rb', line 169

def a=(value)
end

#bInteger

Returns Blue component value (0 to 255).

Returns:

  • (Integer)

    Blue component value (0 to 255)



149
150
# File 'docstub/color.rb', line 149

def b
end

#b=Integer

Returns The new value.

Parameters:

  • value (Integer)

    New blue component value (0 to 255)

Returns:

  • (Integer)

    The new value



156
157
# File 'docstub/color.rb', line 156

def b=(value)
end

#gInteger

Returns Green component value (0 to 255).

Returns:

  • (Integer)

    Green component value (0 to 255)



136
137
# File 'docstub/color.rb', line 136

def g
end

#g=Integer

Returns The new value.

Parameters:

  • value (Integer)

    New green component value (0 to 255)

Returns:

  • (Integer)

    The new value



143
144
# File 'docstub/color.rb', line 143

def g=(value)
end

#inspectString

Returns Detailed string representation.

Returns:

  • (String)

    Detailed string representation



181
182
# File 'docstub/color.rb', line 181

def inspect
end

#rInteger

Returns Red component value (0 to 255).

Returns:

  • (Integer)

    Red component value (0 to 255)



123
124
# File 'docstub/color.rb', line 123

def r
end

#r=Integer

Returns The new value.

Parameters:

  • value (Integer)

    New red component value (0 to 255)

Returns:

  • (Integer)

    The new value



130
131
# File 'docstub/color.rb', line 130

def r=(value)
end

#to_colorColor

Returns A new Color instance with equivalent color values.

Returns:

  • (Color)

    A new Color instance with equivalent color values



187
188
# File 'docstub/color.rb', line 187

def to_color
end

#to_sString

Returns String representation.

Returns:

  • (String)

    String representation



175
176
# File 'docstub/color.rb', line 175

def to_s
end