diff --git a/imgui.h b/imgui.h index ee1322cc2..9396b4b40 100644 --- a/imgui.h +++ b/imgui.h @@ -3244,11 +3244,11 @@ struct ImFontGlyphRangesBuilder // Data for texture-based rounded corners for a given radius struct ImFontRoundedCornerData { - ImVec4 TexUvFilled; // UV of filled round corner quad in the atlas (only valid when stroke width is 1) - ImVec4 TexUvStroked; // UV of stroked round corner quad in the atlas - float ParametricStrokeWidth; // Pre-calculated value for stroke width divided by the radius - int RectId; // Rect ID in the atlas, or -1 if there is no data - bool StrokedUsesAlternateUVs; // True if stroked drawing should use the alternate (i.e. other corner) UVs + ImVec4 TexUvFilled; // UV of filled round corner quad in the atlas (only valid when stroke width is 1) + ImVec4 TexUvStroked; // UV of stroked round corner quad in the atlas + float ParametricStrokeWidth; // Pre-calculated value for stroke width divided by the radius + int RectId; // Rect ID in the atlas, or -1 if there is no data + bool StrokedUsesAlternateUVs; // True if stroked drawing should use the alternate (i.e. other corner) UVs }; // See ImFontAtlas::AddCustomRectXXX functions. diff --git a/imgui_internal.h b/imgui_internal.h index 424973c49..8dcfe60a5 100644 --- a/imgui_internal.h +++ b/imgui_internal.h @@ -795,7 +795,6 @@ struct IMGUI_API ImDrawListSharedData ImU8 CircleSegmentCounts[64]; // Precomputed segment count for given radius before we calculate it dynamically (to avoid calculation overhead) const ImVec4* TexUvLines; // UV of anti-aliased lines in the atlas - // FIXME-ROUNDCORNERS: WIP + need to remove CircleVtx12 before PR ImVector* TexRoundCornerData; // Data for texture-based rounded corners, indexed by radius ImDrawListSharedData(); @@ -3683,11 +3682,11 @@ IMGUI_API void ImFontAtlasBuildMultiplyRectAlpha8(const unsigned char table // Note that stroke width increases effective radius, so (e.g.) a max radius circle will have to use the fallback path if stroke width is > 1 const int ImFontAtlasRoundCornersMaxSize = 32; // Maximum size of rounded corner texture to generate in fonts -const int ImFontAtlasRoundCornersMaxStrokeWidth = 5; // Maximum stroke width of rounded corner texture to generate in fonts -// Bit mask for which stroke widths should have textures generated for them (the default of 0xD means widths 1, 2 and 4) +const int ImFontAtlasRoundCornersMaxStrokeWidth = 4; // Maximum stroke width of rounded corner texture to generate in fonts +// Bit mask for which stroke widths should have textures generated for them (the default of 0x0B means widths 1, 2 and 4) // Only bits up to ImFontAtlasRoundCornersMaxStrokeWidth are considered, and bit 0 (stroke width 1) must always be set // Optimally there should be an odd number of bits set, as the texture packing packs the data in pairs, with one half of one pair being occupied by the filled texture -const int ImFontAtlasRoundCornersStrokeWidthMask = 0xD; +const int ImFontAtlasRoundCornersStrokeWidthMask = 0x0B; //----------------------------------------------------------------------------- // [SECTION] Test Engine specific hooks (imgui_test_engine)