Class: GDAL::ColorEntry

Inherits:
Object
  • Object
show all
Includes:
GDAL::ColorEntryMixins::Extensions
Defined in:
lib/gdal/color_entry.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from GDAL::ColorEntryMixins::Extensions

#to_a

Constructor Details

#initialize(color_entry = nil) ⇒ ColorEntry

Returns a new instance of ColorEntry.

Parameters:



9
10
11
# File 'lib/gdal/color_entry.rb', line 9

def initialize(color_entry = nil)
  @c_struct = color_entry || FFI::GDAL::ColorEntry.new
end

Instance Attribute Details

#c_structFFI::GDAL::ColorEntry (readonly)



6
7
8
# File 'lib/gdal/color_entry.rb', line 6

def c_struct
  @c_struct
end

Instance Method Details

#c_pointerFFI::Pointer

Returns Pointer to the C struct.

Returns:

  • (FFI::Pointer)

    Pointer to the C struct.



14
15
16
# File 'lib/gdal/color_entry.rb', line 14

def c_pointer
  @c_struct.pointer
end

#color1Object



18
19
20
# File 'lib/gdal/color_entry.rb', line 18

def color1
  @c_struct[:c1]
end

#color1=(new_color) ⇒ Object



22
23
24
# File 'lib/gdal/color_entry.rb', line 22

def color1=(new_color)
  @c_struct[:c1] = new_color
end

#color2Object



26
27
28
# File 'lib/gdal/color_entry.rb', line 26

def color2
  @c_struct[:c2]
end

#color2=(new_color) ⇒ Object



30
31
32
# File 'lib/gdal/color_entry.rb', line 30

def color2=(new_color)
  @c_struct[:c2] = new_color
end

#color3Object



34
35
36
# File 'lib/gdal/color_entry.rb', line 34

def color3
  @c_struct[:c3]
end

#color3=(new_color) ⇒ Object



38
39
40
# File 'lib/gdal/color_entry.rb', line 38

def color3=(new_color)
  @c_struct[:c3] = new_color
end

#color4Object



42
43
44
# File 'lib/gdal/color_entry.rb', line 42

def color4
  @c_struct[:c4]
end

#color4=(new_color) ⇒ Object



46
47
48
# File 'lib/gdal/color_entry.rb', line 46

def color4=(new_color)
  @c_struct[:c4] = new_color
end