@@ -74,7 +74,7 @@ public ImFontPtr AddFontFromMemoryCompressedBase85TTF(string compressed_font_dat
7474 ImFont * ret = ImGuiNative . ImFontAtlas_AddFontFromMemoryCompressedBase85TTF ( NativePtr , native_compressed_font_data_base85 , size_pixels , native_font_cfg , glyph_ranges ) ;
7575 return new ImFontPtr ( ret ) ;
7676 }
77- public ImFontPtr AddFontFromMemoryCompressedBase85TTF ( string compressed_font_data_base85 , float size_pixels , ImFontConfigPtr font_cfg , ref ushort glyph_ranges )
77+ public ImFontPtr AddFontFromMemoryCompressedBase85TTF ( string compressed_font_data_base85 , float size_pixels , ImFontConfigPtr font_cfg , IntPtr glyph_ranges )
7878 {
7979 int compressed_font_data_base85_byteCount = Encoding . UTF8 . GetByteCount ( compressed_font_data_base85 ) ;
8080 byte * native_compressed_font_data_base85 = stackalloc byte [ compressed_font_data_base85_byteCount + 1 ] ;
@@ -84,11 +84,9 @@ public ImFontPtr AddFontFromMemoryCompressedBase85TTF(string compressed_font_dat
8484 native_compressed_font_data_base85 [ native_compressed_font_data_base85_offset ] = 0 ;
8585 }
8686 ImFontConfig * native_font_cfg = font_cfg . NativePtr ;
87- fixed ( ushort * native_glyph_ranges = & glyph_ranges )
88- {
89- ImFont * ret = ImGuiNative . ImFontAtlas_AddFontFromMemoryCompressedBase85TTF ( NativePtr , native_compressed_font_data_base85 , size_pixels , native_font_cfg , native_glyph_ranges ) ;
90- return new ImFontPtr ( ret ) ;
91- }
87+ ushort * native_glyph_ranges = ( ushort * ) glyph_ranges . ToPointer ( ) ;
88+ ImFont * ret = ImGuiNative . ImFontAtlas_AddFontFromMemoryCompressedBase85TTF ( NativePtr , native_compressed_font_data_base85 , size_pixels , native_font_cfg , native_glyph_ranges ) ;
89+ return new ImFontPtr ( ret ) ;
9290 }
9391 public bool Build ( )
9492 {
@@ -129,30 +127,30 @@ public bool IsBuilt()
129127 byte ret = ImGuiNative . ImFontAtlas_IsBuilt ( NativePtr ) ;
130128 return ret != 0 ;
131129 }
132- public ushort * GetGlyphRangesThai ( )
130+ public IntPtr GetGlyphRangesThai ( )
133131 {
134132 ushort * ret = ImGuiNative . ImFontAtlas_GetGlyphRangesThai ( NativePtr ) ;
135- return ret ;
133+ return ( IntPtr ) ret ;
136134 }
137- public ushort * GetGlyphRangesCyrillic ( )
135+ public IntPtr GetGlyphRangesCyrillic ( )
138136 {
139137 ushort * ret = ImGuiNative . ImFontAtlas_GetGlyphRangesCyrillic ( NativePtr ) ;
140- return ret ;
138+ return ( IntPtr ) ret ;
141139 }
142- public ushort * GetGlyphRangesChineseSimplifiedCommon ( )
140+ public IntPtr GetGlyphRangesChineseSimplifiedCommon ( )
143141 {
144142 ushort * ret = ImGuiNative . ImFontAtlas_GetGlyphRangesChineseSimplifiedCommon ( NativePtr ) ;
145- return ret ;
143+ return ( IntPtr ) ret ;
146144 }
147- public ushort * GetGlyphRangesChineseFull ( )
145+ public IntPtr GetGlyphRangesChineseFull ( )
148146 {
149147 ushort * ret = ImGuiNative . ImFontAtlas_GetGlyphRangesChineseFull ( NativePtr ) ;
150- return ret ;
148+ return ( IntPtr ) ret ;
151149 }
152- public ushort * GetGlyphRangesDefault ( )
150+ public IntPtr GetGlyphRangesDefault ( )
153151 {
154152 ushort * ret = ImGuiNative . ImFontAtlas_GetGlyphRangesDefault ( NativePtr ) ;
155- return ret ;
153+ return ( IntPtr ) ret ;
156154 }
157155 public void SetTexID ( IntPtr id )
158156 {
@@ -172,55 +170,51 @@ public void Clear()
172170 }
173171 public ImFontPtr AddFontFromMemoryCompressedTTF ( IntPtr compressed_font_data , int compressed_font_size , float size_pixels )
174172 {
175- void * native_compressed_font_data = compressed_font_data . ToPointer ( ) ;
173+ void * native_compressed_font_data = ( void * ) compressed_font_data . ToPointer ( ) ;
176174 ImFontConfig * font_cfg = null ;
177175 ushort * glyph_ranges = null ;
178176 ImFont * ret = ImGuiNative . ImFontAtlas_AddFontFromMemoryCompressedTTF ( NativePtr , native_compressed_font_data , compressed_font_size , size_pixels , font_cfg , glyph_ranges ) ;
179177 return new ImFontPtr ( ret ) ;
180178 }
181179 public ImFontPtr AddFontFromMemoryCompressedTTF ( IntPtr compressed_font_data , int compressed_font_size , float size_pixels , ImFontConfigPtr font_cfg )
182180 {
183- void * native_compressed_font_data = compressed_font_data . ToPointer ( ) ;
181+ void * native_compressed_font_data = ( void * ) compressed_font_data . ToPointer ( ) ;
184182 ImFontConfig * native_font_cfg = font_cfg . NativePtr ;
185183 ushort * glyph_ranges = null ;
186184 ImFont * ret = ImGuiNative . ImFontAtlas_AddFontFromMemoryCompressedTTF ( NativePtr , native_compressed_font_data , compressed_font_size , size_pixels , native_font_cfg , glyph_ranges ) ;
187185 return new ImFontPtr ( ret ) ;
188186 }
189- public ImFontPtr AddFontFromMemoryCompressedTTF ( IntPtr compressed_font_data , int compressed_font_size , float size_pixels , ImFontConfigPtr font_cfg , ref ushort glyph_ranges )
187+ public ImFontPtr AddFontFromMemoryCompressedTTF ( IntPtr compressed_font_data , int compressed_font_size , float size_pixels , ImFontConfigPtr font_cfg , IntPtr glyph_ranges )
190188 {
191- void * native_compressed_font_data = compressed_font_data . ToPointer ( ) ;
189+ void * native_compressed_font_data = ( void * ) compressed_font_data . ToPointer ( ) ;
192190 ImFontConfig * native_font_cfg = font_cfg . NativePtr ;
193- fixed ( ushort * native_glyph_ranges = & glyph_ranges )
194- {
195- ImFont * ret = ImGuiNative . ImFontAtlas_AddFontFromMemoryCompressedTTF ( NativePtr , native_compressed_font_data , compressed_font_size , size_pixels , native_font_cfg , native_glyph_ranges ) ;
196- return new ImFontPtr ( ret ) ;
197- }
191+ ushort * native_glyph_ranges = ( ushort * ) glyph_ranges . ToPointer ( ) ;
192+ ImFont * ret = ImGuiNative . ImFontAtlas_AddFontFromMemoryCompressedTTF ( NativePtr , native_compressed_font_data , compressed_font_size , size_pixels , native_font_cfg , native_glyph_ranges ) ;
193+ return new ImFontPtr ( ret ) ;
198194 }
199195 public ImFontPtr AddFontFromMemoryTTF ( IntPtr font_data , int font_size , float size_pixels )
200196 {
201- void * native_font_data = font_data . ToPointer ( ) ;
197+ void * native_font_data = ( void * ) font_data . ToPointer ( ) ;
202198 ImFontConfig * font_cfg = null ;
203199 ushort * glyph_ranges = null ;
204200 ImFont * ret = ImGuiNative . ImFontAtlas_AddFontFromMemoryTTF ( NativePtr , native_font_data , font_size , size_pixels , font_cfg , glyph_ranges ) ;
205201 return new ImFontPtr ( ret ) ;
206202 }
207203 public ImFontPtr AddFontFromMemoryTTF ( IntPtr font_data , int font_size , float size_pixels , ImFontConfigPtr font_cfg )
208204 {
209- void * native_font_data = font_data . ToPointer ( ) ;
205+ void * native_font_data = ( void * ) font_data . ToPointer ( ) ;
210206 ImFontConfig * native_font_cfg = font_cfg . NativePtr ;
211207 ushort * glyph_ranges = null ;
212208 ImFont * ret = ImGuiNative . ImFontAtlas_AddFontFromMemoryTTF ( NativePtr , native_font_data , font_size , size_pixels , native_font_cfg , glyph_ranges ) ;
213209 return new ImFontPtr ( ret ) ;
214210 }
215- public ImFontPtr AddFontFromMemoryTTF ( IntPtr font_data , int font_size , float size_pixels , ImFontConfigPtr font_cfg , ref ushort glyph_ranges )
211+ public ImFontPtr AddFontFromMemoryTTF ( IntPtr font_data , int font_size , float size_pixels , ImFontConfigPtr font_cfg , IntPtr glyph_ranges )
216212 {
217- void * native_font_data = font_data . ToPointer ( ) ;
213+ void * native_font_data = ( void * ) font_data . ToPointer ( ) ;
218214 ImFontConfig * native_font_cfg = font_cfg . NativePtr ;
219- fixed ( ushort * native_glyph_ranges = & glyph_ranges )
220- {
221- ImFont * ret = ImGuiNative . ImFontAtlas_AddFontFromMemoryTTF ( NativePtr , native_font_data , font_size , size_pixels , native_font_cfg , native_glyph_ranges ) ;
222- return new ImFontPtr ( ret ) ;
223- }
215+ ushort * native_glyph_ranges = ( ushort * ) glyph_ranges . ToPointer ( ) ;
216+ ImFont * ret = ImGuiNative . ImFontAtlas_AddFontFromMemoryTTF ( NativePtr , native_font_data , font_size , size_pixels , native_font_cfg , native_glyph_ranges ) ;
217+ return new ImFontPtr ( ret ) ;
224218 }
225219 public ImFontPtr AddFontFromFileTTF ( string filename , float size_pixels )
226220 {
@@ -250,7 +244,7 @@ public ImFontPtr AddFontFromFileTTF(string filename, float size_pixels, ImFontCo
250244 ImFont * ret = ImGuiNative . ImFontAtlas_AddFontFromFileTTF ( NativePtr , native_filename , size_pixels , native_font_cfg , glyph_ranges ) ;
251245 return new ImFontPtr ( ret ) ;
252246 }
253- public ImFontPtr AddFontFromFileTTF ( string filename , float size_pixels , ImFontConfigPtr font_cfg , ref ushort glyph_ranges )
247+ public ImFontPtr AddFontFromFileTTF ( string filename , float size_pixels , ImFontConfigPtr font_cfg , IntPtr glyph_ranges )
254248 {
255249 int filename_byteCount = Encoding . UTF8 . GetByteCount ( filename ) ;
256250 byte * native_filename = stackalloc byte [ filename_byteCount + 1 ] ;
@@ -260,11 +254,9 @@ public ImFontPtr AddFontFromFileTTF(string filename, float size_pixels, ImFontCo
260254 native_filename [ native_filename_offset ] = 0 ;
261255 }
262256 ImFontConfig * native_font_cfg = font_cfg . NativePtr ;
263- fixed ( ushort * native_glyph_ranges = & glyph_ranges )
264- {
265- ImFont * ret = ImGuiNative . ImFontAtlas_AddFontFromFileTTF ( NativePtr , native_filename , size_pixels , native_font_cfg , native_glyph_ranges ) ;
266- return new ImFontPtr ( ret ) ;
267- }
257+ ushort * native_glyph_ranges = ( ushort * ) glyph_ranges . ToPointer ( ) ;
258+ ImFont * ret = ImGuiNative . ImFontAtlas_AddFontFromFileTTF ( NativePtr , native_filename , size_pixels , native_font_cfg , native_glyph_ranges ) ;
259+ return new ImFontPtr ( ret ) ;
268260 }
269261 public ImFontPtr AddFontDefault ( )
270262 {
@@ -278,10 +270,10 @@ public ImFontPtr AddFontDefault(ImFontConfigPtr font_cfg)
278270 ImFont * ret = ImGuiNative . ImFontAtlas_AddFontDefault ( NativePtr , native_font_cfg ) ;
279271 return new ImFontPtr ( ret ) ;
280272 }
281- public ushort * GetGlyphRangesJapanese ( )
273+ public IntPtr GetGlyphRangesJapanese ( )
282274 {
283275 ushort * ret = ImGuiNative . ImFontAtlas_GetGlyphRangesJapanese ( NativePtr ) ;
284- return ret ;
276+ return ( IntPtr ) ret ;
285277 }
286278 public void GetTexDataAsAlpha8 ( out byte * out_pixels , out int out_width , out int out_height )
287279 {
@@ -334,10 +326,10 @@ public bool GetMouseCursorTexData(ImGuiMouseCursor cursor, out Vector2 out_offse
334326 }
335327 }
336328 }
337- public ushort * GetGlyphRangesKorean ( )
329+ public IntPtr GetGlyphRangesKorean ( )
338330 {
339331 ushort * ret = ImGuiNative . ImFontAtlas_GetGlyphRangesKorean ( NativePtr ) ;
340- return ret ;
332+ return ( IntPtr ) ret ;
341333 }
342334 public void GetTexDataAsRGBA32 ( out byte * out_pixels , out int out_width , out int out_height )
343335 {
0 commit comments