Home | Trees | Index | Help |
|
---|
|
object --+ | _EGObject --+ | _EGWidget --+ | Canvas
The drawing area.
Eagle's drawing area (Canvas) is provided with a frame and an optional label, together with scrollbars, to make it fit everywhere.
|
|||
__init__(self,
id,
width,
height,
label="",
bgcolor=None,
scrollbars=True,
callback=None,
expand_policy=None)
Canvas Constructor. |
|||
__setup_gui__(self, width, height) | |||
__set_useful_attributes__(self) | |||
__setup_connections__(self) | |||
__configure_gc__(self, fgcolor=None, bgcolor=None, fill=None, line_width=None, line_style=None) | |||
resize(self,
width,
height)
Resize the drawing area. |
|||
draw_image(self,
image,
x=0,
y=0,
width=None,
height=None,
src_x=0,
src_y=0)
Draw image on canvas. |
|||
draw_text(self,
text,
x=0,
y=0,
fgcolor=None,
bgcolor=None,
font_name=None,
font_size=None,
font_options=0,
font_family=None,
width=None,
wrap_word=False,
alignment=LEFT,
justify=True)
Draw text on canvas. |
|||
draw_point(self,
x,
y,
color=None)
Draw point. |
|||
draw_points(self,
points,
color=None)
Draw points. |
|||
draw_line(self,
x0,
y0,
x1,
y1,
color=None,
size=1)
Draw line. |
|||
draw_segments(self,
segments,
color=None,
size=1)
Draw line segments. |
|||
draw_lines(self,
points,
color=None,
size=1)
Draw lines connecting points. |
|||
draw_rectangle(self,
x,
y,
width,
height,
color=None,
size=1,
fillcolor=None,
filled=False)
Draw rectagle. |
|||
draw_arc(self,
x,
y,
width,
height,
start_angle,
end_angle,
color=None,
size=1,
fillcolor=None,
filled=False)
Draw arc on canvas. |
|||
draw_polygon(self,
points,
color=None,
size=1,
fillcolor=None,
filled=False)
Draw polygon on canvas. |
|||
clear(self)
Clear using bgcolor. |
|||
fill(self, color) | |||
get_size(self) | |||
get_image(self)
Get the Image that represents this drawing area. |
|||
set_label(self, label) | |||
get_label(self) | |||
__str__(self)
str(x) |
|||
__repr__(self)
str(x) |
|||
Inherited from Inherited from |
|
|||
__color_from__(color)
Convert from color to internal representation. |
|||
__to_gtk_color__(color) |
|
|||
padding | |||
bgcolor | |||
LEFT | |||
CENTER | |||
RIGHT | |||
FONT_OPTION_BOLD | |||
FONT_OPTION_OBLIQUE | |||
FONT_OPTION_ITALIC | |||
FONT_NAME_NORMAL | |||
FONT_NAME_SERIF | |||
FONT_NAME_SANS | |||
FONT_NAME_MONO | |||
MOUSE_BUTTON_1 | |||
MOUSE_BUTTON_2 | |||
MOUSE_BUTTON_3 | |||
MOUSE_BUTTON_4 | |||
MOUSE_BUTTON_5 | |||
label | |||
Inherited from Inherited from |
|
|
|
|
|
Convert from color to internal representation. Gets a string, integer or tuple/list arguments and converts into internal color representation. |
|
|
|
Draw image on canvas. By default it draws entire image at top canvas corner. You may restrict which image areas to use with src_x, src_y, width and height. You may choose position on canvas with x and y. |
Draw text on canvas. By default text is draw with current font and colors at top canvas corner. You may limit width providing a value and choose if it should wrap at words (wrap_word=True) or characters (wrap_word=False). Colors can be specified with fgcolor an bgcolor. If not provided, the system foreground color is used and no background color is used. Font name, family, size and options may be specified using font_name, font_family, font_size and font_options, respectively. Try to avoid using system specific font fames, use those provided by FONT_NAME_*. Font options is OR'ed values from FONT_OPTIONS_*. Font name is a string that have all the information, like "sans bold 12". This is returned by Font. Text alignment is one of LEFT, RIGHT or CENTER. |
|
Draw points. Efficient way to draw more than one point with the same characteristics. |
|
Draw line segments. Efficient way to draw more than one line with the same characteristics. Lines are not connected, use draw_lines instead. |
Draw lines connecting points. Points are connected using lines, but first and last points are not connected, use draw_polygon instead. |
Draw rectagle. If color is provided, it will draw the
rectangle's frame, even if filled is
True .
|
Draw arc on canvas. Arc will be the part of an ellipse that starts at (
If color is provided, it will draw the arc's
frame, even if filled is True .
Frame here is just the curve, not the straight lines that are limited by
start_angle and end_angle .
|
Draw polygon on canvas. If color is provided, it will draw the
polygon's frame, even if filled is
True .
|
|
|
|
|
|
|
|
|
|
padding
|
bgcolor
|
LEFT
|
CENTER
|
RIGHT
|
FONT_OPTION_BOLD
|
FONT_OPTION_OBLIQUE
|
FONT_OPTION_ITALIC
|
FONT_NAME_NORMAL
|
FONT_NAME_SERIF
|
FONT_NAME_SANS
|
FONT_NAME_MONO
|
MOUSE_BUTTON_1
|
MOUSE_BUTTON_2
|
MOUSE_BUTTON_3
|
MOUSE_BUTTON_4
|
MOUSE_BUTTON_5
|
label
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 3.0alpha2 on Fri Jul 28 16:22:27 2006 | http://epydoc.sf.net |