mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-22 20:07:01 +00:00
Texture-based round corners: Fix UV coordinates used by RenderWindowResizeGrip() - render was broken
This commit is contained in:
parent
05d9502075
commit
a6fa56609b
@ -4686,7 +4686,8 @@ bool ImGui::RenderWindowResizeGrip(ImDrawList* draw_list, const ImVec2& corner,
|
|||||||
// - uv[0] is the mid-point from the corner towards the center of the circle (solid)
|
// - uv[0] is the mid-point from the corner towards the center of the circle (solid)
|
||||||
// - uv[1] is a solid point on the edge of the circle
|
// - uv[1] is a solid point on the edge of the circle
|
||||||
// - uv[2] is the outer edge (blank, outside the circle)
|
// - uv[2] is the outer edge (blank, outside the circle)
|
||||||
const ImVec4& uvs = (*draw_list->_Data->TexRoundCornerData)[rad - 1].TexUvFilled;
|
const unsigned int index = (rad - 1) * ImFontAtlasRoundCornersMaxStrokeWidth;
|
||||||
|
const ImVec4& uvs = (*draw_list->_Data->TexRoundCornerData)[index].TexUvFilled;
|
||||||
const ImVec2 uv[] =
|
const ImVec2 uv[] =
|
||||||
{
|
{
|
||||||
ImVec2(ImLerp(uvs.x, uvs.z, 0.5f), ImLerp(uvs.y, uvs.w, 0.5f)),
|
ImVec2(ImLerp(uvs.x, uvs.z, 0.5f), ImLerp(uvs.y, uvs.w, 0.5f)),
|
||||||
|
Loading…
Reference in New Issue
Block a user