Ejemplo n.º 1
0
class IImage(interfaces.IRMLDirectiveSignature):
    """An image."""

    src = attr.Image(
        title=u'Image Source',
        description=u'The file that is used to extract the image data.',
        onlyOpen=True,
        required=True)

    width = attr.Measurement(title=u'Image Width',
                             description=u'The width of the image.',
                             required=False)

    height = attr.Measurement(title=u'Image Height',
                              description=u'The height the image.',
                              required=False)

    mask = attr.Color(title=u'Mask',
                      description=u'The color mask used to render the image.',
                      required=False)

    vAlign = attr.Choice(title=u'Vertical Alignment',
                         description=u'The vertical alignment of the image.',
                         choices=interfaces.VALIGN_TEXT_CHOICES,
                         required=False)
Ejemplo n.º 2
0
class IImage(interfaces.IRMLDirectiveSignature):
    """Draws an external image on the canvas."""

    file = attr.Image(
        title='File',
        description=('Reference to the external file of the iamge.'),
        required=True)

    x = attr.Measurement(
        title='X-Coordinate',
        description=('The X-coordinate of the lower-left position of the '
                     'shape.'),
        required=True)

    y = attr.Measurement(
        title='Y-Coordinate',
        description=('The Y-coordinate of the lower-left position of the '
                     'shape.'),
        required=True)

    width = attr.Measurement(title='Width',
                             description='The width of the image.',
                             required=False)

    height = attr.Measurement(title='Height',
                              description='The height of the image.',
                              required=False)

    showBoundary = attr.Boolean(
        title='Show Boundary',
        description=('A flag determining whether a border should be drawn '
                     'around the image.'),
        default=False,
        required=False)

    preserveAspectRatio = attr.Boolean(
        title='Preserve Aspect Ratio',
        description=("A flag determining whether the image's aspect ration "
                     "should be conserved under any circumstances."),
        default=False,
        required=False)

    mask = attr.Color(
        title='Mask',
        description=
        'The color mask used to render the image, or "auto" to use the alpha channel if available.',
        default='auto',
        required=False,
        acceptAuto=True)
Ejemplo n.º 3
0
class IImageAndFlowables(interfaces.IRMLDirectiveSignature):
    """An image with flowables around it."""

    imageName = attr.Image(
        title=u'Image',
        description=u'The file that is used to extract the image data.',
        onlyOpen=True,
        required=True)

    imageWidth = attr.Measurement(
        title=u'Image Width',
        description=u'The width of the image.',
        required=False)

    imageHeight = attr.Measurement(
        title=u'Image Height',
        description=u'The height the image.',
        required=False)

    imageMask = attr.Color(
        title=u'Mask',
        description=u'The height the image.',
        required=False)

    imageLeftPadding = attr.Measurement(
        title=u'Image Left Padding',
        description=u'The padding on the left side of the image.',
        required=False)

    imageRightPadding = attr.Measurement(
        title=u'Image Right Padding',
        description=u'The padding on the right side of the image.',
        required=False)

    imageTopPadding = attr.Measurement(
        title=u'Image Top Padding',
        description=u'The padding on the top of the image.',
        required=False)

    imageBottomPadding = attr.Measurement(
        title=u'Image Bottom Padding',
        description=u'The padding on the bottom of the image.',
        required=False)

    imageSide = attr.Choice(
        title=u'Image Side',
        description=u'The side at which the image will be placed.',
        choices=('left', 'right'),
        required=False)
Ejemplo n.º 4
0
class IImage(interfaces.IRMLDirectiveSignature):
    """An image."""

    src = attr.Image(
        title=u'Image Source',
        description=u'The file that is used to extract the image data.',
        onlyOpen=True,
        required=True)

    width = attr.Measurement(
        title=u'Image Width',
        description=u'The width of the image.',
        required=False)

    height = attr.Measurement(
        title=u'Image Height',
        description=u'The height the image.',
        required=False)

    preserveAspectRatio = attr.Boolean(
        title=u'Preserve Aspect Ratio',
        description=(u'If set, the aspect ratio of the image is kept. When '
                     u'both, width and height, are specified, the image '
                     u'will be fitted into that bounding box.'),
        default=False,
        required=False)

    mask = attr.Color(
        title=u'Mask',
        description=u'The color mask used to render the image.',
        required=False)

    align = attr.Choice(
        title=u'Alignment',
        description=u'The alignment of the image within the frame.',
        choices=interfaces.ALIGN_TEXT_CHOICES,
        required=False)

    vAlign = attr.Choice(
        title=u'Vertical Alignment',
        description=u'The vertical alignment of the image.',
        choices=interfaces.VALIGN_TEXT_CHOICES,
        required=False)
Ejemplo n.º 5
0
class IImage(interfaces.IRMLDirectiveSignature):
    """Draws an external image on the canvas."""

    file = attr.Image(
        title=u'File',
        description=(u'Reference to the external file of the iamge.'),
        required=True)

    x = attr.Measurement(
        title=u'X-Coordinate',
        description=(u'The X-coordinate of the lower-left position of the '
                     u'shape.'),
        required=True)

    y = attr.Measurement(
        title=u'Y-Coordinate',
        description=(u'The Y-coordinate of the lower-left position of the '
                     u'shape.'),
        required=True)

    width = attr.Measurement(title=u'Width',
                             description=u'The width of the image.',
                             required=False)

    height = attr.Measurement(title=u'Height',
                              description=u'The height of the image.',
                              required=False)

    showBoundary = attr.Boolean(
        title=u'Show Boundary',
        description=(u'A flag determining whether a border should be drawn '
                     u'around the image.'),
        default=False,
        required=False)

    preserveAspectRatio = attr.Boolean(
        title=u'Preserve Aspect Ratio',
        description=(u"A flag determining whether the image's aspect ration "
                     u"should be conserved under any circumstances."),
        default=False,
        required=False)