digital-divas / PINP

PINP Is Not msPaint
GNU General Public License v3.0
7 stars 2 forks source link

open and save file #12

Open ezequielramos opened 4 years ago

ezequielramos commented 4 years ago
import subprocess

a = subprocess.check_output(["zenity", "--file-selection"])
print("kkkkk", a)
ezequielramos commented 4 years ago
def text_to_screen(
    screen,
    text,
    x,
    y,
    size=50,
    color=(200, 000, 000),
    font_type="data/fonts/orecrusherexpand.ttf",
):
    try:

        text = str(text)
        # font = pygame.font.Font(font_type, size)
        font = pygame.font.SysFont(font_type, size)
        text = font.render(text, True, color)
        screen.blit(text, (x, y))

    except Exception as e:
        print("Font Error, saw it coming")
        raise e