diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2014-09-02 22:51:20 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2014-09-17 12:06:07 +0200 |
commit | 76cfea4acb19ed99a31b84d1d6d3d83d1ac5f225 (patch) | |
tree | 4d6c257d8380da266af73f1332eb1f38bf3c49f7 /source/xps/xps-gradient.c | |
parent | 13e335fd06789a42369d03b2cad65818014f3f79 (diff) | |
download | mupdf-76cfea4acb19ed99a31b84d1d6d3d83d1ac5f225.tar.xz |
xps: Add fz_xml_is_tag to simplify tag matching.
Diffstat (limited to 'source/xps/xps-gradient.c')
-rw-r--r-- | source/xps/xps-gradient.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/xps/xps-gradient.c b/source/xps/xps-gradient.c index 76188e91..4c1d0851 100644 --- a/source/xps/xps-gradient.c +++ b/source/xps/xps-gradient.c @@ -51,7 +51,7 @@ xps_parse_gradient_stops(xps_document *doc, char *base_uri, fz_xml *node, count = 0; while (node && count < maxcount) { - if (!strcmp(fz_xml_tag(node), "GradientStop")) + if (fz_xml_is_tag(node, "GradientStop")) { char *offset = fz_xml_att(node, "Offset"); char *color = fz_xml_att(node, "Color"); @@ -463,13 +463,13 @@ xps_parse_gradient_brush(xps_document *doc, const fz_matrix *ctm, const fz_rect for (node = fz_xml_down(root); node; node = fz_xml_next(node)) { - if (!strcmp(fz_xml_tag(node), "LinearGradientBrush.Transform")) + if (fz_xml_is_tag(node, "LinearGradientBrush.Transform")) transform_tag = fz_xml_down(node); - if (!strcmp(fz_xml_tag(node), "RadialGradientBrush.Transform")) + if (fz_xml_is_tag(node, "RadialGradientBrush.Transform")) transform_tag = fz_xml_down(node); - if (!strcmp(fz_xml_tag(node), "LinearGradientBrush.GradientStops")) + if (fz_xml_is_tag(node, "LinearGradientBrush.GradientStops")) stop_tag = fz_xml_down(node); - if (!strcmp(fz_xml_tag(node), "RadialGradientBrush.GradientStops")) + if (fz_xml_is_tag(node, "RadialGradientBrush.GradientStops")) stop_tag = fz_xml_down(node); } |