コード例 #1
0
ファイル: area.cpp プロジェクト: ierofant/graphbox
void GrBx::Area::draw_graphs ()
{
    if (window && is_drawable ())
    {
	window->draw_rectangle (get_style ()->get_fg_gc (Gtk::STATE_NORMAL), true, 0, 0, get_width (), get_height ());

	Cairo::RefPtr<Cairo::Context> cr = window->create_cairo_context ();
	Cairo::Matrix matrix (1, 0, 0, -1, - hadjustment.get_value (), get_height () + vadjustment.get_value ());
	cr->transform (matrix);
	for (Graphs::iterator gitr = graphs.begin (); gitr != graphs.end (); ++gitr)
	    if ((*gitr)->get_visible ()) (*gitr)->draw (cr, sx, sy);

	update_pixbuf ();
    }
}