tvg_saver: fix the stroke width scaling factor

To get the scaling factor from the transformation matrix we have
to use two of its elements.
This commit is contained in:
Mira Grudzinska 2021-09-08 09:47:57 +02:00 committed by Mira Grudzinska
parent b495f04ef4
commit 288c9f5c1d

View file

@ -451,7 +451,7 @@ TvgBinCounter TvgSaver::serializeStroke(const Shape* shape, const Matrix* pTrans
//width
auto width = shape->strokeWidth();
if (preTransform) width *= pTransform->e11; //we know x/y scaling factors are same.
if (preTransform) width *= sqrt(pow(pTransform->e11, 2) + pow(pTransform->e21, 2)); //we know x/y scaling factors are same.
auto cnt = writeTagProperty(TVG_TAG_SHAPE_STROKE_WIDTH, SIZE(width), &width);
//cap