Sha256: 60cd60a3d7e6f273a7533cc1ebb6ea9142e34e0e9cf9b07c0173c5cde7eac559

Contents?: true

Size: 852 Bytes

Versions: 6

Compression:

Stored size: 852 Bytes

Contents

# frozen_string_literal: true

module GDAL
  class ColorEntry
    # @return [FFI::GDAL::ColorEntry]
    attr_reader :c_struct

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

    # @return [FFI::Pointer] Pointer to the C struct.
    def c_pointer
      @c_struct.pointer
    end

    def color1
      @c_struct[:c1]
    end

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

    def color2
      @c_struct[:c2]
    end

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

    def color3
      @c_struct[:c3]
    end

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

    def color4
      @c_struct[:c4]
    end

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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ffi-gdal-1.1.0 lib/gdal/color_entry.rb
ffi-gdal-1.0.4 lib/gdal/color_entry.rb
ffi-gdal-1.0.3 lib/gdal/color_entry.rb
ffi-gdal-1.0.2 lib/gdal/color_entry.rb
ffi-gdal-1.0.1 lib/gdal/color_entry.rb
ffi-gdal-1.0.0 lib/gdal/color_entry.rb