Sha256: 52b08dea78fe03db98cd0da6c963c9b200c8c1881ec46ccd3f27a7ca0d3516d4

Contents?: true

Size: 950 Bytes

Versions: 9

Compression:

Stored size: 950 Bytes

Contents

# frozen_string_literal: true

require_relative 'color_entry_mixins/extensions'

module GDAL
  class ColorEntry
    include ColorEntryMixins::Extensions

    # @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::MemoryPointer] 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

9 entries across 9 versions & 1 rubygems

Version Path
ffi-gdal-1.0.0.beta16 lib/gdal/color_entry.rb
ffi-gdal-1.0.0.beta15 lib/gdal/color_entry.rb
ffi-gdal-1.0.0.beta14 lib/gdal/color_entry.rb
ffi-gdal-1.0.0.beta13 lib/gdal/color_entry.rb
ffi-gdal-1.0.0.beta12 lib/gdal/color_entry.rb
ffi-gdal-1.0.0.beta11 lib/gdal/color_entry.rb
ffi-gdal-1.0.0.beta10 lib/gdal/color_entry.rb
ffi-gdal-1.0.0.beta9 lib/gdal/color_entry.rb
ffi-gdal-1.0.0.beta8 lib/gdal/color_entry.rb