Package screenlets :: Module drawing :: Class Drawing

[hide private]
[frames] | no frames]

# Class Drawing

source code

Known Subclasses:
  Screenlet

Contains static drawing functions.

Instance Methods | [hide private]

get_text_width(self, ctx, text, font) Returns the pixel width of a given text | source code

get_text_line_count(self, ctx, text, font) 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

check_for_icon(self, icon) | source code

draw_text(self, ctx, text, x, y, font, size, width, allignment=<enum PANGO_ALIGN_LEFT of type PangoAlignment>, alignment=None, justify=False, weight=0, 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

Class Variables | [hide private]

| p_context = `None`
| p_layout = `None`