Example #1
0
class IPath(IShape):
    """Create a line path."""
    occurence.containing(
        occurence.ZeroOrMore('moveto', IMoveTo),
        occurence.ZeroOrMore('curveto', ICurveTo),
        occurence.ZeroOrMore('curvesto', ICurvesTo),
    )

    points = attr.TextNodeGrid(
        title=u'Points',
        description=(u'A list of coordinate points that define th path.'),
        value_type=attr.Measurement(),
        columns=2,
        required=True)

    close = attr.Boolean(
        title=u'Close Path',
        description=(u"A flag specifying whether the path should be closed."),
        default=False,
        required=False)

    clip = attr.Boolean(
        title=u'Clip Path',
        description=(u"A flag specifying whether the path should clip "
                     u"overlapping elements."),
        default=False,
        required=False)
Example #2
0
class ICurveTo(interfaces.IRMLDirectiveSignature):
    """Create a bezier curve from the current location to the specified one."""

    curvelist = attr.TextNodeGrid(
        title=u'Curve Specification',
        description=u'Describes the end position and the curve properties.',
        value_type=attr.Measurement(),
        columns=6,
        required=True)
Example #3
0
class ILines(interfaces.IRMLDirectiveSignature):
    """A path of connected lines drawn on the canvas."""

    linelist = attr.TextNodeGrid(
        title='Line List',
        description=('A list of lines coordinates to draw.'),
        value_type=attr.Measurement(),
        columns=4,
        required=True)
Example #4
0
class ICurves(interfaces.IRMLDirectiveSignature):
    """A path of connected bezier curves drawn on the canvas."""

    curvelist = attr.TextNodeGrid(
        title=u'Curve List',
        description=(u'A list of curve coordinates to draw.'),
        value_type=attr.Measurement(),
        columns=8,
        required=True)
Example #5
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)