| 2220 | } |
| 2221 | |
| 2222 | void ImFontAtlas::CalcCustomRectUV(const ImFontAtlasCustomRect* rect, ImVec2* out_uv_min, ImVec2* out_uv_max) const |
| 2223 | { |
| 2224 | IM_ASSERT(TexWidth > 0 && TexHeight > 0); // Font atlas needs to be built before we can calculate UV coordinates |
| 2225 | IM_ASSERT(rect->IsPacked()); // Make sure the rectangle has been packed |
| 2226 | *out_uv_min = ImVec2((float)rect->X * TexUvScale.x, (float)rect->Y * TexUvScale.y); |
| 2227 | *out_uv_max = ImVec2((float)(rect->X + rect->Width) * TexUvScale.x, (float)(rect->Y + rect->Height) * TexUvScale.y); |
| 2228 | } |
| 2229 | |
| 2230 | bool ImFontAtlas::GetMouseCursorTexData(ImGuiMouseCursor cursor_type, ImVec2* out_offset, ImVec2* out_size, ImVec2 out_uv_border[2], ImVec2 out_uv_fill[2]) |
| 2231 | { |
no test coverage detected