Text and Images

Text

Text(center_xy, text)

Example:

words = easy_draw.Text(
    center_xy = (300,100), 
    text = "I Love Python",  
    color = (0, 200, 50),          # Optional Property
    font = "Times",                # Optional Property
    size = 32,                     # Optional Property
    bold = True,                   # Optional Property
    italic = True,                 # Optional Property
    underline = True,              # Optional Property
    strikethrough = True,          # Optional Property
    visible = True                 # Optional Property
)

Images

First thing that need to be done to use an image is open it in Easy Draw with the open_image() function.

The open_image() function requires 1 positional argument - filename. The filename can be relative or an absolute file path.

pic = easy_draw.open_image("super_cool_image.png")

Then you can create an image object.

Image(center_xy, image)

Example:

pic = easy_draw.open_image("super_cool_image.png")

img = easy_draw.Image(
    center_xy = (300,300),
    image = pic
)

Last updated