示例#1
0
    ConditionMethodWriter,
    ActionMethodWriter,
    ExpressionMethodWriter,
    make_table,
    EmptyAction,
    ComparisonWriter,
    make_comparison,
)


class DirectShow(ObjectWriter):
    class_name = "DirectShow"
    filename = "directshow"
    use_alterables = True

    def write_init(self, writer):
        pass


actions = make_table(
    ActionMethodWriter, {0: "load", 2: "play", 4: "set_width", 5: "set_height", 20: "set_visible(true)"}
)

conditions = make_table(ConditionMethodWriter, {0: "is_playing", 2: make_comparison("get_time()")})

expressions = make_table(ExpressionMethodWriter, {2: "get_duration()", 3: "get_time()"})


def get_object():
    return DirectShow
示例#2
0
actions = make_table(ActionMethodWriter, {
    0 : 'set_image',
    8 : '.anim_frame = %s',
    14 : '.angle = %s',
    32 : 'blend_color.set_alpha',
    33 : EmptyAction, # load image from png
    15 : 'set_width',
    16 : 'set_height',
    17 : 'set_scale_x(%s / 100.0)',
    18 : 'set_scale_y(%s / 100.0)',
    20 : 'set_hotspot'
})

conditions = make_table(ConditionMethodWriter, {
    5 : make_comparison('index')
})

expressions = make_table(ExpressionMethodWriter, {
    0 : '.index',
    8 : '.image->width',
    9 : '.image->height',
    12 : '.angle',
    13 : 'get_width()',
    14 : 'get_height()',
    15 : '.blend_color.a'
})

def get_object():
    return AlphaImageObject
示例#3
0
    ComparisonWriter, make_comparison)

class DirectShow(ObjectWriter):
    class_name = 'DirectShow'
    filename = 'directshow'
    use_alterables = True

    def write_init(self, writer):
        pass

actions = make_table(ActionMethodWriter, {
    0 : 'load',
    2 : 'play',
    4 : 'set_width',
    5 : 'set_height',
    20 : 'set_visible(true)'
})

conditions = make_table(ConditionMethodWriter, {
    0 : 'is_playing',
    2 : make_comparison('get_time()'),
})

expressions = make_table(ExpressionMethodWriter, {
    2 : 'get_duration()',
    3 : 'get_time()'
})

def get_object():
    return DirectShow
class DirectShow(ObjectWriter):
    class_name = 'DirectShow'
    filename = 'directshow'
    use_alterables = True

    def write_init(self, writer):
        pass


actions = make_table(ActionMethodWriter, {
    0: 'load',
    2: 'play',
    4: 'set_width',
    5: 'set_height',
    20: 'set_visible(true)'
})

conditions = make_table(ConditionMethodWriter, {
    0: 'is_playing',
    2: make_comparison('get_time()'),
})

expressions = make_table(ExpressionMethodWriter, {
    2: 'get_duration()',
    3: 'get_time()'
})


def get_object():
    return DirectShow
示例#5
0
    ActionMethodWriter,
    {
        0: "set_image",
        8: ".anim_frame = %s",
        14: ".angle = %s",
        32: "blend_color.set_alpha",
        33: EmptyAction,  # load image from png
        15: "set_width",
        16: "set_height",
        17: "set_scale_x(%s / 100.0)",
        18: "set_scale_y(%s / 100.0)",
        20: "set_hotspot",
    },
)

conditions = make_table(ConditionMethodWriter, {5: make_comparison("index")})

expressions = make_table(
    ExpressionMethodWriter,
    {
        0: ".index",
        8: ".image->width",
        9: ".image->height",
        12: ".angle",
        13: "get_width()",
        14: "get_height()",
        15: ".blend_color.a",
    },
)

示例#6
0
actions = make_table(
    ActionMethodWriter,
    {
        0: 'set_image',
        8: '.anim_frame = %s',
        14: '.angle = %s',
        32: 'blend_color.set_alpha',
        33: EmptyAction,  # load image from png
        15: 'set_width',
        16: 'set_height',
        17: 'set_scale_x(%s / 100.0)',
        18: 'set_scale_y(%s / 100.0)',
        20: 'set_hotspot'
    })

conditions = make_table(ConditionMethodWriter, {5: make_comparison('index')})

expressions = make_table(
    ExpressionMethodWriter, {
        0: '.index',
        8: '.image->width',
        9: '.image->height',
        12: '.angle',
        13: 'get_width()',
        14: 'get_height()',
        15: '.blend_color.a'
    })


def get_object():
    return AlphaImageObject