mirror of
https://github.com/ocornut/imgui.git
synced 2026-09-26 16:05:45 +03:00
Draw-List: amend SVG, AAEnds/NoAAEnds->AALineEnds.
parent
5f82786ba4
commit
72dc999c30
2 changed files with 7 additions and 7 deletions
|
|
@ -69,7 +69,7 @@ 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_MiterOnly**: 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_SquareCap**: Expands the ends of an open path so that they extend hand line thickess beyond the end points. Applies to `AddPolyline()`and `PathStroke()`.
|
||||
- **ImDrawFlags_AAEnds**: Enable rendering anti-aliased ends for lines. Slightly slower but also smoother, and prevents aliasing and missed pixels. Applies to `AddPolyline()`and `PathStroke()`.
|
||||
- **ImDrawFlags_AALineEnds**: Enable rendering anti-aliased ends for lines. Slightly slower but also smoother, and prevents aliasing and missed pixels. Applies to `AddPolyline()`and `PathStroke()`.
|
||||
|
||||

|
||||
|
||||
|
|
@ -462,7 +462,7 @@ The rendering uses textures for ant ialiasing for all line thicknesses. This all
|
|||
|
||||
If drawing a closed shape, you can omit the last segment and use flag `ImDrawFlags_Closed`. This will also create correct line joins between the first and last segment.
|
||||
|
||||
By default, the line ends are NOT anti-aliased for performance reasons. This can be turned on with flag `ImDrawFlags_AAEnds`.
|
||||
By default, the line ends are NOT anti-aliased for performance reasons. This can be turned on with flag `ImDrawFlags_AALineEnds`.
|
||||
|
||||
The line ends can have square caps using flag `ImDrawFlags_SquareCap`, which will extend the line by half thickness. This can help to render widgets at various sizes.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
<svg width="456" height="299" viewBox="0 0 456 299" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<rect width="456" height="299" fill="white"/>
|
||||
<svg width="456" height="319" viewBox="0 0 456 319" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<rect width="456" height="319" fill="white"/>
|
||||
<rect x="23" width="378" height="267" fill="url(#pattern0_300_7380)"/>
|
||||
<path opacity="0.5" d="M106.833 208.5C106.833 214.391 111.609 219.167 117.5 219.167C123.391 219.167 128.167 214.391 128.167 208.5C128.167 202.609 123.391 197.833 117.5 197.833C111.609 197.833 106.833 202.609 106.833 208.5ZM67.3333 58C67.3333 63.891 72.109 68.6667 78 68.6667C83.891 68.6667 88.6667 63.891 88.6667 58C88.6667 52.109 83.891 47.3333 78 47.3333C72.109 47.3333 67.3333 52.109 67.3333 58ZM78 58L76.0655 58.5077L77.053 62.2702L78.9875 61.7625L80.922 61.2548L79.9345 57.4923L78 58ZM80.9625 69.2875L79.028 69.7952L81.003 77.3202L82.9375 76.8125L84.872 76.3048L82.897 68.7798L80.9625 69.2875ZM84.9125 84.3375L82.978 84.8452L84.953 92.3702L86.8875 91.8625L88.822 91.3548L86.847 83.8298L84.9125 84.3375ZM88.8625 99.3875L86.928 99.8952L88.903 107.42L90.8375 106.912L92.772 106.405L90.797 98.8798L88.8625 99.3875ZM92.8125 114.438L90.878 114.945L92.853 122.47L94.7875 121.963L96.722 121.455L94.747 113.93L92.8125 114.438ZM96.7625 129.487L94.828 129.995L96.803 137.52L98.7375 137.012L100.672 136.505L98.697 128.98L96.7625 129.487ZM100.712 144.537L98.778 145.045L100.753 152.57L102.688 152.062L104.622 151.555L102.647 144.03L100.712 144.537ZM104.663 159.588L102.728 160.095L104.703 167.62L106.638 167.113L108.572 166.605L106.597 159.08L104.663 159.588ZM108.612 174.637L106.678 175.145L108.653 182.67L110.587 182.162L112.522 181.655L110.547 174.13L108.612 174.637ZM112.562 189.687L110.628 190.195L112.603 197.72L114.537 197.212L116.472 196.705L114.497 189.18L112.562 189.687ZM116.512 204.737L114.578 205.245L115.566 209.008L117.5 208.5L119.434 207.992L118.447 204.23L116.512 204.737Z" fill="black"/>
|
||||
<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">Normal</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">SquareCap</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">NoAAEnds</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="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">SquareCap
+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">
|
||||
<use xlink:href="#image0_300_7380" transform="scale(0.0026455 0.00374532)"/>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 9.1 KiB |
Loading…
Add table
Add a link
Reference in a new issue