/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 1.3.25 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ using System; using System.Runtime.InteropServices; public class ColorTable : IDisposable { private HandleRef swigCPtr; protected bool swigCMemOwn; internal ColorTable(IntPtr cPtr, bool cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = new HandleRef(this, cPtr); } internal static HandleRef getCPtr(ColorTable obj) { return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; } ~ColorTable() { Dispose(); } public virtual void Dispose() { if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { swigCMemOwn = false; gdalPINVOKE.delete_ColorTable(swigCPtr); } swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } public ColorTable(int arg0) : this(gdalPINVOKE.new_ColorTable(arg0), true) { } public ColorTable Clone() { IntPtr cPtr = gdalPINVOKE.ColorTable_Clone(swigCPtr); ColorTable ret = (cPtr == IntPtr.Zero) ? null : new ColorTable(cPtr, false); return ret; } public int GetPaletteInterpretation() { int ret = gdalPINVOKE.ColorTable_GetPaletteInterpretation(swigCPtr); return ret; } public int GetCount() { int ret = gdalPINVOKE.ColorTable_GetCount(swigCPtr); return ret; } public SWIGTYPE_p_GDALColorEntry GetColorEntry(int arg0) { IntPtr cPtr = gdalPINVOKE.ColorTable_GetColorEntry(swigCPtr, arg0); SWIGTYPE_p_GDALColorEntry ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_GDALColorEntry(cPtr, false); return ret; } public int GetColorEntryAsRGB(int arg0, SWIGTYPE_p_GDALColorEntry arg1) { int ret = gdalPINVOKE.ColorTable_GetColorEntryAsRGB(swigCPtr, arg0, SWIGTYPE_p_GDALColorEntry.getCPtr(arg1)); return ret; } public void SetColorEntry(int arg0, SWIGTYPE_p_GDALColorEntry arg1) { gdalPINVOKE.ColorTable_SetColorEntry(swigCPtr, arg0, SWIGTYPE_p_GDALColorEntry.getCPtr(arg1)); } }