You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// TODO[Prezmek]: another function named addPolylineConnectors_Internal and you pass a Range<PolylineConnectorInfo>, uint32_t currentPolylineConnectorObj, uint32_t mainObjIdx
155
-
// And implement it similar to addLines/QuadBeziers_Internal which is check how much memory is left and how many PolylineConnectors you can fit into the current geometry and drawobj memory left and return to the drawPolylinefunction
// TODO[Przemek]: this function will change a little as you'll be copying LinePointInfos instead of double2's
159
-
// Make sure to test with small memory to trigger submitInBetween function when you run out of memory to see if your changes here didn't mess things up, ask Lucas for help if you're not sure on how to do this
float ret = 1.0f + CPULineStyle::PatternEpsilon; // we stretch a little but more, this is to avoid clipped sdf numerical precision errors at the end of the line when we need it to be consistent (last pixels in a line or curve need to be in draw section or gap if end of pattern is in draw section or gap respectively)
211
+
float ret = 1.0f + LineStyleInfo::PatternEpsilon; // we stretch a little but more, this is to avoid clipped sdf numerical precision errors at the end of the line when we need it to be consistent (last pixels in a line or curve need to be in draw section or gap if end of pattern is in draw section or gap respectively)
212
212
if (stretchToFit)
213
213
{
214
214
constbool singleRigidSegment = rigidShapeSegment() && isSingleSegment(); // we shouldn't apply any stretching if we only have one rigid stipple segment(either all draw or all gap(invisible)
@@ -238,12 +238,12 @@ struct CPULineStyle
238
238
else
239
239
{
240
240
// here we calculate the stretch value so that the pattern ends when the line/curve ends.
241
-
// below `+ CPULineStyle::PhaseShiftEpsilon`, stretches the value a little more behaves as if arcLen is += epsilon * patternLen.
241
+
// below `+ LineStyleInfo::PhaseShiftEpsilon`, stretches the value a little more behaves as if arcLen is += epsilon * patternLen.
242
242
// because we need it to be consistent (last pixels in a line or curve need to be in draw section or gap if end of pattern is in draw section or gap respectively)
243
243
// example: when we need to fit a pattern onto a curve, and the pattern ends at a non-draw section
244
244
// the erros in the computations using phaseShift and stretch could incorrectly flag the last pixels of the curve to be in the pattern's next draw section but we needed it to end on a non draw section
245
245
// when stretching a little more it will ensure the clipping does it's job so that we don't get dots at the end of the line.
246
-
ret = static_cast<float>((arcLen * reciprocalStipplePatternLen + CPULineStyle::PatternEpsilon) / nSegments);
246
+
ret = static_cast<float>((arcLen * reciprocalStipplePatternLen + LineStyleInfo::PatternEpsilon) / nSegments);
@@ -981,7 +975,7 @@ class CPolyline : public CPolylineBase
981
975
// Manual CPU Styling: breaks the current polyline into more polylines based the stipple pattern
982
976
// we could output a list/vector of polylines instead of using lambda but most of the time we need to work with the output and throw it away immediately.
0 commit comments