| 2968 | |
| 2969 | #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS |
| 2970 | static void GetTexDataAsFormat(ImFontAtlas* atlas, ImTextureFormat format, unsigned char** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel) |
| 2971 | { |
| 2972 | ImTextureData* tex = atlas->TexData; |
| 2973 | if (!atlas->TexIsBuilt || tex == NULL || tex->Pixels == NULL || atlas->TexDesiredFormat != format) |
| 2974 | { |
| 2975 | atlas->TexDesiredFormat = format; |
| 2976 | atlas->Build(); |
| 2977 | tex = atlas->TexData; |
| 2978 | } |
| 2979 | if (out_pixels) { *out_pixels = (unsigned char*)tex->Pixels; }; |
| 2980 | if (out_width) { *out_width = tex->Width; }; |
| 2981 | if (out_height) { *out_height = tex->Height; }; |
| 2982 | if (out_bytes_per_pixel) { *out_bytes_per_pixel = tex->BytesPerPixel; } |
| 2983 | } |
| 2984 | |
| 2985 | void ImFontAtlas::GetTexDataAsAlpha8(unsigned char** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel) |
| 2986 | { |
no test coverage detected