Updated Draw-List, added Rounding image

ocornut 2026-10-01 17:09:13 +02:00
parent e030874344
commit 40d8937a58
3 changed files with 27 additions and 8 deletions

@ -41,6 +41,7 @@ When not specified and `rounding` > 0, the default is **ImDrawFlags_RoundCorners
- **ImDrawFlags_RoundCornersLeft**: round left top and bottom corners
- **ImDrawFlags_RoundCornersRight**: round right top and bottom corners
![Corner rounding](drawlist/rect_corner_rounding.svg)
### Stroke Position
@ -73,17 +74,14 @@ The Default Stroke Position may be overidden by passing one of the dedicated `Im
- **ImDrawFlags_Closed**: This option closes the path by drawing a line from first to last point. Applies to `AddPolyline()`and `PathStroke()`
- **ImDrawFlags_JoinMiter**: This option chooses a fast path in the rendering and skips logic that tried to handle very sharp corners. Can be used for well behaved shapes to speed up rendering. Applies to all stroked shapes.
- **ImDrawFlags_CapSquare**: Expands the ends of an open path so that they extend hand line thickess beyond the end points. Applies to `AddPolyline()`and `PathStroke()`.
- **ImDrawFlags_AAFill**: Enable anti-aliasing for Filled shapes.
- **ImDrawFlags_AALines**: Enable anti-aliasing for Strokes.
- **ImDrawFlags_AALineEnds**: Enable anti-aliasing for Strokes Ends. Slightly slower but also smoother, and prevents aliasing and missed pixels. Applies to `AddPolyline()`and `PathStroke()`.
![Line flags](drawlist/line_flags.svg)
![Miter Only](drawlist/miter_only.svg)
### Anti-Aliasing
- **ImDrawFlags_AAFill**: Enable anti-aliasing for Filled shapes.
- **ImDrawFlags_AALines**: Enable anti-aliasing for Strokes.
- **ImDrawFlags_AALineEnds**: Enable anti-aliasing for Strokes Ends. Slightly slower but also smoother, and prevents aliasing and missed pixels. Applies to `AddPolyline()`and `PathStroke()`.
### Other
- **ImDrawFlags_UseTexForRoundCorners**: Enable using textures instead of strokes to draw rounded corners/circles where possible (faster). Used by default unless 'ImFontAtlasFlags_NoBakedRoundCorners' is enabled in the font atlas.

@ -5,8 +5,10 @@
<path opacity="0.5" d="M224.833 208.5C224.833 214.391 229.609 219.167 235.5 219.167C241.391 219.167 246.167 214.391 246.167 208.5C246.167 202.609 241.391 197.833 235.5 197.833C229.609 197.833 224.833 202.609 224.833 208.5ZM185.333 58C185.333 63.891 190.109 68.6667 196 68.6667C201.891 68.6667 206.667 63.891 206.667 58C206.667 52.109 201.891 47.3333 196 47.3333C190.109 47.3333 185.333 52.109 185.333 58ZM196 58L194.066 58.5077L195.053 62.2702L196.988 61.7625L198.922 61.2548L197.934 57.4923L196 58ZM198.963 69.2875L197.028 69.7952L199.003 77.3202L200.938 76.8125L202.872 76.3048L200.897 68.7798L198.963 69.2875ZM202.912 84.3375L200.978 84.8452L202.953 92.3702L204.887 91.8625L206.822 91.3548L204.847 83.8298L202.912 84.3375ZM206.863 99.3875L204.928 99.8952L206.903 107.42L208.837 106.912L210.772 106.405L208.797 98.8798L206.863 99.3875ZM210.812 114.438L208.878 114.945L210.853 122.47L212.788 121.963L214.722 121.455L212.747 113.93L210.812 114.438ZM214.762 129.487L212.828 129.995L214.803 137.52L216.737 137.012L218.672 136.505L216.697 128.98L214.762 129.487ZM218.712 144.537L216.778 145.045L218.753 152.57L220.688 152.062L222.622 151.555L220.647 144.03L218.712 144.537ZM222.663 159.588L220.728 160.095L222.703 167.62L224.638 167.113L226.572 166.605L224.597 159.08L222.663 159.588ZM226.612 174.637L224.678 175.145L226.653 182.67L228.587 182.162L230.522 181.655L228.547 174.13L226.612 174.637ZM230.562 189.687L228.628 190.195L230.603 197.72L232.537 197.212L234.472 196.705L232.497 189.18L230.562 189.687ZM234.512 204.737L232.578 205.245L233.566 209.008L235.5 208.5L237.434 207.992L236.447 204.23L234.512 204.737Z" fill="black"/>
<path opacity="0.5" d="M344.833 208.5C344.833 214.391 349.609 219.167 355.5 219.167C361.391 219.167 366.167 214.391 366.167 208.5C366.167 202.609 361.391 197.833 355.5 197.833C349.609 197.833 344.833 202.609 344.833 208.5ZM305.333 58C305.333 63.891 310.109 68.6667 316 68.6667C321.891 68.6667 326.667 63.891 326.667 58C326.667 52.109 321.891 47.3333 316 47.3333C310.109 47.3333 305.333 52.109 305.333 58ZM316 58L314.066 58.5077L315.053 62.2702L316.988 61.7625L318.922 61.2548L317.934 57.4923L316 58ZM318.963 69.2875L317.028 69.7952L319.003 77.3202L320.938 76.8125L322.872 76.3048L320.897 68.7798L318.963 69.2875ZM322.912 84.3375L320.978 84.8452L322.953 92.3702L324.887 91.8625L326.822 91.3548L324.847 83.8298L322.912 84.3375ZM326.863 99.3875L324.928 99.8952L326.903 107.42L328.837 106.912L330.772 106.405L328.797 98.8798L326.863 99.3875ZM330.812 114.438L328.878 114.945L330.853 122.47L332.788 121.963L334.722 121.455L332.747 113.93L330.812 114.438ZM334.762 129.487L332.828 129.995L334.803 137.52L336.737 137.012L338.672 136.505L336.697 128.98L334.762 129.487ZM338.712 144.537L336.778 145.045L338.753 152.57L340.688 152.062L342.622 151.555L340.647 144.03L338.712 144.537ZM342.663 159.588L340.728 160.095L342.703 167.62L344.638 167.113L346.572 166.605L344.597 159.08L342.663 159.588ZM346.612 174.637L344.678 175.145L346.653 182.67L348.587 182.162L350.522 181.655L348.547 174.13L346.612 174.637ZM350.562 189.687L348.628 190.195L350.603 197.72L352.537 197.212L354.472 196.705L352.497 189.18L350.562 189.687ZM354.512 204.737L352.578 205.245L353.566 209.008L355.5 208.5L357.434 207.992L356.447 204.23L354.512 204.737Z" fill="black"/>
<text fill="#1E1E1E" style="white-space: pre" xml:space="preserve" font-family="Arial" font-size="16" font-weight="bold" letter-spacing="-0.011em"><tspan x="78" y="277.547">AALineEnds</tspan></text>
<text fill="#1E1E1E" style="white-space: pre" xml:space="preserve" font-family="Arial" font-size="16" font-weight="bold" letter-spacing="-0.011em"><tspan x="188" y="277.547">CapSquare
+AALineEnds</tspan></text>
<text fill="#1E1E1E" style="white-space: pre" xml:space="preserve" font-family="Arial" font-size="16" font-weight="bold" letter-spacing="-0.011em">
<tspan x="188" y="277.547">CapSquare</tspan>
<tspan x="188" dy="1.2em">+AALineEnds</tspan>
</text>
<text fill="#1E1E1E" style="white-space: pre" xml:space="preserve" font-family="Arial" font-size="16" font-weight="bold" letter-spacing="-0.011em"><tspan x="316" y="277.547">Normal</tspan></text>
<defs>
<pattern id="pattern0_300_7380" patternContentUnits="objectBoundingBox" width="1" height="1">

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

@ -0,0 +1,19 @@
<svg width="840" height="254" viewBox="0 0 840 254" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="840" height="254" fill="white"/>
<path d="M63 30H147A28 28 0 0 1 175 58V142A28 28 0 0 1 147 170H63A28 28 0 0 1 35 142V58A28 28 0 0 1 63 30Z" stroke="#1E1E1E" stroke-width="4" stroke-linejoin="miter"/>
<path d="M35 58A28 28 0 0 1 63 30" stroke="#F849C1" stroke-width="4" stroke-linecap="round"/>
<path d="M147 30A28 28 0 0 1 175 58" stroke="#F849C1" stroke-width="4" stroke-linecap="round"/>
<path d="M175 142A28 28 0 0 1 147 170" stroke="#F849C1" stroke-width="4" stroke-linecap="round"/>
<path d="M63 170A28 28 0 0 1 35 142" stroke="#F849C1" stroke-width="4" stroke-linecap="round"/>
<text fill="#1E1E1E" font-family="Arial" font-size="16" letter-spacing="-0.011em" text-anchor="middle"><tspan x="105" y="202">RoundCornersAll</tspan><tspan x="105" y="222" fill="#8A8A8A" font-size="14">(default when rounding&gt;0.0f)</tspan></text>
<path d="M273 30H357A28 28 0 0 1 385 58V170H245V58A28 28 0 0 1 273 30Z" stroke="#1E1E1E" stroke-width="4" stroke-linejoin="miter"/>
<path d="M245 58A28 28 0 0 1 273 30" stroke="#F849C1" stroke-width="4" stroke-linecap="round"/>
<path d="M357 30A28 28 0 0 1 385 58" stroke="#F849C1" stroke-width="4" stroke-linecap="round"/>
<text fill="#1E1E1E" font-family="Arial" font-size="16" letter-spacing="-0.011em" text-anchor="middle"><tspan x="315" y="202">RoundCornersTop</tspan></text>
<path d="M483 30H595V142A28 28 0 0 1 567 170H455V58A28 28 0 0 1 483 30Z" stroke="#1E1E1E" stroke-width="4" stroke-linejoin="miter"/>
<path d="M455 58A28 28 0 0 1 483 30" stroke="#F849C1" stroke-width="4" stroke-linecap="round"/>
<path d="M595 142A28 28 0 0 1 567 170" stroke="#F849C1" stroke-width="4" stroke-linecap="round"/>
<text fill="#1E1E1E" font-family="Arial" font-size="16" letter-spacing="-0.011em" text-anchor="middle"><tspan x="525" y="202">RoundCornersTopLeft |</tspan><tspan x="525" y="222">RoundCornersBottomRight</tspan></text>
<path d="M665 30H805V170H665V30Z" stroke="#1E1E1E" stroke-width="4" stroke-linejoin="miter"/>
<text fill="#1E1E1E" font-family="Arial" font-size="16" letter-spacing="-0.011em" text-anchor="middle"><tspan x="735" y="202">RoundCornersNone</tspan><tspan x="735" y="222" fill="#8A8A8A" font-size="14">(default when rounding=0.0f)</tspan></text>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB