fix(hatch): render weighted pattern strokes

Show styled boundaries only while selected.\n\nRefs #821
This commit is contained in:
Hakan Seven committed 2026-08-25 22:44:51 +03:00
1 parent 81de94fdbb
commit fd801fac1b
6 files changed
+55 -23

No files matched your search

+1 -3
View File
@@ -295,9 +295,7 @@ impl StorageHatchBatch {
// along-line phase.
let perp_step = fam.dy;
let along_step = fam.dx;
// Screen-space derivative drives 1-px line width
// in the shader; this stored field is unused.
let line_width = 0.0_f32;
let line_width = h.line_weight_px.max(1.0);
let period: f32 = fam.dashes.iter().map(|d| d.abs()).sum();
families.push(LineFamilyGpu {
cos_a: fam.angle_deg.to_radians().cos(),
+6 -1
View File
@@ -286,7 +286,12 @@ impl TextureHatch {
texels.push([angle_r.cos(), angle_r.sin(), fam.x0, fam.y0]);
texels.push([fam.dx, fam.dy, fam.dy, fam.dx]);
// Counts as exact f32 (small integers → no denormal/bitcast risk).
texels.push([0.0, period, n_dashes as f32, dash_rel as f32]);
texels.push([
model.line_weight_px.max(1.0),
period,
n_dashes as f32,
dash_rel as f32,
]);
n_families += 1;
}
}