/*! \todo Finish function documentation!!! * \brief * \par Function Description * */ void x_repaint_background_region (GschemToplevel *w_current, cairo_t *cr, int x, int y, int width, int height) { GdkColor *color = x_get_color (w_current->background_color); cairo_set_source_rgb (cr, color->red / 65535.0, color->green / 65535.0, color->blue / 65535.0); cairo_paint (cr); x_grid_draw_region (w_current, cr, x, y, width, height); }
/*! \brief Records a new point for the stroke. * \par Function Description * This function adds the point (<B>x</B>,<B>y</B>) as a new point in * the stroke. * * The footprint is updated and the new point is drawn on the drawing area. * * \param [in] w_current The GSCHEM_TOPLEVEL object. * \param [in] x The X coord of the new point. * \param [in] Y The X coord of the new point. */ void x_stroke_record (GSCHEM_TOPLEVEL *w_current, gint x, gint y) { g_assert (stroke_points != NULL); stroke_record (x, y); if (stroke_points->len < STROKE_MAX_POINTS) { StrokePoint point = { x, y }; g_array_append_val (stroke_points, point); gdk_gc_set_foreground (w_current->gc, x_get_color (STROKE_COLOR)); gdk_draw_point (w_current->window, w_current->gc, x, y); } }
/*! \brief Records a new point for the stroke. * \par Function Description * This function adds the point (<B>x</B>,<B>y</B>) as a new point in * the stroke. * * The footprint is updated and the new point is drawn on the drawing area. * * \param [in] w_current The GschemToplevel object. * \param [in] x The X coord of the new point. * \param [in] Y The X coord of the new point. */ void x_stroke_record (GschemToplevel *w_current, gint x, gint y) { GschemPageView *view = gschem_toplevel_get_current_page_view (w_current); g_return_if_fail (view != NULL); GdkGC *view_gc = gschem_page_view_get_gc (view); g_assert (stroke_points != NULL); stroke_record (x, y); if (stroke_points->len < STROKE_MAX_POINTS) { StrokePoint point = { x, y }; g_array_append_val (stroke_points, point); gdk_gc_set_foreground (view_gc, x_get_color (STROKE_COLOR)); gdk_draw_point (gtk_widget_get_window (GTK_WIDGET(view)), view_gc, x, y); } }