]> granicus.if.org Git - imagemagick/commitdiff
WIP: fix line through z-index issue (#1630)
authorPIGNOSE <kenneth@pigno.se>
Tue, 9 Jul 2019 23:44:32 +0000 (08:44 +0900)
committerImageMagick <urban-warrior@users.noreply.github.com>
Tue, 9 Jul 2019 23:44:32 +0000 (19:44 -0400)
MagickCore/annotate.c

index eaf6b82246a5531b919b67ece6e6701d1e264068..c921100c683ee27bd21d0ec3b204f20bac1972fc 100644 (file)
@@ -526,19 +526,17 @@ MagickExport MagickBooleanType AnnotateImage(Image *image,
         (void) DrawImage(image,annotate_info,exception);
         break;
       }
-      case LineThroughDecoration:
-      {
+    }
+    status=RenderType(image,annotate,&offset,&metrics,exception);
+    if (status == MagickFalse)
+      break;
+
+    if (annotate->decorate == LineThroughDecoration) {
         annotate_info->affine.ty-=(draw_info->affine.sy*(height+
           metrics.underline_position+metrics.descent*2)/2.0);
         (void) CloneString(&annotate_info->primitive,primitive);
         (void) DrawImage(image,annotate_info,exception);
-      }
-      default:
-        break;
     }
-    status=RenderType(image,annotate,&offset,&metrics,exception);
-    if (status == MagickFalse)
-      break;
   }
   /*
     Relinquish resources.