Graphics Reference

Graphics elements are the way you have to draw images ad shapes on the band canvas.

They can be useful also to make customized borders in bands.

Graphic

This is the basic graphic class. You should use it only when inheriting to create your own graphic class, never use it directly.

Its rect area is based on left-width-top-height dimensions.

Path: geraldo.graphics.Graphic

Attributes

Rendering attributes

They are read-only attributes you can use in render time.

Methods

Fixed

Path: geraldo.graphics.Fixed

In the same way of Graphic class, you should use this just to inhert and create your own graphic. This is a graphic with rect with left-right-top-bottom dimensioning.

Rect

Path: geraldo.Rect

A rectangle with square borders on the canvas.

Example of use

>>> Rect(left=1*cm, top=0.5*cm, width=10*cm, height=0.5*cm, fill=True, fill_color=yellow)

Attributes

RoundRect

Path: geraldo.RoundRect

A rectangle with rounded borders on the canvas.

Example of use

>>> RoundRect(left=1*cm, top=0.5*cm, width=10*cm, height=0.5*cm, stroke=True, stroke_width=3, stroke_color=blue)

Attributes

Line

Path: geraldo.Line

Example of use

>>> Line(left=1*cm, top=0.5*cm, right=10*cm, bottom=0.5*cm)

Attributes

Circle

Path: geraldo.Circle

Example of use

>>> Circle(left_center=6*cm, top_center=3.5*cm, radius=3*cm)

Attributes

Arc

Path: geraldo.Arc

Example of use

>>> Arc(left=1*cm, top=0.5*cm, right=10*cm, bottom=0.5*cm, extent=50, start_angle=5)

Attributes

Ellipse

Path: geraldo.Ellipse

Example of use

>>> Ellipse(left=1*cm, top=0.5*cm, right=10*cm, bottom=0.5*cm)

Attributes

Image

Path: geraldo.Image

Example of use

>>> Image(left=1*cm, top=0.5*cm, right=10*cm, bottom=0.5*cm, filename='path/to/file.jpg')

Attributes