diff --git a/src/z3c/rml/canvas.py b/src/z3c/rml/canvas.py index 6b2a78a..c41b761 100644 --- a/src/z3c/rml/canvas.py +++ b/src/z3c/rml/canvas.py @@ -343,7 +343,8 @@ class IImage(interfaces.IRMLDirectiveSignature): mask = attr.Color( title=u'Mask', - description=u'The color mask used to render the image.', + description=u'The color mask used to render the image, or "auto" to use the alpha channel if available.', + default='auto', required=False, acceptAuto=True) diff --git a/src/z3c/rml/flowable.py b/src/z3c/rml/flowable.py index f524880..e7ed956 100644 --- a/src/z3c/rml/flowable.py +++ b/src/z3c/rml/flowable.py @@ -903,7 +903,8 @@ class IImage(interfaces.IRMLDirectiveSignature): mask = attr.Color( title=u'Mask', - description=u'The color mask used to render the image.', + description=u'The color mask used to render the image, or "auto" to use the alpha channel if available.', + default='auto', required=False, acceptAuto=True) @@ -980,7 +981,8 @@ class IImageAndFlowables(interfaces.IRMLDirectiveSignature): imageMask = attr.Color( title=u'Mask', - description=u'The height the image.', + description=u'The color mask used to render the image, or "auto" to use the alpha channel if available.', + default='auto', required=False, acceptAuto=True) diff --git a/src/z3c/rml/tests/expected/tag-image-mask.pdf b/src/z3c/rml/tests/expected/tag-image-mask.pdf index d58726b..fea1360 100644 Binary files a/src/z3c/rml/tests/expected/tag-image-mask.pdf and b/src/z3c/rml/tests/expected/tag-image-mask.pdf differ diff --git a/src/z3c/rml/tests/input/tag-image-mask.rml b/src/z3c/rml/tests/input/tag-image-mask.rml index 4b2d42a..f91bfb2 100644 --- a/src/z3c/rml/tests/input/tag-image-mask.rml +++ b/src/z3c/rml/tests/input/tag-image-mask.rml @@ -1,13 +1,20 @@ - - + - + - + + + + diff --git a/src/z3c/rml/tests/test_rml.py b/src/z3c/rml/tests/test_rml.py index ba9c92d..8809630 100644 --- a/src/z3c/rml/tests/test_rml.py +++ b/src/z3c/rml/tests/test_rml.py @@ -134,9 +134,6 @@ def test_suite(): if not filename.endswith(".rml"): continue - if 'image-mask' not in filename: - continue - inPath = os.path.join(inputDir, filename) outPath = os.path.join(outputDir, filename[:-4] + '.pdf') expectPath = os.path.join(expectDir, filename[:-4] + '.pdf')