from JascApp import *

def ScriptProperties():
    return {
        'Author': '',
        'Copyright': '',
        'Description': '',
        'Host': 'Paint Shop Pro',
        'Host Version': '8.00'
        }

def Do(Environment):

    # we need at least one image for this to work
    if len(App.Documents) < 1:
        App.Do(Environment,  'MsgBox', {
                'Buttons': App.Constants.MsgButtons.OK, 
                'Icon': App.Constants.MsgIcons.Stop, 
                'Text': 'Command could not complete because there is no active document.'
                })
        return  

    App.Do( Environment, 'PresetShapes', {
            'LineWidth': 1, 
            'Angle': 0, 
            'ConstrainRect': App.Constants.Boolean.true, 
            'Antialias': App.Constants.Boolean.true, 
            'BBox': ((35.5,47.5),140), 
            'Fill': {
                'Color': (0,0,0), 
                'Pattern': None, 
                'Gradient': None, 
                'Texture': None, 
                'Identity': r'Material'
                }, 
            'Stroke': {
                'Color': (255,255,0), 
                'Pattern': None, 
                'Gradient': None, 
                'Texture': None, 
                'Identity': r'Material'
                }, 
            'JointStyle': App.Constants.JointStyle.Miter, 
            'CreateAsVector': App.Constants.Boolean.true, 
            'RetainStyle': App.Constants.Boolean.true, 
            'LineStyle': {
                'Name': r'_Solid', 
                'FirstCap': (r'Butt',7.21,7.21), 
                'LastCap': (r'Butt',1,1), 
                'FirstSegCap': None, 
                'LastSegCap': None, 
                'UseSegmentCaps': App.Constants.Boolean.false, 
                'Segments': None
                }, 
            'LineStyleIndex': 0, 
            'ShapeName': r'Ellipse', 
            'ShapeOrientation': App.Constants.Orientation.Normal, 
            'keShapeIconSizeLarge': App.Constants.Boolean.true, 
            'Position': (35.5,47.5), 
            'LeftTop': (35.5,47.5), 
            'RightBottom': (175.5,187.5), 
            'RotationMode': 0, 
            'MiterLimit': 10, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Silent, 
                'AutoActionMode': App.Constants.AutoActionMode.Match
                }
            }) 

