Extended .NET SDK Documentation 2025 SP0
Loading...
Searching...
No Matches
OdGiPalette.cs
Go to the documentation of this file.
1//------------------------------------------------------------------------------
2// <auto-generated />
3//
4// This file was automatically generated by SWIG (http://www.swig.org).
5// Version 4.0.2
6//
7// Do not make changes to this file unless you know what you are doing--modify
8// the SWIG interface file instead.
9//------------------------------------------------------------------------------
10
11namespace Teigha.Core {
12
13using System;
14using System.Runtime.InteropServices;
15
16public class OdGiPalette : OdRxObject {
17 private Object locker = new Object();
18 private HandleRef swigCPtr;
19
20 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
21 public OdGiPalette(IntPtr cPtr, bool cMemoryOwn) : base(GlobalsPINVOKE.OdGiPalette_SWIGUpcast(cPtr), cMemoryOwn) {
22 swigCPtr = new HandleRef(this, cPtr);
23 }
24
25 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
26 public static HandleRef getCPtr(OdGiPalette obj) {
27 return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
28 }
29
30 ~OdGiPalette() {
31 Dispose(false);
32 }
33
34 public void Dispose() {
35 Dispose(true);
36 global::System.GC.SuppressFinalize(this);
37 }
38
39 protected virtual void Dispose(bool disposing) {
40 lock(this) {
41 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
42 if (swigCMemOwn) {
43 swigCMemOwn = false;
45 }
46 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
47 }
48 }
49 }
50
51 public class Addressation : global::System.IDisposable {
52 private Object locker = new Object();
53 private HandleRef swigCPtr;
54 protected bool swigCMemOwn;
55 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
56 public Addressation(IntPtr cPtr, bool cMemoryOwn) {
57 swigCMemOwn = cMemoryOwn;
58 swigCPtr = new HandleRef(this, cPtr);
59 }
60 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
61 public static HandleRef getCPtr(Addressation obj) {
62 return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
63 }
64
66 Dispose(false);
67 }
68
69 public void Dispose() {
70 Dispose(true);
71 global::System.GC.SuppressFinalize(this);
72 }
73
74 protected virtual void Dispose(bool disposing) {
75 lock(this) {
76 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
77 if (swigCMemOwn) {
78 swigCMemOwn = false;
79 GlobalsPINVOKE.delete_OdGiPalette_Addressation(swigCPtr); // NESTED_DTOR_CSHARP
80 }
81 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
82 }
83 }
84 }
85
86 public Int32 m_nSrcFrom {
87 set {
88 /*SIMPLETYPE*/
91 }
92 get {
93 /*SIMPLETYPE*/
96 return ret;
97 }
98 }
99
100 public Int32 m_nDstTo {
101 set {
102 /*SIMPLETYPE*/
105 }
106 get {
107 /*SIMPLETYPE*/
110 return ret;
111 }
112 }
113
114 public Int32 m_nNumColors {
115 set {
116 /*SIMPLETYPE*/
119 }
120 get {
121 /*SIMPLETYPE*/
124 return ret;
125 }
126 }
127
128 public Addressation(Int32 nFrom, Int32 nTo, Int32 nNum) : this(GlobalsPINVOKE.new_OdGiPalette_Addressation__SWIG_0(nFrom /*SIMPLETYPE*/, nTo /*SIMPLETYPE*/, nNum /*SIMPLETYPE*/), true) {
130 }
131
132 public Addressation(Int32 nFrom, Int32 nTo) : this(GlobalsPINVOKE.new_OdGiPalette_Addressation__SWIG_1(nFrom /*SIMPLETYPE*/, nTo /*SIMPLETYPE*/), true) {
134 }
135
136 public Addressation(Int32 nFrom) : this(GlobalsPINVOKE.new_OdGiPalette_Addressation__SWIG_2(nFrom /*SIMPLETYPE*/), true) {
138 }
139
140 public Addressation() : this(GlobalsPINVOKE.new_OdGiPalette_Addressation__SWIG_3(), true) {
142 }
143
149
155
156 }
157
158 public static OdGiPalette createDynamic() {// OdSmartPtr<OdGiPalette>
159 MemoryManager mMan = MemoryManager.GetMemoryManager();
160 MemoryTransaction mTrans = mMan.GetCurrentTransaction(); // MemoryTransaction #17
162
163 OdGiPalette ret = null;
164 if (null != mTrans)
165 {
166 mTrans.AddObject((OdGiPalette)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdGiPalette),ptr, true));
167 ret = (OdGiPalette)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdGiPalette),ptr, false);
168 }
169 else
170 {
171 ret = (OdGiPalette)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdGiPalette),ptr, true);
172 }
173
175 return ret;
176}
177
179 OdGiPalette ret = (OdGiPalette)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdGiPalette),GlobalsPINVOKE.OdGiPalette_Assign(swigCPtr, OdGiPalette.getCPtr(obj)),false); /*createInt 3_1*/
180
182 return ret;
183}
184
185 public virtual OdRxObject clone() {// OdRxObjectPtr
186 MemoryManager mMan = MemoryManager.GetMemoryManager();
187 MemoryTransaction mTrans = mMan.GetCurrentTransaction(); // MemoryTransaction #17
188 IntPtr ptr = GlobalsPINVOKE.OdGiPalette_clone(swigCPtr);
189
190 OdRxObject ret = null;
191 if (null != mTrans)
192 {
193 mTrans.AddObject((OdRxObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdRxObject),ptr, true));
194 ret = (OdRxObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdRxObject),ptr, false);
195 }
196 else
197 {
198 ret = (OdRxObject)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdRxObject),ptr, true);
199 }
200
202 return ret;
203}
204
205 public OdGiPalette cloneIfNeed() {// OdSmartPtr<OdGiPalette>
206 MemoryManager mMan = MemoryManager.GetMemoryManager();
207 MemoryTransaction mTrans = mMan.GetCurrentTransaction(); // MemoryTransaction #17
208 IntPtr ptr = GlobalsPINVOKE.OdGiPalette_cloneIfNeed(swigCPtr);
209
210 OdGiPalette ret = null;
211 if (null != mTrans)
212 {
213 mTrans.AddObject((OdGiPalette)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdGiPalette),ptr, true));
214 ret = (OdGiPalette)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdGiPalette),ptr, false);
215 }
216 else
217 {
218 ret = (OdGiPalette)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdGiPalette),ptr, true);
219 }
220
222 return ret;
223}
224
225 public UInt32 color(Int32 nColor) {
226// test csout
227 /*SIMPLETYPE*/
228 UInt32 ret = GlobalsPINVOKE.OdGiPalette_color(swigCPtr, nColor /*SIMPLETYPE*/);
230 return ret;
231 }
232
233 public bool entryActivity(Int32 nColor) {
234 bool ret = GlobalsPINVOKE.OdGiPalette_entryActivity(swigCPtr, nColor /*SIMPLETYPE*/);
236 return ret;
237 }
238
239 public void setColor(Int32 nColor, UInt32 color) {
240 GlobalsPINVOKE.OdGiPalette_setColor(swigCPtr, nColor /*SIMPLETYPE*/, color /*SIMPLETYPE*/);
242 }
243
244 public void setEntryActivity(Int32 nColor, bool bActivity) {
245 GlobalsPINVOKE.OdGiPalette_setEntryActivity(swigCPtr, nColor /*SIMPLETYPE*/, bActivity);
247 }
248
249 public UInt32[] /*array applied*/ asArray() {
250 IntPtr ret_ptr = GlobalsPINVOKE.OdGiPalette_asArray(swigCPtr);
252 if (ret_ptr == IntPtr.Zero)
253 return null;
254 int arrayLength = 257;
255 Int32[] ret_tmp_result = new Int32[arrayLength];
256 Marshal.Copy(ret_ptr, ret_tmp_result, 0, arrayLength);
257
258 UInt32[] result = Array.ConvertAll<Int32,UInt32>(ret_tmp_result, new Converter<Int32, UInt32>((in_value) => { return (UInt32)in_value; }));
259 return result;
260}
261
263 OdGiColorCube ret = (OdGiColorCube)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdGiColorCube),GlobalsPINVOKE.OdGiPalette_colorCube(swigCPtr),false); /*createInt 3_2*/
264
266 return ret;
267}
268
273
278
280 OdGiGrayRamp ret = (OdGiGrayRamp)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdGiGrayRamp),GlobalsPINVOKE.OdGiPalette_grayRamp(swigCPtr),false); /*createInt 3_2*/
281
283 return ret;
284}
285
290
295
296 public bool install(OdGiColorCube pColorCube, bool bForceUpdate) {
297 bool ret = GlobalsPINVOKE.OdGiPalette_install__SWIG_0(swigCPtr, OdGiColorCube.getCPtr(pColorCube), bForceUpdate);
299 return ret;
300 }
301
302 public bool install(OdGiColorCube pColorCube) {
303 bool ret = GlobalsPINVOKE.OdGiPalette_install__SWIG_1(swigCPtr, OdGiColorCube.getCPtr(pColorCube));
305 return ret;
306 }
307
308 public bool install(OdGiGrayRamp pGrayRamp, bool bForceUpdate) {
309 bool ret = GlobalsPINVOKE.OdGiPalette_install__SWIG_2(swigCPtr, OdGiGrayRamp.getCPtr(pGrayRamp), bForceUpdate);
311 return ret;
312 }
313
314 public bool install(OdGiGrayRamp pGrayRamp) {
315 bool ret = GlobalsPINVOKE.OdGiPalette_install__SWIG_3(swigCPtr, OdGiGrayRamp.getCPtr(pGrayRamp));
317 return ret;
318 }
319
320 public bool install(OdGiPalette pPalette, bool bForceUpdate, OdGiPalette.Addressation address) {
321 bool ret = GlobalsPINVOKE.OdGiPalette_install__SWIG_4(swigCPtr, OdGiPalette.getCPtr(pPalette), bForceUpdate, OdGiPalette.Addressation.getCPtr(address));
323 return ret;
324 }
325
326 public bool install(OdGiPalette pPalette, bool bForceUpdate) {
327 bool ret = GlobalsPINVOKE.OdGiPalette_install__SWIG_5(swigCPtr, OdGiPalette.getCPtr(pPalette), bForceUpdate);
329 return ret;
330 }
331
332 public bool install(OdGiPalette pPalette) {
333 bool ret = GlobalsPINVOKE.OdGiPalette_install__SWIG_6(swigCPtr, OdGiPalette.getCPtr(pPalette));
335 return ret;
336 }
337
338 public bool install(SWIGTYPE_p_ODCOLORREF pColors, bool bForceUpdate, OdGiPalette.Addressation address) {
339 bool ret = GlobalsPINVOKE.OdGiPalette_install__SWIG_7(swigCPtr, SWIGTYPE_p_ODCOLORREF.getCPtr(pColors), bForceUpdate, OdGiPalette.Addressation.getCPtr(address));
341 return ret;
342 }
343
344 public bool install(SWIGTYPE_p_ODCOLORREF pColors, bool bForceUpdate) {
345 bool ret = GlobalsPINVOKE.OdGiPalette_install__SWIG_8(swigCPtr, SWIGTYPE_p_ODCOLORREF.getCPtr(pColors), bForceUpdate);
347 return ret;
348 }
349
350 public bool install(SWIGTYPE_p_ODCOLORREF pColors) {
351 bool ret = GlobalsPINVOKE.OdGiPalette_install__SWIG_9(swigCPtr, SWIGTYPE_p_ODCOLORREF.getCPtr(pColors));
353 return ret;
354 }
355
356 public Int32 closestMatch(UInt32 cref, bool bThroughPal) {
357// test csout
358 /*SIMPLETYPE*/
359 Int32 ret = GlobalsPINVOKE.OdGiPalette_closestMatch__SWIG_0(swigCPtr, cref /*SIMPLETYPE*/, bThroughPal);
361 return ret;
362 }
363
364 public Int32 closestMatch(UInt32 cref) {
365// test csout
366 /*SIMPLETYPE*/
367 Int32 ret = GlobalsPINVOKE.OdGiPalette_closestMatch__SWIG_1(swigCPtr, cref /*SIMPLETYPE*/);
369 return ret;
370 }
371
372 public Int32 firstAvailableBlock(Int32 blockSize) {
373// test csout
374 /*SIMPLETYPE*/
375 Int32 ret = GlobalsPINVOKE.OdGiPalette_firstAvailableBlock(swigCPtr, blockSize /*SIMPLETYPE*/);
377 return ret;
378 }
379
385
386 public bool isEqualTo(OdGiPalette pPalette) {
387 bool ret = GlobalsPINVOKE.OdGiPalette_isEqualTo__SWIG_1(swigCPtr, OdGiPalette.getCPtr(pPalette));
389 return ret;
390 }
391
392 public bool remove(OdGiPalette pPalette, bool bForceUpdate, OdGiPalette.Addressation address) {
393 bool ret = GlobalsPINVOKE.OdGiPalette_remove__SWIG_0(swigCPtr, OdGiPalette.getCPtr(pPalette), bForceUpdate, OdGiPalette.Addressation.getCPtr(address));
395 return ret;
396 }
397
398 public bool remove(OdGiPalette pPalette, bool bForceUpdate) {
399 bool ret = GlobalsPINVOKE.OdGiPalette_remove__SWIG_1(swigCPtr, OdGiPalette.getCPtr(pPalette), bForceUpdate);
401 return ret;
402 }
403
404 public bool remove(OdGiPalette pPalette) {
405 bool ret = GlobalsPINVOKE.OdGiPalette_remove__SWIG_2(swigCPtr, OdGiPalette.getCPtr(pPalette));
407 return ret;
408 }
409
414
415 protected static string getRealClassName(IntPtr ptr) {
416 string ret = GlobalsPINVOKE.OdGiPalette_getRealClassName(ptr /*SIMPLETYPE*/);
418 return ret;
419 }
420
421}
422
423}
static global::System.Exception Retrieve()
static bool OdGiPalette_install__SWIG_5(HandleRef jarg1, HandleRef jarg2, bool jarg3)
static string OdGiPalette_getRealClassName(IntPtr jarg1)
static UInt32 OdGiPalette_color(HandleRef jarg1, Int32 jarg2)
static bool OdGiPalette_install__SWIG_9(HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static IntPtr OdGiPalette_asArray(HandleRef jarg1)
static IntPtr OdGiPalette_cloneIfNeed(HandleRef jarg1)
static bool OdGiPalette_isEqualTo__SWIG_1(HandleRef jarg1, HandleRef jarg2)
static Int32 OdGiPalette_Addressation_m_nDstTo_get(global::System.Runtime.InteropServices.HandleRef jarg1)
static void OdGiPalette_setColor(HandleRef jarg1, Int32 jarg2, UInt32 jarg3)
static IntPtr OdGiPalette_grayRamp(HandleRef jarg1)
static void OdGiPalette_setColorCube(HandleRef jarg1, HandleRef jarg2)
static void OdGiPalette_resetColorCube(HandleRef jarg1)
static Int32 OdGiPalette_firstAvailableBlock(HandleRef jarg1, Int32 jarg2)
static bool OdGiPalette_isEqualTo__SWIG_0(HandleRef jarg1, HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static bool OdGiPalette_install__SWIG_4(HandleRef jarg1, HandleRef jarg2, bool jarg3, global::System.Runtime.InteropServices.HandleRef jarg4)
static IntPtr OdGiPalette_Assign(HandleRef jarg1, HandleRef jarg2)
static bool OdGiPalette_install__SWIG_7(HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, bool jarg3, global::System.Runtime.InteropServices.HandleRef jarg4)
static bool OdGiPalette_remove__SWIG_1(HandleRef jarg1, HandleRef jarg2, bool jarg3)
static void OdGiPalette_clear(HandleRef jarg1)
static bool OdGiPalette_install__SWIG_0(HandleRef jarg1, HandleRef jarg2, bool jarg3)
static IntPtr OdGiPalette_colorCube(HandleRef jarg1)
static bool OdGiPalette_remove__SWIG_2(HandleRef jarg1, HandleRef jarg2)
static void OdGiPalette_resetGrayRamp(HandleRef jarg1)
static bool OdGiPalette_Addressation_fullRange(global::System.Runtime.InteropServices.HandleRef jarg1)
static void OdGiPalette_Addressation_m_nSrcFrom_set(global::System.Runtime.InteropServices.HandleRef jarg1, Int32 jarg2)
static bool OdGiPalette_Addressation_validate(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool OdGiPalette_install__SWIG_1(HandleRef jarg1, HandleRef jarg2)
static bool OdGiPalette_install__SWIG_8(HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, bool jarg3)
static IntPtr OdGiPalette_createDynamic()
static Int32 OdGiPalette_closestMatch__SWIG_1(HandleRef jarg1, UInt32 jarg2)
static void delete_OdGiPalette(HandleRef jarg1)
static void OdGiPalette_setGrayRamp(HandleRef jarg1, HandleRef jarg2)
static bool OdGiPalette_remove__SWIG_0(HandleRef jarg1, HandleRef jarg2, bool jarg3, global::System.Runtime.InteropServices.HandleRef jarg4)
static bool OdGiPalette_install__SWIG_6(HandleRef jarg1, HandleRef jarg2)
static bool OdGiPalette_install__SWIG_3(HandleRef jarg1, HandleRef jarg2)
static void OdGiPalette_Addressation_m_nNumColors_set(global::System.Runtime.InteropServices.HandleRef jarg1, Int32 jarg2)
static Int32 OdGiPalette_Addressation_m_nNumColors_get(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool OdGiPalette_install__SWIG_2(HandleRef jarg1, HandleRef jarg2, bool jarg3)
static void OdGiPalette_setEntryActivity(HandleRef jarg1, Int32 jarg2, bool jarg3)
static void delete_OdGiPalette_Addressation(global::System.Runtime.InteropServices.HandleRef jarg1)
static Int32 OdGiPalette_Addressation_m_nSrcFrom_get(global::System.Runtime.InteropServices.HandleRef jarg1)
static void OdGiPalette_Addressation_m_nDstTo_set(global::System.Runtime.InteropServices.HandleRef jarg1, Int32 jarg2)
static IntPtr OdGiPalette_clone(HandleRef jarg1)
static Int32 OdGiPalette_closestMatch__SWIG_0(HandleRef jarg1, UInt32 jarg2, bool jarg3)
static bool OdGiPalette_entryActivity(HandleRef jarg1, Int32 jarg2)
static HandleRef getCPtr(OdGiColorCube obj)
static HandleRef getCPtr(OdGiGrayRamp obj)
Addressation(Int32 nFrom, Int32 nTo)
Addressation(Int32 nFrom, Int32 nTo, Int32 nNum)
Addressation(IntPtr cPtr, bool cMemoryOwn)
static HandleRef getCPtr(Addressation obj)
virtual void Dispose(bool disposing)
static HandleRef getCPtr(OdGiPalette obj)
bool isEqualTo(OdGiPalette pPalette)
UInt32 color(Int32 nColor)
void setColor(Int32 nColor, UInt32 color)
Int32 firstAvailableBlock(Int32 blockSize)
bool install(OdGiColorCube pColorCube, bool bForceUpdate)
bool install(SWIGTYPE_p_ODCOLORREF pColors, bool bForceUpdate, OdGiPalette.Addressation address)
bool install(OdGiColorCube pColorCube)
void setColorCube(OdGiColorCube pColorCube)
static OdGiPalette createDynamic()
bool install(SWIGTYPE_p_ODCOLORREF pColors, bool bForceUpdate)
bool install(OdGiGrayRamp pGrayRamp, bool bForceUpdate)
Int32 closestMatch(UInt32 cref)
OdGiPalette cloneIfNeed()
static string getRealClassName(IntPtr ptr)
bool install(SWIGTYPE_p_ODCOLORREF pColors)
bool install(OdGiGrayRamp pGrayRamp)
bool install(OdGiPalette pPalette, bool bForceUpdate)
OdGiColorCube colorCube()
Int32 closestMatch(UInt32 cref, bool bThroughPal)
void setGrayRamp(OdGiGrayRamp pGrayRamp)
bool entryActivity(Int32 nColor)
OdGiPalette(IntPtr cPtr, bool cMemoryOwn)
bool install(OdGiPalette pPalette, bool bForceUpdate, OdGiPalette.Addressation address)
bool install(OdGiPalette pPalette)
OdGiGrayRamp grayRamp()
OdGiPalette Assign(OdGiPalette obj)
virtual OdRxObject clone()
void setEntryActivity(Int32 nColor, bool bActivity)
virtual void Dispose(bool disposing)
bool isEqualTo(OdGiPalette pPalette, OdGiPalette.Addressation address)
OdRxObject(IntPtr cPtr, bool cMemoryOwn)
Definition OdRxObject.cs:21