Contains static drawing functions.
|
|
get_text_width(self,
ctx,
text,
font)
Returns the pixel width of a given text |
source code
|
|
|
|
get_text_height(self,
ctx,
text,
font)
Returns the pixel height of a given text |
source code
|
|
|
|
get_text_line_count(self,
ctx,
text,
font,
size=None)
Returns the line count of a given text |
source code
|
|
|
|
get_text_line(self,
ctx,
text,
font,
line)
Returns a line of a given text |
source code
|
|
|
|
|
|
|
draw_text(self,
ctx,
text,
x,
y,
font,
size=None,
width=200,
allignment=<enum PANGO_ALIGN_LEFT of type PangoAlignment>,
alignment=None,
justify=False,
weight=None,
ellipsize=<enum PANGO_ELLIPSIZE_NONE of type PangoEllipsizeMode>)
Draws text |
source code
|
|
|
|
draw_circle(self,
ctx,
x,
y,
width,
height,
fill=True)
Draws a circule |
source code
|
|
|
|
draw_triangle(self,
ctx,
x,
y,
width,
height,
fill=True)
Draws a circule |
source code
|
|
|
|
draw_line(self,
ctx,
start_x,
start_y,
end_x,
end_y,
line_width=1,
close=False,
preserve=False)
Draws a line |
source code
|
|
|
|
draw_rectangle(self,
ctx,
x,
y,
width,
height,
fill=True)
Draws a rectangle |
source code
|
|
|
|
draw_rectangle_advanced(self,
ctx,
x,
y,
width,
height,
rounded_angles=(0, 0, 0, 0),
fill=True,
border_size=0,
border_color=(0, 0, 0, 1),
shadow_size=0,
shadow_color=(0, 0, 0, 0.5))
with this funktion you can create a rectangle in advanced mode |
source code
|
|
|
|
draw_rounded_rectangle(self,
ctx,
x,
y,
rounded_angle,
width,
height,
round_top_left=True,
round_top_right=True,
round_bottom_left=True,
round_bottom_right=True,
fill=True)
Draws a rounded rectangle |
source code
|
|
|
|
| draw_quadrant_shadow(self,
ctx,
x,
y,
from_r,
to_r,
quad,
col) |
source code
|
|
|
|
| draw_side_shadow(self,
ctx,
x,
y,
w,
h,
side,
col) |
source code
|
|
|
|
| draw_shadow(self,
ctx,
x,
y,
w,
h,
shadow_size,
col) |
source code
|
|
|
|
get_image_size(self,
pix)
Gets a picture width and height |
source code
|
|
|
|
draw_image(self,
ctx,
x,
y,
pix)
Draws a picture from specified path |
source code
|
|
|
|
draw_icon(self,
ctx,
x,
y,
pix,
width=32,
height=32)
Draws a gtk icon |
source code
|
|
|
|
draw_scaled_image(self,
ctx,
x,
y,
pix,
w,
h)
Draws a picture from specified path with a certain width and height |
source code
|
|
|
Inherited from object:
__delattr__,
__format__,
__getattribute__,
__hash__,
__init__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__sizeof__,
__str__,
__subclasshook__
|