_growOutlinePoint(outline, 1);
outline.pts[outline.ptsCnt] = _transform(to, transform);
-
outline.types[outline.ptsCnt] = SW_CURVE_TYPE_POINT;
if (outline.ptsCnt > 0) {
_growOutlinePoint(*dash.outline, dash.outline->ptsCnt >> 1);
_growOutlineContour(*dash.outline, dash.outline->cntrsCnt >> 1);
- Bezier cur = { dash.ptCur, *ctrl1, *ctrl2, *to};
+ Bezier cur = {dash.ptCur, *ctrl1, *ctrl2, *to};
auto len = bezLength(cur);
if (len < dash.curLen) {
{
if (cnt < 2 || !dashPattern) return Result::InvalidArguments;
+ for (uint32_t i = 0; i < cnt; i++)
+ if (dashPattern[i] < FLT_EPSILON) return Result::InvalidArguments;
+
if (!pImpl->strokeDash(dashPattern, cnt)) return Result::FailedAllocation;
return Result::Success;
if (!pImpl->stroke) return 0;
if (dashPattern) *dashPattern = pImpl->stroke->dashPattern;
+
return pImpl->stroke->dashCnt;
}