| 2237 | } |
| 2238 | |
| 2239 | bool ImFontAtlas::GetMouseCursorTexData(ImGuiMouseCursor cursor_type, ImVec2* out_offset, ImVec2* out_size, ImVec2 out_uv_border[2], ImVec2 out_uv_fill[2]) |
| 2240 | { |
| 2241 | if (cursor_type <= ImGuiMouseCursor_None || cursor_type >= ImGuiMouseCursor_COUNT) |
| 2242 | return false; |
| 2243 | if (Flags & ImFontAtlasFlags_NoMouseCursors) |
| 2244 | return false; |
| 2245 | |
| 2246 | IM_ASSERT(PackIdMouseCursors != -1); |
| 2247 | ImFontAtlasCustomRect* r = GetCustomRectByIndex(PackIdMouseCursors); |
| 2248 | ImVec2 pos = FONT_ATLAS_DEFAULT_TEX_CURSOR_DATA[cursor_type][0] + ImVec2((float)r->X, (float)r->Y); |
| 2249 | ImVec2 size = FONT_ATLAS_DEFAULT_TEX_CURSOR_DATA[cursor_type][1]; |
| 2250 | *out_size = size; |
| 2251 | *out_offset = FONT_ATLAS_DEFAULT_TEX_CURSOR_DATA[cursor_type][2]; |
| 2252 | out_uv_border[0] = (pos) * TexUvScale; |
| 2253 | out_uv_border[1] = (pos + size) * TexUvScale; |
| 2254 | pos.x += FONT_ATLAS_DEFAULT_TEX_DATA_W + 1; |
| 2255 | out_uv_fill[0] = (pos) * TexUvScale; |
| 2256 | out_uv_fill[1] = (pos + size) * TexUvScale; |
| 2257 | return true; |
| 2258 | } |
| 2259 | |
| 2260 | bool ImFontAtlas::Build() |
| 2261 | { |
no test coverage detected