Exemplo n.º 1
0
## data loading helpers


def load_pixbuf(imageFile):
    '''
    create a pixbuf from specified image in the data directory
    '''
    imageFile = "{}/{}".format(pathData, imageFile)
    pixbuf = GdkPixbuf.Pixbuf.new_from_file(imageFile)
    return pixbuf


## Widget helpers

gActors = {}
blurEffect = Clutter.BlurEffect()
IGNORE = -99

# Labels


def create_label(text,
                 posX,
                 posY,
                 sizeX=IGNORE,
                 sizeY=IGNORE,
                 iD="label",
                 color=0xf0f0f0ff,
                 backgroundColor=0x404040ff,
                 font="Mono 32"):
    label = Clutter.Text()
Exemplo n.º 2
0
def apply_blur_effect(actor):
    actor.clear_effects()
    effect = Clutter.BlurEffect()
    actor.add_effect(effect)