DrawList: rename ImDrawListFlags_NoTextPixelSnap -> ImDrawListFlags_TextNoPixelSnap. (#3437, #9417, #2291)
Amend 1d33ea9
This commit is contained in:
+1
-1
@@ -59,7 +59,7 @@ Other Changes:
|
|||||||
imprecisions altering the result by 1 even at relatively small width. (#791)
|
imprecisions altering the result by 1 even at relatively small width. (#791)
|
||||||
- DrawList:
|
- DrawList:
|
||||||
- Minor optimization to `AddLine()`, `AddLineH()`, `AddLineV()` functions. (#4091)
|
- Minor optimization to `AddLine()`, `AddLineH()`, `AddLineV()` functions. (#4091)
|
||||||
- Added `ImDrawListFlags_NoTextPixelSnap` to disable snapping of AddText()
|
- Added `ImDrawListFlags_TextNoPixelSnap` to disable snapping of AddText()
|
||||||
coordinates for a given scope. (#3437, #9417, #2291)
|
coordinates for a given scope. (#3437, #9417, #2291)
|
||||||
- Demo:
|
- Demo:
|
||||||
- Extract 'Widgets->Tree Nodes->Selectable Nodes' out of the 'Advanced'
|
- Extract 'Widgets->Tree Nodes->Selectable Nodes' out of the 'Advanced'
|
||||||
|
|||||||
@@ -3279,7 +3279,7 @@ enum ImDrawListFlags_
|
|||||||
ImDrawListFlags_AntiAliasedLinesUseTex = 1 << 1, // Enable anti-aliased lines/borders using textures when possible. Require backend to render with bilinear filtering (NOT point/nearest filtering).
|
ImDrawListFlags_AntiAliasedLinesUseTex = 1 << 1, // Enable anti-aliased lines/borders using textures when possible. Require backend to render with bilinear filtering (NOT point/nearest filtering).
|
||||||
ImDrawListFlags_AntiAliasedFill = 1 << 2, // Enable anti-aliased edge around filled shapes (rounded rectangles, circles).
|
ImDrawListFlags_AntiAliasedFill = 1 << 2, // Enable anti-aliased edge around filled shapes (rounded rectangles, circles).
|
||||||
ImDrawListFlags_AllowVtxOffset = 1 << 3, // Can emit 'VtxOffset > 0' to allow large meshes. Set when 'ImGuiBackendFlags_RendererHasVtxOffset' is enabled.
|
ImDrawListFlags_AllowVtxOffset = 1 << 3, // Can emit 'VtxOffset > 0' to allow large meshes. Set when 'ImGuiBackendFlags_RendererHasVtxOffset' is enabled.
|
||||||
ImDrawListFlags_NoTextPixelSnap = 1 << 4, // [Internal] Disable automatically snapping AddText() calls to pixel boundaries.
|
ImDrawListFlags_TextNoPixelSnap = 1 << 4, // [Internal] Disable automatically snapping AddText() calls to pixel boundaries.
|
||||||
};
|
};
|
||||||
|
|
||||||
// Draw command list
|
// Draw command list
|
||||||
|
|||||||
+2
-2
@@ -5766,7 +5766,7 @@ void ImFont::RenderChar(ImDrawList* draw_list, float size, const ImVec2& pos, Im
|
|||||||
float scale = (size >= 0.0f) ? (size / baked->Size) : 1.0f;
|
float scale = (size >= 0.0f) ? (size / baked->Size) : 1.0f;
|
||||||
float x = pos.x;
|
float x = pos.x;
|
||||||
float y = pos.y;
|
float y = pos.y;
|
||||||
if ((draw_list->Flags & ImDrawListFlags_NoTextPixelSnap) == 0)
|
if ((draw_list->Flags & ImDrawListFlags_TextNoPixelSnap) == 0)
|
||||||
{
|
{
|
||||||
x = IM_TRUNC(x);
|
x = IM_TRUNC(x);
|
||||||
y = IM_TRUNC(y);
|
y = IM_TRUNC(y);
|
||||||
@@ -5808,7 +5808,7 @@ begin:
|
|||||||
float y = pos.y;
|
float y = pos.y;
|
||||||
if (y > clip_rect.w)
|
if (y > clip_rect.w)
|
||||||
return;
|
return;
|
||||||
if ((draw_list->Flags & ImDrawListFlags_NoTextPixelSnap) == 0)
|
if ((draw_list->Flags & ImDrawListFlags_TextNoPixelSnap) == 0)
|
||||||
{
|
{
|
||||||
x = IM_TRUNC(x);
|
x = IM_TRUNC(x);
|
||||||
y = IM_TRUNC(y);
|
y = IM_TRUNC(y);
|
||||||
|
|||||||
Reference in New Issue
Block a user