]> O.S.I.I.S - jp/vkvg.git/commitdiff
cancel stroke with dash_invalid status if all dashes are 0
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Fri, 31 Jan 2020 09:30:13 +0000 (10:30 +0100)
committerj-p <jp_bruyere@hotmail.com>
Tue, 5 May 2020 20:14:27 +0000 (22:14 +0200)
appveyor.yml
src/vkvg_context.c

index 9543188ee5947415c8aab31ac88e442309e03366..c627c530784c02e3ef65ce4d613b7405f642ba0c 100644 (file)
@@ -34,7 +34,7 @@ for:
         - msbuild vkvg.sln /p:Configuration=Debug /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
     after_build:
         - cd ..
-        - 7z a vkvg.zip build\*.dll build\*.lib build\*.exe
+        - 7z a vkvg.zip build\*.*
 
   -
     matrix:
index a2a0cb534a7be24fc72c2fc9869d9b0a7c855ca1..b6a405260db13b8adf596121ec13419e6e7087bc 100644 (file)
@@ -374,7 +374,6 @@ void vkvg_arc (VkvgContext ctx, float xc, float yc, float radius, float a1, floa
     vec2 v = {cosf(a1)*radius + xc, sinf(a1)*radius + yc};
 
     float step = _get_arc_step(ctx, radius);
-    printf ("steps: %.2f\n", 2.f*M_PIF/step);
     float a = a1;
 
     if (_current_path_is_empty(ctx))
@@ -717,9 +716,13 @@ void vkvg_stroke_preserve (VkvgContext ctx)
             float totDashLength = 0;
             for (uint32_t i=0;i<ctx->dashCount;i++)
                 totDashLength+=ctx->dashes[i];
-            if (EQUF(ctx->dashOffset, 0)||EQUF(totDashLength, 0))
+            if (totDashLength == 0){
+                ctx->status = VKVG_STATUS_INVALID_DASH;
+                return;
+            }
+            /*if (ctx->dashOffset == 0)
                 curDashOffset = 0;
-            else
+            else*/
                 curDashOffset = fmodf(ctx->dashOffset, totDashLength);  //cur dash offset between defined path point and last dash segment(on/off) start
             //-----