mirror of
https://github.com/ocornut/imgui.git
synced 2026-09-26 16:05:45 +03:00
Renamed drawlist flags for 1.93
# Conflicts: # Draw-List.md
parent
99e1799297
commit
2606d63008
3 changed files with 7 additions and 5 deletions
|
|
@ -68,6 +68,7 @@ The Default Stroke Position may be overidden by passing one of the dedicated `Im
|
|||

|
||||
|
||||
## Stroke Options
|
||||
|
||||
- **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()`.
|
||||
|
|
@ -468,7 +469,7 @@ The line ends can have square caps using flag `ImDrawFlags_CapSquare`, which wil
|
|||
|
||||

|
||||
|
||||
Shapes that do not have very sharp corners, can use `ImDrawFlags_MiterOnly` draw flag for faster rendering. When this flag is set, some safety measures are skipeed, like beveling sharp corners. A good rule of thumb is that if your shape has 90 degree or rounded corners, you should be able to use this flag.
|
||||
Shapes that do not have very sharp corners, can use `ImDrawFlags_JoinMiter` draw flag for faster rendering. When this flag is set, some safety measures are skipeed, like beveling sharp corners. A good rule of thumb is that if your shape has 90 degree or rounded corners, you should be able to use this flag.
|
||||
|
||||
#### Stroke Position
|
||||
|
||||
|
|
@ -509,7 +510,7 @@ The polygon must be wound in clock wise order, the shape must be convex and does
|
|||
|
||||
The rendering expands small faded fringe around the polygon for anti-aliasing. To keep the expansion robust, the polygon rendering bevels really sharp corners, and clamps long miters in inner corners. As the fringe is 1px wide, it can cause issues when trying to render long thin polygons whose smallest extent is less than 1px.
|
||||
|
||||
Shapes that do not have very sharp corners, can use `ImDrawFlags_MiterOnly` draw flag for faster rendering. When this flag is set, some safety measures are skipped, like beveling sharp corners. A good rule of thumb is that if your shape has 90 degree or rounded corners, you should be able to use this flag.
|
||||
Shapes that do not have very sharp corners, can use `ImDrawFlags_JoinMiter` draw flag for faster rendering. When this flag is set, some safety measures are skipped, like beveling sharp corners. A good rule of thumb is that if your shape has 90 degree or rounded corners, you should be able to use this flag.
|
||||
|
||||
<details>
|
||||
<summary><b>🚧 Changes from versions < 1.93</b></summary>
|
||||
|
|
@ -717,7 +718,7 @@ AddPolyline()
|
|||
- New: N*2 vtx, (N-1)*2 tris | No bevel, closed, no-AA e.g for N=6: 12 vtx, 10 tris
|
||||
- New: N*2+4 v, (N-1)*2+4 tris | No bevel, open e.g for N=6: 16 vtx, 14 tris
|
||||
- New: N*4+4 v, (N-1)*5+4 tris | All bevels, open e.g for N=6: 28 vtx, 29 tris (theorical max)
|
||||
(PS: ImDrawFlags_MiterOnly implies no bevel. Each bevels adds +2 vtx, +3 tris)
|
||||
(PS: ImDrawFlags_JoinMiter implies no bevel. Each bevels adds +2 vtx, +3 tris)
|
||||
|
||||
AddBezierCubic()
|
||||
AddBezierQuadratic()
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@
|
|||
<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">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="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="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 |
|
|
@ -38,6 +38,6 @@
|
|||
<circle cx="357.389" cy="222" r="7" fill="black"/>
|
||||
<circle cx="357.389" cy="38" r="7" fill="black"/>
|
||||
<circle cx="357.389" cy="38" r="7" fill="black"/>
|
||||
<text fill="black" style="white-space: pre" xml:space="preserve" font-family="Arial" font-size="16" font-weight="bold" letter-spacing="0em"><tspan x="231" y="280.547">MiterOnly</tspan></text>
|
||||
<text fill="black" style="white-space: pre" xml:space="preserve" font-family="Arial" font-size="16" font-weight="bold" letter-spacing="0em"><tspan x="231" y="280.547">JoinMiter</tspan></text>
|
||||
<text fill="black" style="white-space: pre" xml:space="preserve" font-family="Arial" font-size="16" font-weight="bold" letter-spacing="0em"><tspan x="592" y="280.547">Default</tspan></text>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
Loading…
Add table
Add a link
Reference in a new issue