Module: Wx::Image::Histogram

Defined in:
lib/wx/doc/image.rb

Instance Method Summary collapse

Instance Method Details

#find_first_unused_colour(r = 1, g = 0, b = 0) ⇒ Array(Integer,Integer,Integer)?

Find first colour that is not used in the image and has higher RGB values than RGB(r, g, b)

Parameters:

  • r (Integer) (defaults to: 1)

    Red value

  • g (Integer) (defaults to: 0)

    Green value

  • b (Integer) (defaults to: 0)

    Blue value

Returns:

  • (Array(Integer,Integer,Integer), nil)

    RGB values of first unused colour or nil if none found



42
# File 'lib/wx/doc/image.rb', line 42

def find_first_unused_colour(r=1, g=0, b=0) end

#make_key(r, g, b) ⇒ Integer

Calculate an image histogram key from given RGB values.

Parameters:

  • r (Integer)

    Red value

  • g (Integer)

    Green value

  • b (Integer)

    Blue value

Returns:

  • (Integer)

    key value



35
# File 'lib/wx/doc/image.rb', line 35

def make_key(r,g,b) end