Package pygtk_chart :: Module chart :: Class Background
[hide private]
[frames] | no frames]

Class Background

source code


The background of a chart.

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
do_get_property(self, property) source code
 
do_set_property(self, property, value) source code
 
_do_draw(self, context, rect)
Do all the drawing stuff.
source code
 
set_color(self, color)
The set_color() method can be used to change the color of the background.
source code
 
get_color(self) source code
 
set_gradient(self, color_start, color_end)
Use set_gradient() to define a vertical gradient as the background.
source code
 
get_gradient(self) source code
 
set_image(self, filename)
The set_image() method sets the background to be filled with a png image.
source code
 
get_image(self) source code

Inherited from ChartObject: draw, get_antialias, get_visible, set_antialias, set_visible

Inherited from unreachable.GObject: __cmp__, __copy__, __deepcopy__, __delattr__, __gdoc__, __gobject_init__, __hash__, __new__, __repr__, __setattr__, chain, connect, connect_after, connect_object, connect_object_after, disconnect, disconnect_by_func, emit, emit_stop_by_name, freeze_notify, get_data, get_properties, get_property, handler_block, handler_block_by_func, handler_disconnect, handler_is_connected, handler_unblock, handler_unblock_by_func, notify, props, set_data, set_properties, set_property, stop_emission, thaw_notify, weak_ref

Inherited from object: __getattribute__, __reduce__, __reduce_ex__, __str__

Class Variables [hide private]
  __gproperties__ = {"color":(gobject.TYPE_PYOBJECT, "background...
  __gtype__ = <GType pygtk_chart+chart+Background (167882176)>

Inherited from ChartObject: __gsignals__

Properties [hide private]

Inherited from unreachable.GObject: __grefcount__

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

do_get_property(self, property)

source code 
Overrides: ChartObject.do_get_property

do_set_property(self, property, value)

source code 
Overrides: ChartObject.do_set_property

_do_draw(self, context, rect)

source code 

Do all the drawing stuff.

Parameters:
  • context (cairo.Context) - The context to draw on.
  • rect (gtk.gdk.Rectangle) - A rectangle representing the charts area.
Overrides: ChartObject._do_draw

set_color(self, color)

source code 

The set_color() method can be used to change the color of the background.

Parameters:
  • color (a color) - Set the background to be filles with this color.

set_gradient(self, color_start, color_end)

source code 

Use set_gradient() to define a vertical gradient as the background.

Parameters:
  • color_start (a color) - The starting (top) color of the gradient.
  • color_end (a color) - The ending (bottom) color of the gradient.

set_image(self, filename)

source code 

The set_image() method sets the background to be filled with a png image.

Parameters:
  • filename (string) - Path to the png file you want to use as background image. If the file does not exists, the background is set to white.

Class Variable Details [hide private]

__gproperties__

Value:
{"color":(gobject.TYPE_PYOBJECT, "background color", "The color of the\
 backround in (r,g,b) format. r,g,b in [0,1]", gobject.PARAM_READWRITE\
), "gradient":(gobject.TYPE_PYOBJECT, "background gradient", "A backgr\
ound gardient. (first_color, second_color)", gobject.PARAM_READWRITE),\
 "image":(gobject.TYPE_STRING, "background image file", "Path to the i\
mage file to use as background.", "", gobject.PARAM_READWRITE)}