max / makeover-immediate
- Co-Authored-By
- Claude Opus 5 (1M context) <noreply@anthropic.com>
1 file changed,
+11 insertions,
-1 deletion
| @@ -2,7 +2,7 @@ | |||
| 2 | 2 | //! | |
| 3 | 3 | //! <!-- wiki: makeover-immediate --> | |
| 4 | 4 | //! | |
| 5 | - | //! Named for the mode, not the library, the way [`makeover-tui`] is named for | |
| 5 | + | //! Named for the mode, not the library, the way `makeover-tui` is named for | |
| 6 | 6 | //! the target and not for ratatui. Immediate mode is the constraint that | |
| 7 | 7 | //! actually separates this renderer from the other two, and egui is the | |
| 8 | 8 | //! backend it is written against. | |
| @@ -146,6 +146,16 @@ | |||
| 146 | 146 | /// | |
| 147 | 147 | /// Two three-point polylines meeting at opposite corners, rather than four | |
| 148 | 148 | /// segments, so egui mitres the corner joins instead of leaving a notch. | |
| 149 | + | /// | |
| 150 | + | /// The dark polyline is drawn second, so the two corners where the runs meet | |
| 151 | + | /// take its tone. That is the right answer here rather than a concession. | |
| 152 | + | /// [`makeover_layout::Bevel`] holds those corners to belong to both edges, and | |
| 153 | + | /// a renderer with room to divide one should; at the default one-point stroke | |
| 154 | + | /// the corner is a one-point square, so the division is sub-pixel and | |
| 155 | + | /// antialiasing resolves it to the same blend the mitre already gives. Splitting | |
| 156 | + | /// it would add a seam and no information. `makeover-tui` does split, because a | |
| 157 | + | /// terminal cell is large enough that not splitting costs a visible cell of edge | |
| 158 | + | /// weight — the same rule, at a resolution where it has something to say. | |
| 149 | 159 | pub fn paint_bevel(painter: &Painter, rect: Rect, bevel: Bevel, palette: &Palette, stroke: f32) { | |
| 150 | 160 | let (top_left, bottom_right) = bevel.edges(); | |
| 151 | 161 |