public ImFontPtr AddFontDefault() { ImFontConfigNative *font_cfg = null; ImFont * ret = ImGuiNative.ImFontAtlas_AddFontDefault(NativePtr, font_cfg); return(new ImFontPtr(ret)); }
public ImFontPtr AddFontDefault(ImFontConfig font_cfg) { ImFontConfigNative *native_font_cfg = font_cfg.NativePtr; ImFont * ret = ImGuiNative.ImFontAtlas_AddFontDefault(NativePtr, native_font_cfg); return(new ImFontPtr(ret)); }
public int AddCustomRectFontGlyph(ImFontPtr font, ushort id, int width, int height, float advance_x, Vector2 offset) { ImFont *native_font = font.NativePtr; int ret = ImGuiNative.ImFontAtlas_AddCustomRectFontGlyph(NativePtr, native_font, id, width, height, advance_x, offset); return(ret); }
public ImFontPtr AddFontFromMemoryTTF(IntPtr font_data, int font_size, float size_pixels, ImFontConfig font_cfg) { void *native_font_data = font_data.ToPointer(); ImFontConfigNative *native_font_cfg = font_cfg.NativePtr; ushort * glyph_ranges = null; ImFont * ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryTTF(NativePtr, native_font_data, font_size, size_pixels, native_font_cfg, glyph_ranges); return(new ImFontPtr(ret)); }
public ImFontPtr AddFontFromMemoryCompressedTTF(IntPtr compressed_font_data, int compressed_font_size, float size_pixels) { void *native_compressed_font_data = compressed_font_data.ToPointer(); ImFontConfigNative *font_cfg = null; ushort * glyph_ranges = null; ImFont * ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedTTF(NativePtr, native_compressed_font_data, compressed_font_size, size_pixels, font_cfg, glyph_ranges); return(new ImFontPtr(ret)); }
public ImFontPtr AddFontFromMemoryCompressedTTF(IntPtr compressed_font_data, int compressed_font_size, float size_pixels, ImFontConfig font_cfg, ref ushort glyph_ranges) { void *native_compressed_font_data = compressed_font_data.ToPointer(); ImFontConfigNative *native_font_cfg = font_cfg.NativePtr; fixed(ushort *native_glyph_ranges = &glyph_ranges) { ImFont *ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedTTF(NativePtr, native_compressed_font_data, compressed_font_size, size_pixels, native_font_cfg, native_glyph_ranges); return(new ImFontPtr(ret)); } }
public void AddText(ImFontPtr font, float font_size, Vector2 pos, uint col, string text_begin, float wrap_width, Vector4 clip_rect) { ImFont *native_font = font.NativePtr; int text_begin_byteCount = Encoding.UTF8.GetByteCount(text_begin); byte * native_text_begin = stackalloc byte[text_begin_byteCount + 1]; fixed(char *text_begin_ptr = text_begin) { int native_text_begin_offset = Encoding.UTF8.GetBytes(text_begin_ptr, text_begin.Length, native_text_begin, text_begin_byteCount); native_text_begin[native_text_begin_offset] = 0; } byte * native_text_end = null; Vector4 *cpu_fine_clip_rect = &clip_rect; ImGuiNative.ImDrawList_AddTextFontPtr(NativePtr, native_font, font_size, pos, col, native_text_begin, native_text_end, wrap_width, cpu_fine_clip_rect); }
public ImFontPtr AddFontFromMemoryCompressedBase85TTF(string compressed_font_data_base85, float size_pixels) { int compressed_font_data_base85_byteCount = (compressed_font_data_base85 != null) ? Encoding.UTF8.GetByteCount(compressed_font_data_base85) : 0; byte *native_compressed_font_data_base85 = stackalloc byte[compressed_font_data_base85_byteCount + 1]; fixed(char *compressed_font_data_base85_ptr = compressed_font_data_base85) { int native_compressed_font_data_base85_offset = (compressed_font_data_base85 != null) ? Encoding.UTF8.GetBytes(compressed_font_data_base85_ptr, compressed_font_data_base85.Length, native_compressed_font_data_base85, compressed_font_data_base85_byteCount) : 0; native_compressed_font_data_base85[native_compressed_font_data_base85_offset] = 0; } native_compressed_font_data_base85 = (compressed_font_data_base85 != null) ? native_compressed_font_data_base85 : null; ImFontConfigNative *font_cfg = null; ushort * glyph_ranges = null; ImFont * ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedBase85TTF(NativePtr, native_compressed_font_data_base85, size_pixels, font_cfg, glyph_ranges); return(new ImFontPtr(ret)); }
public ImFontPtr AddFontFromFileTTF(string filename, float size_pixels, ImFontConfig font_cfg) { int filename_byteCount = (filename != null) ? Encoding.UTF8.GetByteCount(filename) : 0; byte *native_filename = stackalloc byte[filename_byteCount + 1]; fixed(char *filename_ptr = filename) { int native_filename_offset = (filename != null) ? Encoding.UTF8.GetBytes(filename_ptr, filename.Length, native_filename, filename_byteCount) : 0; native_filename[native_filename_offset] = 0; } native_filename = (filename != null) ? native_filename : null; ImFontConfigNative *native_font_cfg = font_cfg.NativePtr; ushort * glyph_ranges = null; ImFont * ret = ImGuiNative.ImFontAtlas_AddFontFromFileTTF(NativePtr, native_filename, size_pixels, native_font_cfg, glyph_ranges); return(new ImFontPtr(ret)); }
public abstract ImFontGlyph *ImFont_FindGlyphNoFallback(ImFont *self, ushort c);
public FontContainer(ImFont *atlas, string Name, int Size) { Atlas = atlas; this.Name = Name; this.Size = Size; }
public static extern ImFontGlyph *igFontFindGlyph(ImFont *font, uint c);
public ImFontPtr(IntPtr nativePtr) { NativePtr = (ImFont *)nativePtr; }
public abstract Vector2 ImFont_CalcTextSizeA(ImFont *self, float size, float max_width, float wrap_width, byte *text_begin, byte *text_end, byte **remaining);
public abstract void ImFont_AddRemapChar(ImFont *self, ushort dst, ushort src, byte overwrite_dst);
public abstract void ImFont_RenderChar(ImFont *self, ImDrawList *draw_list, float size, Vector2 pos, uint col, ushort c);
public abstract ImFontGlyph *ImFont_FindGlyph(ImFont *self, ushort c);
public abstract void ImFont_SetFallbackChar(ImFont *self, ushort c);
public abstract float ImFont_GetCharAdvance(ImFont *self, ushort c);
public abstract byte ImFont_IsLoaded(ImFont *self);
public abstract void ImFont_RenderText(ImFont *self, ImDrawList *draw_list, float size, Vector2 pos, uint col, Vector4 clip_rect, byte *text_begin, byte *text_end, float wrap_width, byte cpu_fine_clip);
public abstract void igPushFont(ImFont *font);
public abstract void ImFont_GrowIndex(ImFont *self, int new_size);
static extern ImFontGlyph *igFontFindGlyph(ImFont *font, char c);
public abstract void ImFont_AddGlyph(ImFont *self, ushort c, float x0, float y0, float x1, float y1, float u0, float v0, float u1, float v1, float advance_x);
public ImFontPtr(ImFont *nativePtr) { NativePtr = nativePtr; }
public abstract void ImFont_ImFont(ImFont *self);
public abstract byte *ImFont_CalcWordWrapPositionA(ImFont *self, float scale, byte *text, byte *text_end, float wrap_width);
public ImFontPtr(ImFont *nativePtr) => NativePtr = nativePtr;
public abstract int ImFontAtlas_AddCustomRectFontGlyph(ImFontAtlas *self, ImFont *font, ushort id, int width, int height, float advance_x, Vector2 offset);