Merge pull request #28 from eliasnaur/master

Fix linewidth transformations
This commit is contained in:
Raph Levien 2020-08-24 09:10:31 -07:00 committed by GitHub
commit d5106e8a7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -373,7 +373,7 @@ void main() {
anno_stroke.rgba_color = stroke.rgba_color;
vec2 lw = get_linewidth(st);
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);
Annotated_Stroke_write(out_ref, anno_stroke);
break;