sw_engine: the check if the stroke width > 0 after conversion its value from float to long

During stroke width interpolation, if the width value after conversion
to long was 0, the bbox size was undefined.
This commit is contained in:
Mira Grudzinska 2020-09-08 15:30:41 +02:00 committed by Hermet Park
parent 7c31d3f1e7
commit 5a21b3bd68

View file

@ -41,7 +41,7 @@ struct SwTask : Task
//Valid Stroking?
uint8_t strokeAlpha = 0;
auto strokeWidth = sdata->strokeWidth();
if (strokeWidth > FLT_EPSILON) {
if (TO_SWCOORD(strokeWidth * 0.5) > 0) {
sdata->strokeColor(nullptr, nullptr, nullptr, &strokeAlpha);
}