| 3323 | #endif // #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS |
| 3324 | |
| 3325 | bool ImFontAtlas::GetCustomRect(ImFontAtlasRectId id, ImFontAtlasRect* out_r) const |
| 3326 | { |
| 3327 | ImTextureRect* r = ImFontAtlasPackGetRectSafe((ImFontAtlas*)this, id); |
| 3328 | if (r == NULL) |
| 3329 | return false; |
| 3330 | IM_ASSERT(TexData->Width > 0 && TexData->Height > 0); // Font atlas needs to be built before we can calculate UV coordinates |
| 3331 | if (out_r == NULL) |
| 3332 | return true; |
| 3333 | out_r->x = r->x; |
| 3334 | out_r->y = r->y; |
| 3335 | out_r->w = r->w; |
| 3336 | out_r->h = r->h; |
| 3337 | out_r->uv0 = ImVec2((float)(r->x), (float)(r->y)) * TexUvScale; |
| 3338 | out_r->uv1 = ImVec2((float)(r->x + r->w), (float)(r->y + r->h)) * TexUvScale; |
| 3339 | return true; |
| 3340 | } |
| 3341 | |
| 3342 | bool ImFontAtlasGetMouseCursorTexData(ImFontAtlas* atlas, ImGuiMouseCursor cursor_type, ImVec2* out_offset, ImVec2* out_size, ImVec2 out_uv_border[2], ImVec2 out_uv_fill[2]) |
| 3343 | { |
no test coverage detected