Class: LiteRGSS::Tone

Inherits:
Object show all
Defined in:
LiteRGSS.rb.yard.rb

Overview

Class that describe tones (added/modified colors to the surface)

Direct Known Subclasses

Tone, Viewport::WithToneAndColors::Tone

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#blueInteger

Returns The blue component of the tone.

Returns:

  • (Integer)

    The blue component of the tone



95
96
97
# File 'LiteRGSS.rb.yard.rb', line 95

def blue
  @blue
end

#grayInteger

Returns The gray modifier of the tone (255 => grayscale).

Returns:

  • (Integer)

    The gray modifier of the tone (255 => grayscale)



97
98
99
# File 'LiteRGSS.rb.yard.rb', line 97

def gray
  @gray
end

#greenInteger

Returns The green component of the tone.

Returns:

  • (Integer)

    The green component of the tone



93
94
95
# File 'LiteRGSS.rb.yard.rb', line 93

def green
  @green
end

#redInteger

Returns The red component of the tone.

Returns:

  • (Integer)

    The red component of the tone



91
92
93
# File 'LiteRGSS.rb.yard.rb', line 91

def red
  @red
end

Class Method Details

.new(red, green, blue, gray = 0)

Create a new tone

Parameters:

  • red (Integer, nil)

    between -255 and 255

  • green (Integer, nil)

    between -255 and 255

  • blue (Integer, nil)

    between -255 and 255

  • gray (Integer, nil) (defaults to: 0)

    between 0 and 255



103
104
105
# File 'LiteRGSS.rb.yard.rb', line 103

def self.new(red, green, blue, gray = 0)

end

Instance Method Details

#inspectString

Convert the tone to a string that can be shown to the user

Returns:



122
123
124
# File 'LiteRGSS.rb.yard.rb', line 122

def inspect

end

#set(red, green = nil, blue = nil, gray = nil) ⇒ self

Set the tone parameters

Parameters:

  • red (Integer, nil)

    between -255 and 255

  • green (Integer, nil) (defaults to: nil)

    between -255 and 255

  • blue (Integer, nil) (defaults to: nil)

    between -255 and 255

  • gray (Integer, nil) (defaults to: nil)

    between 0 and 255

Returns:

  • (self)


112
113
114
# File 'LiteRGSS.rb.yard.rb', line 112

def set(red, green = nil, blue = nil, gray = nil)

end

#to_sString

Convert the tone to a string that can be shown to the user

Returns:



117
118
119
# File 'LiteRGSS.rb.yard.rb', line 117

def to_s

end