def Variable(self, variableUI, globalVariables):
     """Offers interactive global value manipulation in DrawBot. Probably to be ignored in other contexts."""
     # Variable is a DrawBot context global, used to make simple UI with controls on input parameters.
     try:
         Variable(variableUI, globalVariables)
     except self.b.misc.DrawBotError:
         pass  # Ingore if there is a DrawBot context, but not running inside DrawBot.
Exemple #2
0
    def Variable(self, variables, workSpace):
        """Offers interactive global value manipulation in DrawBot. Should be
        ignored in other contexts.

        Variable is a DrawBot context global, used to make simple UI with
        controls on input parameters."""
        Variable(variables, workSpace)
Exemple #3
0
 def Variable(self, variables, workSpace):
     """Offers interactive global value manipulation in DrawBot. Probably to
     be ignored in other contexts."""
     # Variable is a DrawBot context global, used to make simple UI with
     # controls on input parameters.
     try:
         from drawBot import Variable
         Variable(variables, workSpace)
     except self.b.misc.DrawBotError:
         # Ignore if there is a DrawBot context, but not running inside
         # DrawBot.
         print(traceback.format_exc())
Exemple #4
0
            e.borderTop['strokeWidth'] = (iy + 1) * 4
            e.borderTop['line'] = lineType
            e.borderTop['stroke'] = (1, 1, 0, 0.5)

            e.borderRight['strokeWidth'] = (iy + 1) * 4
            e.borderRight['line'] = lineType
            e.borderRight['stroke'] = (0, 0, 1, 0.5)

            # Create Rect object and place it in the page on position p
    return doc  # Answer the doc for further doing.


if __name__ == '__main__':  # If running from DrawBot
    Variable([
        dict(name="LineType",
             ui="RadioGroup",
             args=dict(titles=[INLINE, ONLINE, OUTLINE], isVertical=True)),
        dict(name='DashWhite',
             ui='Slider',
             args=dict(minValue=0, value=8, maxValue=8)),
        dict(name='DashBlack',
             ui='Slider',
             args=dict(minValue=0, value=0, maxValue=8)),
        dict(name='PageSize',
             ui='Slider',
             args=dict(minValue=100, value=400, maxValue=800)),
    ], globals())
    d = makeDocument()
    d.export(EXPORT_PATH)
Exemple #5
0
                # Position of the coordinate with a bit of offset.
                (p[0], p[1] + e.css('colH') + e.gh / 4),
                parent=page,
                textFill=0,
                fontSize=4,
                leading=0,
                fill=None,
                stroke=None)

    # Note that in this stage nothing is drawn yet in DrawBot. Potentionally all element can still be moved around
    # added or deleted or moved to other pages.
    return doc  # Answer the doc for further doing.


if __name__ == '__main__':  # If running from DrawBot
    Variable([
        dict(name='ElementOrigin', ui='CheckBox', args=dict(value=False)),
        dict(name='CropMarks', ui='CheckBox', args=dict(value=True)),
        dict(name='RegistrationMarks', ui='CheckBox', args=dict(value=True)),
        dict(name='PageFrame', ui='CheckBox', args=dict(value=True)),
        dict(name='PageNameInfo', ui='CheckBox', args=dict(value=True)),
        dict(name='ViewPadding',
             ui='Slider',
             args=dict(minValue=0, value=64, maxValue=200)),
        dict(name='PageSize',
             ui='Slider',
             args=dict(minValue=100, value=400, maxValue=800)),
    ], globals())
    d = makeDocument()
    d.export(EXPORT_PATH)
Exemple #6
0
 def Variable(self, ui, variableGlobals):
     """Offers interactive global value manipulation in DrawBot. Probably to be ignored in other contexts."""
     from drawBot import Variable
     Variable(ui, variableGlobals)