| 1857 | } |
| 1858 | |
| 1859 | bool ImFontAtlas::GetMouseCursorTexData(ImGuiMouseCursor cursor_type, ImVec2* out_offset, ImVec2* out_size, ImVec2 out_uv_border[2], ImVec2 out_uv_fill[2]) |
| 1860 | { |
| 1861 | if (cursor_type <= ImGuiMouseCursor_None || cursor_type >= ImGuiMouseCursor_COUNT) |
| 1862 | return false; |
| 1863 | if (Flags & ImFontAtlasFlags_NoMouseCursors) |
| 1864 | return false; |
| 1865 | |
| 1866 | IM_ASSERT(CustomRectIds[0] != -1); |
| 1867 | ImFontAtlasCustomRect& r = CustomRects[CustomRectIds[0]]; |
| 1868 | IM_ASSERT(r.ID == FONT_ATLAS_DEFAULT_TEX_DATA_ID); |
| 1869 | ImVec2 pos = FONT_ATLAS_DEFAULT_TEX_CURSOR_DATA[cursor_type][0] + ImVec2((float)r.X, (float)r.Y); |
| 1870 | ImVec2 size = FONT_ATLAS_DEFAULT_TEX_CURSOR_DATA[cursor_type][1]; |
| 1871 | *out_size = size; |
| 1872 | *out_offset = FONT_ATLAS_DEFAULT_TEX_CURSOR_DATA[cursor_type][2]; |
| 1873 | out_uv_border[0] = (pos) * TexUvScale; |
| 1874 | out_uv_border[1] = (pos + size) * TexUvScale; |
| 1875 | pos.x += FONT_ATLAS_DEFAULT_TEX_DATA_W_HALF + 1; |
| 1876 | out_uv_fill[0] = (pos) * TexUvScale; |
| 1877 | out_uv_fill[1] = (pos + size) * TexUvScale; |
| 1878 | return true; |
| 1879 | } |
| 1880 | |
| 1881 | bool ImFontAtlas::Build() |
| 1882 | { |
no test coverage detected