Esempio n. 1
0
class IValueAxis(IAxis):

    forceZero = attr.Boolean(
        title=u'Force Zero',
        description=u'When set, the range will contain the origin.',
        required=False)

    minimumTickSpacing = attr.Measurement(
        title=u'Minimum Tick Spacing',
        description=u'The minimum distance between ticks.',
        required=False)

    maximumTicks = attr.Integer(
        title=u'Maximum Ticks',
        description=u'The maximum number of ticks to be shown.',
        required=False)

    labelTextFormat = attr.String(
        title=u'Label Text Format',
        description=u'Formatting string for axis labels.',
        required=False)

    labelTextPostFormat = attr.Text(
        title=u'Label Text Post Format',
        description=u'An additional formatting string.',
        required=False)

    labelTextScale = attr.Float(
        title=u'Label Text Scale',
        description=u'The sclaing factor for the label tick values.',
        required=False)

    valueMin = attr.Float(title=u'Minimum Value',
                          description=u'The smallest value on the axis.',
                          required=False)

    valueMax = attr.Float(title=u'Maximum Value',
                          description=u'The largest value on the axis.',
                          required=False)

    valueStep = attr.Float(title=u'Value Step',
                           description=u'The step size between ticks',
                           required=False)

    valueSteps = attr.Measurement(
        title=u'Step Sizes',
        description=u'List of step sizes between ticks.',
        required=False)

    rangeRound = attr.Choice(
        title=u'Range Round',
        description=u'Method to be used to round the range values.',
        choices=('none', 'both', 'ceiling', 'floor'),
        required=False)

    zrangePref = attr.Float(title=u'Zero Range Preference',
                            description=u'Zero range axis limit preference.',
                            required=False)
Esempio n. 2
0
class IScale(interfaces.IRMLDirectiveSignature):
    """Scale the drawing using x and y scaling factors."""

    sx = attr.Float(
        title=u'X-Scaling-Factor',
        description=(u'The scaling factor applied on x-coordinates.'),
        required=True)

    sy = attr.Float(
        title=u'Y-Scaling-Factor',
        description=(u'The scaling factor applied on y-coordinates.'),
        required=True)
Esempio n. 3
0
class IBookmark(interfaces.IRMLDirectiveSignature):
    """
    This creates a bookmark to the current page which can be referred to with
    the given key elsewhere. (Used inside a page drawing.)
    """

    name = attr.Text(title=u'Name',
                     description=u'The name of the bookmark.',
                     required=True)

    fit = attr.Choice(title=u'Fit',
                      description=u'The Fit Type.',
                      choices=('XYZ', 'Fit', 'FitH', 'FitV', 'FitR'),
                      required=False)

    zoom = attr.Float(
        title=u'Zoom',
        description=u'The zoom level when clicking on the bookmark.',
        required=False)

    x = attr.Measurement(title=u'X-Position',
                         description=u'The x-position.',
                         required=False)

    y = attr.Measurement(title=u'Y-Position',
                         description=u'The y-position.',
                         required=False)
Esempio n. 4
0
class ISpoke(interfaces.IRMLDirectiveSignature):
    """A spoke in the spider diagram."""

    strokeWidth = attr.Measurement(
        title='Stroke Width',
        description="The width of the spoke's line.",
        required=False)

    fillColor = attr.Color(title='Fill Color',
                           description="The fill color of the spoke's area.",
                           required=False)

    strokeColor = attr.Color(title='Stroke Color',
                             description='The color of the spoke line.',
                             required=False)

    strokeDashArray = attr.Sequence(
        title='Stroke Dash Array',
        description='The dash array of the spoke line.',
        value_type=attr.Float(),
        required=False)

    labelRadius = attr.Measurement(
        title='Label Radius',
        description='The radius of the label arouns the spoke.',
        required=False)

    visible = attr.Boolean(title='Visible',
                           description='When true, the spoke line is drawn.',
                           required=False)
Esempio n. 5
0
class IStrandBase(interfaces.IRMLDirectiveSignature):

    strokeWidth = attr.Measurement(title='Stroke Width',
                                   description='The line width of the strand.',
                                   required=False)

    fillColor = attr.Color(title='Fill Color',
                           description='The fill color of the strand area.',
                           required=False)

    strokeColor = attr.Color(title='Stroke Color',
                             description='The color of the strand line.',
                             required=False)

    strokeDashArray = attr.Sequence(
        title='Stroke Dash Array',
        description='The dash array of the strand line.',
        value_type=attr.Float(),
        required=False)

    symbol = attr.Symbol(title='Symbol',
                         description='The symbol to use to mark the strand.',
                         required=False)

    symbolSize = attr.Measurement(title='Symbol Size',
                                  description='The size of the strand symbol.',
                                  required=False)
Esempio n. 6
0
class ILink(interfaces.IRMLDirectiveSignature):
    """Place an internal link around a set of flowables."""

    destination = attr.Text(
        title=u'Destination',
        description=u'The name of the destination to link to.',
        required=False)

    url = attr.Text(title=u'URL',
                    description=u'The URL to link to.',
                    required=False)

    boxStrokeWidth = attr.Measurement(
        title=u'Box Stroke Width',
        description=u'The width of the box border line.',
        required=False)

    boxStrokeDashArray = attr.Sequence(
        title=u'Box Stroke Dash Array',
        description=u'The dash array of the box border line.',
        value_type=attr.Float(),
        required=False)

    boxStrokeColor = attr.Color(
        title=u'Box Stroke Color',
        description=(u'The color in which the box border is drawn.'),
        required=False)
Esempio n. 7
0
class IPieChart3D(IPieChart):
    """A 3-D pie chart."""
    occurence.containing(occurence.One('slices', ISlices3D),
                         *IChart.queryTaggedValue('directives', ()))

    perspective = attr.Float(title='Perspsective',
                             description='The flattening parameter.',
                             required=False)

    depth_3d = attr.Measurement(title='3-D Depth',
                                description='The depth of the pie.',
                                required=False)

    angle_3d = attr.Float(title='3-D Angle',
                          description='The view angle in the Z-coordinate.',
                          required=False)
Esempio n. 8
0
class IColorDefinition(interfaces.IRMLDirectiveSignature):
    """Define a new color and give it a name to be known under."""

    id = attr.String(
        title=u'Id',
        description=(u'The id/name the color will be available under.'),
        required=True)

    RGB = attr.Color(
        title=u'RGB Color',
        description=(u'The color value that is represented.'),
        required=False)

    CMYK = attr.Color(
        title=u'CMYK Color',
        description=(u'The color value that is represented.'),
        required=False)

    value = attr.Color(
        title=u'Color',
        description=(u'The color value that is represented.'),
        required=False)

    spotName = attr.String(
        title=u'Spot Name',
        description=(u'The Spot Name of the CMYK color.'),
        required=False)

    density = attr.Float(
        title=u'Density',
        description=(u'The color density of the CMYK color.'),
        min=0.0,
        max=1.0,
        required=False)

    knockout = attr.String(
        title=u'Knockout',
        description=(u'The knockout of the CMYK color.'),
        required=False)

    alpha = attr.Float(
        title=u'Alpha',
        description=(u'The alpha channel of the color.'),
        min=0.0,
        max=1.0,
        required=False)
Esempio n. 9
0
class ISeries1D(interfaces.IRMLDirectiveSignature):
    """A one-dimensional series."""

    values = attr.TextNodeSequence(
        title='Values',
        description="Numerical values representing the series' data.",
        value_type=attr.Float(),
        required=True)
Esempio n. 10
0
class ISeries2D(interfaces.IRMLDirectiveSignature):
    """A two-dimensional series."""

    values = attr.TextNodeGrid(
        title='Values',
        description="Numerical values representing the series' data.",
        value_type=attr.Float(),
        columns=2,
        required=True)
Esempio n. 11
0
class ITransform(interfaces.IRMLDirectiveSignature):
    """A full 2-D matrix transformation"""

    matrix = attr.TextNodeSequence(title=u'Matrix',
                                   description=u'The transformation matrix.',
                                   value_type=attr.Float(),
                                   min_length=6,
                                   max_length=6,
                                   required=True)
Esempio n. 12
0
class IStrandLabel(IStrandLabelBase):
    """A label for a strand."""

    _text = attr.TextNode(title='Text',
                          description='The label text of the strand.',
                          required=False)

    dR = attr.Float(title='Radial Shift',
                    description='The radial shift of the label.',
                    required=False)
Esempio n. 13
0
class ILinePlot3D(ILinePlot):
    """Creates a three-dimensional line plot."""
    occurence.containing(*ILinePlot.queryTaggedValue('directives', ()))

    thetaX = attr.Float(title='Theta-X',
                        description='Fraction of dx/dz.',
                        required=False)

    thetaY = attr.Float(title='Theta-Y',
                        description='Fraction of dy/dz.',
                        required=False)

    zDepth = attr.Measurement(title='Z-Depth',
                              description='Depth of an individual series/bar.',
                              required=False)

    zSpace = attr.Measurement(title='Z-Space',
                              description='Z-Gap around a series/bar.',
                              required=False)
Esempio n. 14
0
class IBookmark(interfaces.IRMLDirectiveSignature):
    """
    This creates a bookmark to the current page which can be referred to with
    the given key elsewhere.

    PDF offers very fine grained control over how Acrobat reader is zoomed
    when people link to this. The default is to keep the user's current zoom
    settings. the last arguments may or may not be needed depending on the
    choice of 'fitType'.
    """

    name = attr.Text(
        title=u'Name',
        description=u'The name of the bookmark.',
        required=True)

    fitType = attr.Choice(
        title=u'Fit Type',
        description=u'The Fit Type.',
        choices=('Fit', 'FitH', 'FitV', 'FitR'),
        required=False)

    left = attr.Measurement(
        title=u'Left',
        description=u'The left position.',
        required=False)

    right = attr.Measurement(
        title=u'Right',
        description=u'The right position.',
        required=False)

    top = attr.Measurement(
        title=u'Top',
        description=u'The top position.',
        required=False)

    right = attr.Measurement(
        title=u'Right',
        description=u'The right position.',
        required=False)

    zoom = attr.Float(
        title=u'Zoom',
        description=u'The zoom level when clicking on the bookmark.',
        required=False)
Esempio n. 15
0
class IText(interfaces.IRMLDirectiveSignature):
    """Draw a text on the chart."""

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

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

    angle = attr.Float(
        title='Rotation Angle',
        description=('The angle about which the text will be rotated.'),
        required=False)

    text = attr.TextNode(title='Text',
                         description='The text to be printed.',
                         required=True)

    fontName = attr.Text(title='Font Name',
                         description='The name of the font.',
                         required=False)

    fontSize = attr.Measurement(title='Font Size',
                                description='The font size for the text.',
                                required=False)

    fillColor = attr.Color(
        title='Fill Color',
        description='The color in which the text will appear.',
        required=False)

    textAnchor = attr.Choice(
        title='Text Anchor',
        description='The position in the text to which the coordinates refer.',
        choices=('start', 'middle', 'end', 'boxauto'),
        required=False)
Esempio n. 16
0
class ILineBase(interfaces.IRMLDirectiveSignature):

    strokeWidth = attr.Measurement(title='Stroke Width',
                                   description='The width of the plot line.',
                                   required=False)

    strokeColor = attr.Color(title='Stroke Color',
                             description='The color of the plot line.',
                             required=False)

    strokeDashArray = attr.Sequence(
        title='Stroke Dash Array',
        description='The dash array of the plot line.',
        value_type=attr.Float(),
        required=False)

    symbol = attr.Symbol(
        title='Symbol',
        description='The symbol to be used for every data point in the plot.',
        required=False)
Esempio n. 17
0
class ISliceBase(interfaces.IRMLDirectiveSignature):

    strokeWidth = attr.Measurement(title='Stroke Width',
                                   description='The wodth of the slice line.',
                                   required=False)

    fillColor = attr.Color(title='Fill Color',
                           description='The fill color of the slice.',
                           required=False)

    strokeColor = attr.Color(title='Stroke Color',
                             description='The color of the pointer line.',
                             required=False)

    strokeDashArray = attr.Sequence(
        title='Stroke Dash Array',
        description='Teh dash array of the slice borderline.',
        value_type=attr.Float(),
        required=False)

    popout = attr.Measurement(
        title='Popout',
        description='The distance of how much the slice should be popped out.',
        required=False)

    fontName = attr.Text(title='Font Name',
                         description='The font name of the label.',
                         required=False)

    fontSize = attr.Measurement(title='Font Size',
                                description='The font size of the label.',
                                required=False)

    labelRadius = attr.Measurement(
        title='Label Radius',
        description=('The radius at which the label should be placed around '
                     'the pie.'),
        required=False)
Esempio n. 18
0
class IBaseParagraphStyle(ISpanStyle):

    leading = attr.Measurement(
        title=u'Leading',
        description=(u'The height of a single paragraph line. It includes '
                     u'character height.'),
        required=False)

    leftIndent = attr.Measurement(
        title=u'Left Indentation',
        description=u'General indentation on the left side.',
        required=False)

    rightIndent = attr.Measurement(
        title=u'Right Indentation',
        description=u'General indentation on the right side.',
        required=False)

    firstLineIndent = attr.Measurement(
        title=u'First Line Indentation',
        description=u'The indentation of the first line in the paragraph.',
        required=False)

    alignment = attr.Choice(title=u'Alignment',
                            description=u'The text alignment.',
                            choices=interfaces.ALIGN_CHOICES,
                            required=False)

    spaceBefore = attr.Measurement(
        title=u'Space Before',
        description=u'The vertical space before the paragraph.',
        required=False)

    spaceAfter = attr.Measurement(
        title=u'Space After',
        description=u'The vertical space after the paragraph.',
        required=False)

    bulletFontName = attr.String(
        title=u'Bullet Font Name',
        description=u'The font in which the bullet character will be rendered.',
        required=False)

    bulletFontSize = attr.Measurement(
        title=u'Bullet Font Size',
        description=u'The font size of the bullet character.',
        required=False)

    bulletIndent = attr.Measurement(
        title=u'Bullet Indentation',
        description=u'The indentation that is kept for a bullet point.',
        required=False)

    wordWrap = attr.String(
        title=u'Word Wrap Method',
        description=(u'When set to "CJK", invoke CJK word wrapping'),
        required=False)

    borderWidth = attr.Measurement(
        title=u'Paragraph Border Width',
        description=u'The width of the paragraph border.',
        required=False)

    borderPadding = attr.Padding(title=u'Paragraph Border Padding',
                                 description=u'Padding of the paragraph.',
                                 required=False)

    borderColor = attr.Color(
        title=u'Border Color',
        description=u'The color in which the paragraph border will appear.',
        required=False)

    borderRadius = attr.Measurement(
        title=u'Paragraph Border Radius',
        description=u'The radius of the paragraph border.',
        required=False)

    allowWidows = attr.Boolean(title=u'Allow Widows',
                               description=(u'Allow widows.'),
                               required=False)

    allowOrphans = attr.Boolean(title=u'Allow Orphans',
                                description=(u'Allow orphans.'),
                                required=False)

    textTransforms = attr.Choice(title=u'Text Transforms',
                                 description=u'Text transformations.',
                                 choices=interfaces.TEXT_TRANSFORM_CHOICES,
                                 required=False)

    endDots = attr.String(
        title=u'End Dots',
        description=u'Characters/Dots at the end of a paragraph.',
        required=False)

    splitLongWords = attr.Boolean(
        title=u'Split Long Words',
        description=(u'Try to split long words at the end of a line.'),
        default=True,
        required=False)

    underlineProportion = attr.Float(
        title=u'Underline Proportion',
        description=(u'When set to non-zero value, it provides the scaling '
                     u'factor for the width of the underine based on '
                     u'current font size.'),
        min=0.0,
        default=0.0,
        required=False)

    bulletAnchor = attr.Choice(
        title=u'Bullet Anchor',
        description=u'The place at which the bullet is anchored.',
        choices=interfaces.BULLET_ANCHOR_CHOICES,
        default='start',
        required=False)

    # Attributes not part of the official style attributes, but are accessed
    # by the paragraph renderer.

    keepWithNext = attr.Boolean(
        title=u'Keep with Next',
        description=(u'When set, this paragraph will always be in the same '
                     u'frame as the following flowable.'),
        required=False)

    pageBreakBefore = attr.Boolean(
        title=u'Page Break Before',
        description=(u'Specifies whether a page break should be inserted '
                     u'before the directive.'),
        required=False)

    frameBreakBefore = attr.Boolean(
        title=u'Frame Break Before',
        description=(u'Specifies whether a frame break should be inserted '
                     u'before the directive.'),
        required=False)
Esempio n. 19
0
class IBaseParagraphStyle(ISpanStyle):

    leading = attr.Measurement(
        title=u'Leading',
        description=(u'The height of a single paragraph line. It includes '
                     u'character height.'),
        required=False)

    leftIndent = attr.Measurement(
        title=u'Left Indentation',
        description=u'General indentation on the left side.',
        required=False)

    rightIndent = attr.Measurement(
        title=u'Right Indentation',
        description=u'General indentation on the right side.',
        required=False)

    firstLineIndent = attr.Measurement(
        title=u'First Line Indentation',
        description=u'The indentation of the first line in the paragraph.',
        required=False)

    alignment = attr.Choice(title=u'Alignment',
                            description=u'The text alignment.',
                            choices=interfaces.ALIGN_CHOICES,
                            required=False)

    spaceBefore = attr.Measurement(
        title=u'Space Before',
        description=u'The vertical space before the paragraph.',
        required=False)

    spaceAfter = attr.Measurement(
        title=u'Space After',
        description=u'The vertical space after the paragraph.',
        required=False)

    bulletFontName = attr.String(
        title=u'Bullet Font Name',
        description=u'The font in which the bullet character will be rendered.',
        required=False)

    bulletFontSize = attr.Measurement(
        title=u'Bullet Font Size',
        description=u'The font size of the bullet character.',
        required=False)

    bulletIndent = attr.Measurement(
        title=u'Bullet Indentation',
        description=u'The indentation that is kept for a bullet point.',
        required=False)

    bulletColor = attr.Color(
        title=u'Bullet Color',
        description=u'The color in which the bullet will appear.',
        required=False)

    wordWrap = attr.Choice(
        title=u'Word Wrap Method',
        description=(
            u'When set to "CJK", invoke CJK word wrapping. LTR RTL use '
            u'left to right / right to left with support from pyfribi2 if '
            u'available'),
        choices=interfaces.WORD_WRAP_CHOICES,
        required=False)

    borderWidth = attr.Measurement(
        title=u'Paragraph Border Width',
        description=u'The width of the paragraph border.',
        required=False)

    borderPadding = attr.Padding(title=u'Paragraph Border Padding',
                                 description=u'Padding of the paragraph.',
                                 required=False)

    borderColor = attr.Color(
        title=u'Border Color',
        description=u'The color in which the paragraph border will appear.',
        required=False)

    borderRadius = attr.Measurement(
        title=u'Paragraph Border Radius',
        description=u'The radius of the paragraph border.',
        required=False)

    allowWidows = attr.Boolean(title=u'Allow Widows',
                               description=(u'Allow widows.'),
                               required=False)

    allowOrphans = attr.Boolean(title=u'Allow Orphans',
                                description=(u'Allow orphans.'),
                                required=False)

    endDots = attr.String(
        title=u'End Dots',
        description=u'Characters/Dots at the end of a paragraph.',
        required=False)

    splitLongWords = attr.Boolean(
        title=u'Split Long Words',
        description=(u'Try to split long words at the end of a line.'),
        default=True,
        required=False)

    justifyLastLine = attr.Integer(
        title=u'Justify Last Line',
        description=(
            u'Justify last line if there are more then this number of words. '
            u'Otherwise, don\'t bother.'),
        default=0,
        required=False)

    justifyBreaks = attr.Boolean(
        title=u'Justify Breaks',
        description=(
            u'A flag, when set indicates that a line with a break should be '
            u'justified as well.'),
        default=False,
        required=False)

    spaceShrinkage = attr.Float(
        title=u'Allowed Whitespace Shrinkage Fraction',
        description=(
            u'The fraction of the original whitespace by which the '
            u'whitespace is allowed to shrink to fit content on the same '
            u'line.'),
        required=False)

    bulletAnchor = attr.Choice(
        title=u'Bullet Anchor',
        description=u'The place at which the bullet is anchored.',
        choices=interfaces.BULLET_ANCHOR_CHOICES,
        default='start',
        required=False)

    # Attributes not part of the official style attributes, but are accessed
    # by the paragraph renderer.

    keepWithNext = attr.Boolean(
        title=u'Keep with Next',
        description=(u'When set, this paragraph will always be in the same '
                     u'frame as the following flowable.'),
        required=False)

    pageBreakBefore = attr.Boolean(
        title=u'Page Break Before',
        description=(u'Specifies whether a page break should be inserted '
                     u'before the directive.'),
        required=False)

    frameBreakBefore = attr.Boolean(
        title=u'Frame Break Before',
        description=(u'Specifies whether a frame break should be inserted '
                     u'before the directive.'),
        required=False)
Esempio n. 20
0
class IAxis(interfaces.IRMLDirectiveSignature):
    occurence.containing(occurence.ZeroOrMore('labels', ILabels))

    visible = attr.Boolean(
        title='Visible',
        description='When true, draw the entire axis with all details.',
        required=False)

    visibleAxis = attr.Boolean(title='Visible Axis',
                               description='When true, draw the axis line.',
                               required=False)

    visibleTicks = attr.Boolean(
        title='Visible Ticks',
        description='When true, draw the axis ticks on the line.',
        required=False)

    visibleLabels = attr.Boolean(
        title='Visible Labels',
        description='When true, draw the axis labels.',
        required=False)

    visibleGrid = attr.Boolean(
        title='Visible Grid',
        description='When true, draw the grid lines for the axis.',
        required=False)

    strokeWidth = attr.Measurement(
        title='Stroke Width',
        description='The width of axis line and ticks.',
        required=False)

    strokeColor = attr.Color(
        title='Stroke Color',
        description='The color in which the axis line and ticks are drawn.',
        required=False)

    strokeDashArray = attr.Sequence(
        title='Stroke Dash Array',
        description='The dash array that is used for the axis line and ticks.',
        value_type=attr.Float(),
        required=False)

    gridStrokeWidth = attr.Measurement(
        title='Grid Stroke Width',
        description='The width of the grid lines.',
        required=False)

    gridStrokeColor = attr.Color(
        title='Grid Stroke Color',
        description='The color in which the grid lines are drawn.',
        required=False)

    gridStrokeDashArray = attr.Sequence(
        title='Grid Stroke Dash Array',
        description='The dash array that is used for the grid lines.',
        value_type=attr.Float(),
        required=False)

    gridStart = attr.Measurement(
        title='Grid Start',
        description=('The start of the grid lines with respect to the '
                     'axis origin.'),
        required=False)

    gridEnd = attr.Measurement(
        title='Grid End',
        description=('The end of the grid lines with respect to the '
                     'axis origin.'),
        required=False)

    style = attr.Choice(title='Style',
                        description='The plot style of the common categories.',
                        choices=('parallel', 'stacked', 'parallel_3d'),
                        required=False)
Esempio n. 21
0
class ILabelBase(interfaces.IRMLDirectiveSignature):

    dx = attr.Measurement(title='Horizontal Extension',
                          description=('The width of the label.'),
                          required=False)

    dy = attr.Measurement(title='Vertical Extension',
                          description=('The height of the label.'),
                          required=False)

    angle = attr.Float(title='Angle',
                       description=('The angle to rotate the label.'),
                       required=False)

    boxAnchor = attr.Choice(
        title='Box Anchor',
        description=('The position relative to the label.'),
        choices=('nw', 'n', 'ne', 'w', 'c', 'e', 'sw', 's', 'se', 'autox',
                 'autoy'),
        required=False)

    boxStrokeColor = attr.Color(
        title='Box Stroke Color',
        description=('The color of the box border line.'),
        required=False)

    boxStrokeWidth = attr.Measurement(
        title='Box Stroke Width',
        description='The width of the box border line.',
        required=False)

    boxFillColor = attr.Color(
        title='Box Fill Color',
        description=('The color in which the box is filled.'),
        required=False)

    boxTarget = attr.Text(title='Box Target',
                          description='The box target.',
                          required=False)

    fillColor = attr.Color(
        title='Fill Color',
        description=('The color in which the label is filled.'),
        required=False)

    strokeColor = attr.Color(title='Stroke Color',
                             description=('The color of the label.'),
                             required=False)

    strokeWidth = attr.Measurement(title='Stroke Width',
                                   description='The width of the label line.',
                                   required=False)

    fontName = attr.Text(title='Font Name',
                         description='The font used to print the value.',
                         required=False)

    fontSize = attr.Measurement(title='Font Size',
                                description='The size of the value text.',
                                required=False)

    leading = attr.Measurement(
        title='Leading',
        description=('The height of a single text line. It includes '
                     'character height.'),
        required=False)

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

    maxWidth = attr.Measurement(title='Maximum Width',
                                description='The maximum width the label.',
                                required=False)

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

    textAnchor = attr.Choice(
        title='Text Anchor',
        description='The position in the text to which the coordinates refer.',
        choices=('start', 'middle', 'end', 'boxauto'),
        required=False)

    visible = attr.Boolean(title='Visible',
                           description='A flag making the label text visible.',
                           required=False)

    leftPadding = attr.Measurement(
        title='Left Padding',
        description='The size of the padding on the left side.',
        required=False)

    rightPadding = attr.Measurement(
        title='Right Padding',
        description='The size of the padding on the right side.',
        required=False)

    topPadding = attr.Measurement(
        title='Top Padding',
        description='The size of the padding on the top.',
        required=False)

    bottomPadding = attr.Measurement(
        title='Bottom Padding',
        description='The size of the padding on the bottom.',
        required=False)
Esempio n. 22
0
class IChart(interfaces.IRMLDirectiveSignature):
    occurence.containing(occurence.ZeroOrOne('texts', ITexts), )

    # Drawing Options

    dx = attr.Measurement(
        title='Drawing X-Position',
        description='The x-position of the entire drawing on the canvas.',
        required=False)

    dy = attr.Measurement(
        title='Drawing Y-Position',
        description='The y-position of the entire drawing on the canvas.',
        required=False)

    dwidth = attr.Measurement(title='Drawing Width',
                              description='The width of the entire drawing',
                              required=False)

    dheight = attr.Measurement(title='Drawing Height',
                               description='The height of the entire drawing',
                               required=False)

    angle = attr.Float(
        title='Angle',
        description='The orientation of the drawing as an angle in degrees.',
        required=False)

    # Plot Area Options

    x = attr.Measurement(
        title='Chart X-Position',
        description='The x-position of the chart within the drawing.',
        required=False)

    y = attr.Measurement(
        title='Chart Y-Position',
        description='The y-position of the chart within the drawing.',
        required=False)

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

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

    strokeColor = attr.Color(title='Stroke Color',
                             description='Color of the chart border.',
                             required=False)

    strokeWidth = attr.Measurement(title='Stroke Width',
                                   description='Width of the chart border.',
                                   required=False)

    fillColor = attr.Color(title='Fill Color',
                           description='Color of the chart interior.',
                           required=False)

    debug = attr.Boolean(
        title='Debugging',
        description='A flag that when set to True turns on debug messages.',
        required=False)
Esempio n. 23
0
class IStrandLabel(IStrandLabelBase):
    """A label for a strand."""

    dR = attr.Float(title=u'Radial Shift',
                    description=u'The radial shift of the label.',
                    required=False)
Esempio n. 24
0
class IBarCodeBase(interfaces.IRMLDirectiveSignature):
    """Create a bar code."""

    code = attr.Choice(title=u'Code',
                       description=u'The name of the type of code to use.',
                       choices=reportlab.graphics.barcode.getCodeNames(),
                       required=True)

    value = attr.TextNode(title=u'Value',
                          description=u'The value represented by the code.',
                          required=True)

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

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

    barStrokeColor = attr.Color(
        title=u'Bar Stroke Color',
        description=(u'The color of the line strokes in the barcode.'),
        required=False)

    barStrokeWidth = attr.Measurement(
        title=u'Bar Stroke Width',
        description=u'The width of the line strokes in the barcode.',
        required=False)

    barFillColor = attr.Color(
        title=u'Bar Fill Color',
        description=(u'The color of the filled shapes in the barcode.'),
        required=False)

    gap = attr.Measurement(
        title=u'Gap',
        description=u'The width of the inter-character gaps.',
        required=False)

    # Bar code dependent attributes
    # I2of5, Code128, Standard93, FIM, POSTNET, Ean13B
    barWidth = attr.Measurement(
        title=u'Bar Width',
        description=u'The width of the smallest bar within the barcode',
        required=False)

    # I2of5, Code128, Standard93, FIM, POSTNET
    barHeight = attr.Measurement(title=u'Bar Height',
                                 description=u'The height of the symbol.',
                                 required=False)

    # I2of5
    ratio = attr.Float(
        title=u'Ratio',
        description=(u'The ratio of wide elements to narrow elements. '
                     u'Must be between 2.0 and 3.0 (or 2.2 and 3.0 if the '
                     u'barWidth is greater than 20 mils (.02 inch)).'),
        min=2.0,
        max=3.0,
        required=False)

    # I2of5
    # Should be boolean, but some code want it as int; will still work
    checksum = attr.Integer(
        title=u'Ratio',
        description=(u'A flag that enables the computation and inclusion of '
                     u'the check digit.'),
        required=False)

    # I2of5
    bearers = attr.Float(
        title=u'Bearers',
        description=(u'Height of bearer bars (horizontal bars along the top '
                     u'and bottom of the barcode). Default is 3 '
                     u'x-dimensions. Set to zero for no bearer bars.'
                     u'(Bearer bars help detect misscans, so it is '
                     u'suggested to leave them on).'),
        required=False)

    # I2of5, Code128, Standard93, FIM, Ean13
    quiet = attr.Boolean(
        title=u'Quiet Zone',
        description=(u'A flag to include quiet zones in the symbol.'),
        required=False)

    # I2of5, Code128, Standard93, FIM, Ean13
    lquiet = attr.Measurement(
        title=u'Left Quiet Zone',
        description=(u"Quiet zone size to the left of code, if quiet is "
                     u"true. Default is the greater of .25 inch or .15 times "
                     u"the symbol's length."),
        required=False)

    # I2of5, Code128, Standard93, FIM, Ean13
    rquiet = attr.Measurement(
        title=u'Right Quiet Zone',
        description=(u"Quiet zone size to the right of code, if quiet is "
                     u"true. Default is the greater of .25 inch or .15 times "
                     u"the symbol's length."),
        required=False)

    # I2of5, Code128, Standard93, FIM, POSTNET, Ean13
    fontName = attr.String(title=u'Font Name',
                           description=(u'The font used to print the value.'),
                           required=False)

    # I2of5, Code128, Standard93, FIM, POSTNET, Ean13
    fontSize = attr.Measurement(title=u'Font Size',
                                description=(u'The size of the value text.'),
                                required=False)

    # I2of5, Code128, Standard93, FIM, POSTNET, Ean13
    humanReadable = attr.Boolean(
        title=u'Human Readable',
        description=(u'A flag when set causes the value to be printed below '
                     u'the bar code.'),
        required=False)

    # I2of5, Standard93
    stop = attr.Boolean(
        title=u'Show Start/Stop',
        description=(u'A flag to specify whether the start/stop symbols '
                     u'are to be shown.'),
        required=False)

    # FIM, POSTNET
    spaceWidth = attr.Measurement(
        title=u'Space Width',
        description=u'The space of the inter-character gaps.',
        required=False)

    # POSTNET
    shortHeight = attr.Measurement(title=u'Short Height',
                                   description=u'The height of the short bar.',
                                   required=False)

    # Ean13
    textColor = attr.Color(title=u'Text Color',
                           description=(u'The color of human readable text.'),
                           required=False)

    # USPS4S
    routing = attr.String(title=u'Routing',
                          description=u'The routing information string.',
                          required=False)

    # QR
    barLevel = attr.Choice(
        title=u'Bar Level',
        description=u'The error correction level for QR code',
        choices=['L', 'M', 'Q', 'H'],
        required=False)

    barBorder = attr.Measurement(
        title=u'Bar Border',
        description=u'The width of the border around a QR code.',
        required=False)