Fix bug 59175

This commit is contained in:
Oleg Korshul
2022-09-29 19:50:17 +03:00
parent 65a203838b
commit 3d71c4e609

View File

@ -615,6 +615,20 @@ namespace Aggplus
double dblMiterLimit = pPen->MiterLimit;
agg::path_storage path_copy(pPath->m_internal->m_agg_ps);
bool bIsUseIdentity = m_bIntegerGrid;
if (!bIsUseIdentity)
{
agg::trans_affine* full_trans = &m_oFullTransform.m_internal->m_agg_mtx;
if (full_trans->sx < 0.01 && full_trans->sy < 0.01)
{
path_copy.transform_all_paths(m_oFullTransform.m_internal->m_agg_mtx);
dWidth *= sqrt(full_trans->sx * full_trans->sy);
bIsUseIdentity = true;
}
}
typedef agg::conv_curve<agg::path_storage> conv_crv_type;
conv_crv_type c_c_path(path_copy);
@ -645,7 +659,7 @@ namespace Aggplus
}
agg::trans_affine* pAffine = &m_oFullTransform.m_internal->m_agg_mtx;
if (m_bIntegerGrid)
if (bIsUseIdentity)
pAffine = new agg::trans_affine();
if (DashStyleSolid == eStyle)
@ -751,7 +765,7 @@ namespace Aggplus
if (gamma >= 0)
m_rasterizer.gamma(1.0);
if (m_bIntegerGrid)
if (bIsUseIdentity)
RELEASEOBJECT(pAffine);
return Ok;