static void 
gtk_plot_canvas_ellipse_draw 		(GtkPlotCanvas *canvas,
					 GtkPlotCanvasChild *child)
{
  GtkPlotCanvasEllipse *ellipse = GTK_PLOT_CANVAS_ELLIPSE(child);
  gint width = child->allocation.width;
  gint height = child->allocation.height;

  if(width == 0 && height == 0) return;

  if(ellipse->filled){
     gtk_plot_pc_set_color(canvas->pc, &ellipse->bg);
     gtk_plot_pc_draw_ellipse(canvas->pc, TRUE,
                              child->allocation.x, child->allocation.y, 
                              width, height);
  }
  gtk_plot_canvas_set_line_attributes(canvas, ellipse->line);
  if(ellipse->line.line_style != GTK_PLOT_LINE_NONE)
     gtk_plot_pc_draw_ellipse(canvas->pc, FALSE,
                              child->allocation.x, child->allocation.y, 
                              width, height);

}
static void 
gtk_plot_canvas_rectangle_draw 		(GtkPlotCanvas *canvas,
					 GtkPlotCanvasChild *child)
{
  GtkPlotCanvasRectangle *rectangle = GTK_PLOT_CANVAS_RECTANGLE(child);
  gint width = child->allocation.width;
  gint height = child->allocation.height;
  gdouble m = canvas->magnification;

  if(width == 0 && height == 0) return;

  if(rectangle->filled){
     gtk_plot_pc_set_color(canvas->pc, &rectangle->bg);
     gtk_plot_pc_draw_rectangle(canvas->pc, TRUE,
                                child->allocation.x, child->allocation.y, 
				width, height);
  }
  if(rectangle->line.line_style != GTK_PLOT_LINE_NONE &&
     rectangle->border != GTK_PLOT_BORDER_NONE){
                                                                          
      gtk_plot_canvas_set_line_attributes(canvas, rectangle->line);
      gtk_plot_pc_draw_rectangle(canvas->pc, FALSE,
                                 child->allocation.x, child->allocation.y,
                                 width, height);
      if(rectangle->border == GTK_PLOT_BORDER_SHADOW){
        gtk_plot_pc_draw_rectangle(canvas->pc,
                           TRUE,
                           child->allocation.x + roundint(rectangle->shadow_width * m),
                           child->allocation.y + height,
                           width, roundint(rectangle->shadow_width * m));
        gtk_plot_pc_draw_rectangle(canvas->pc,
                           TRUE,
                           child->allocation.x + width,
                           child->allocation.y + roundint(rectangle->shadow_width * m),
                           roundint(rectangle->shadow_width * m), height);            }
  }
}