mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-10 20:51:29 +11:00
Fix linewidth transformations
The transformation determinant is signed, but we're only interested in the absolute scale for transforming linewidths. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
parent
72e2dfab3d
commit
cfd57361c4
|
@ -373,7 +373,7 @@ void main() {
|
||||||
anno_stroke.rgba_color = stroke.rgba_color;
|
anno_stroke.rgba_color = stroke.rgba_color;
|
||||||
vec2 lw = get_linewidth(st);
|
vec2 lw = get_linewidth(st);
|
||||||
anno_stroke.bbox = st.bbox + vec4(-lw, lw);
|
anno_stroke.bbox = st.bbox + vec4(-lw, lw);
|
||||||
anno_stroke.linewidth = st.linewidth * sqrt(st.mat.x * st.mat.w - st.mat.y * st.mat.z);
|
anno_stroke.linewidth = st.linewidth * sqrt(abs(st.mat.x * st.mat.w - st.mat.y * st.mat.z));
|
||||||
AnnotatedRef out_ref = AnnotatedRef((st.path_count - 1) * Annotated_size);
|
AnnotatedRef out_ref = AnnotatedRef((st.path_count - 1) * Annotated_size);
|
||||||
Annotated_Stroke_write(out_ref, anno_stroke);
|
Annotated_Stroke_write(out_ref, anno_stroke);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue