* necessary.
* @points: an array of #GdkPoint structures specifying the points making
* up the polygon.
- * @npoints: the number of points.
+ * @n_points: the number of points.
*
* Draws an outlined or filled polygon.
**/
void
-gdk_draw_polygon (GdkDrawable *drawable,
- GdkGC *gc,
- gboolean filled,
- GdkPoint *points,
- gint npoints)
+gdk_draw_polygon (GdkDrawable *drawable,
+ GdkGC *gc,
+ gboolean filled,
+ const GdkPoint *points,
+ gint n_points)
{
g_return_if_fail (GDK_IS_DRAWABLE (drawable));
g_return_if_fail (GDK_IS_GC (gc));
GDK_DRAWABLE_GET_CLASS (drawable)->draw_polygon (drawable, gc, filled,
- points, npoints);
+ (GdkPoint *) points,
+ n_points);
}
/* gdk_draw_string
**/
void
gdk_draw_pixbuf (GdkDrawable *drawable,
- GdkGC *gc,
- GdkPixbuf *pixbuf,
- gint src_x,
- gint src_y,
- gint dest_x,
- gint dest_y,
- gint width,
- gint height,
- GdkRgbDither dither,
- gint x_dither,
- gint y_dither)
+ GdkGC *gc,
+ const GdkPixbuf *pixbuf,
+ gint src_x,
+ gint src_y,
+ gint dest_x,
+ gint dest_y,
+ gint width,
+ gint height,
+ GdkRgbDither dither,
+ gint x_dither,
+ gint y_dither)
{
g_return_if_fail (GDK_IS_DRAWABLE (drawable));
g_return_if_fail (gc == NULL || GDK_IS_GC (gc));
if (height == -1)
height = gdk_pixbuf_get_height (pixbuf);
- GDK_DRAWABLE_GET_CLASS (drawable)->draw_pixbuf (drawable, gc, pixbuf,
+ GDK_DRAWABLE_GET_CLASS (drawable)->draw_pixbuf (drawable, gc,
+ (GdkPixbuf *) pixbuf,
src_x, src_y, dest_x, dest_y,
width, height,
dither, x_dither, y_dither);
* @drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
* @gc: a #GdkGC.
* @points: an array of #GdkPoint structures.
- * @npoints: the number of points to be drawn.
+ * @n_points: the number of points to be drawn.
*
* Draws a number of points, using the foreground color and other
* attributes of the #GdkGC.
**/
void
-gdk_draw_points (GdkDrawable *drawable,
- GdkGC *gc,
- GdkPoint *points,
- gint npoints)
+gdk_draw_points (GdkDrawable *drawable,
+ GdkGC *gc,
+ const GdkPoint *points,
+ gint n_points)
{
g_return_if_fail (GDK_IS_DRAWABLE (drawable));
- g_return_if_fail ((points != NULL) && (npoints > 0));
+ g_return_if_fail ((points != NULL) && (n_points > 0));
g_return_if_fail (GDK_IS_GC (gc));
- g_return_if_fail (npoints >= 0);
+ g_return_if_fail (n_points >= 0);
- if (npoints == 0)
+ if (n_points == 0)
return;
- GDK_DRAWABLE_GET_CLASS (drawable)->draw_points (drawable, gc, points, npoints);
+ GDK_DRAWABLE_GET_CLASS (drawable)->draw_points (drawable, gc,
+ (GdkPoint *) points, n_points);
}
/**
* @gc: a #GdkGC.
* @segs: an array of #GdkSegment structures specifying the start and
* end points of the lines to be drawn.
- * @nsegs: the number of line segments to draw, i.e. the size of the
+ * @n_segs: the number of line segments to draw, i.e. the size of the
* @segs array.
*
* Draws a number of unconnected lines.
**/
void
-gdk_draw_segments (GdkDrawable *drawable,
- GdkGC *gc,
- GdkSegment *segs,
- gint nsegs)
+gdk_draw_segments (GdkDrawable *drawable,
+ GdkGC *gc,
+ const GdkSegment *segs,
+ gint n_segs)
{
g_return_if_fail (GDK_IS_DRAWABLE (drawable));
- if (nsegs == 0)
+ if (n_segs == 0)
return;
g_return_if_fail (segs != NULL);
g_return_if_fail (GDK_IS_GC (gc));
- g_return_if_fail (nsegs >= 0);
+ g_return_if_fail (n_segs >= 0);
- GDK_DRAWABLE_GET_CLASS (drawable)->draw_segments (drawable, gc, segs, nsegs);
+ GDK_DRAWABLE_GET_CLASS (drawable)->draw_segments (drawable, gc,
+ (GdkSegment *) segs, n_segs);
}
/**
* @drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
* @gc: a #GdkGC.
* @points: an array of #GdkPoint structures specifying the endpoints of the
- * @npoints: the size of the @points array.
+ * @n_points: the size of the @points array.
*
* Draws a series of lines connecting the given points.
* The way in which joins between lines are draw is determined by the
* gdk_gc_set_line_attributes().
**/
void
-gdk_draw_lines (GdkDrawable *drawable,
- GdkGC *gc,
- GdkPoint *points,
- gint npoints)
+gdk_draw_lines (GdkDrawable *drawable,
+ GdkGC *gc,
+ const GdkPoint *points,
+ gint n_points)
{
g_return_if_fail (GDK_IS_DRAWABLE (drawable));
g_return_if_fail (points != NULL);
g_return_if_fail (GDK_IS_GC (gc));
- g_return_if_fail (npoints >= 0);
+ g_return_if_fail (n_points >= 0);
- if (npoints == 0)
+ if (n_points == 0)
return;
- GDK_DRAWABLE_GET_CLASS (drawable)->draw_lines (drawable, gc, points, npoints);
+ GDK_DRAWABLE_GET_CLASS (drawable)->draw_lines (drawable, gc,
+ (GdkPoint *) points, n_points);
}
static void
-real_draw_glyphs (GdkDrawable *drawable,
- GdkGC *gc,
- PangoMatrix *matrix,
- PangoFont *font,
- gdouble x,
- gdouble y,
- PangoGlyphString *glyphs)
+real_draw_glyphs (GdkDrawable *drawable,
+ GdkGC *gc,
+ const PangoMatrix *matrix,
+ PangoFont *font,
+ gdouble x,
+ gdouble y,
+ PangoGlyphString *glyphs)
{
cairo_t *cr;
* Since: 2.6
**/
void
-gdk_draw_glyphs_transformed (GdkDrawable *drawable,
- GdkGC *gc,
- PangoMatrix *matrix,
- PangoFont *font,
- gint x,
- gint y,
- PangoGlyphString *glyphs)
+gdk_draw_glyphs_transformed (GdkDrawable *drawable,
+ GdkGC *gc,
+ const PangoMatrix *matrix,
+ PangoFont *font,
+ gint x,
+ gint y,
+ PangoGlyphString *glyphs)
{
g_return_if_fail (GDK_IS_DRAWABLE (drawable));
g_return_if_fail (GDK_IS_GC (gc));
* Since: 2.6
**/
void
-gdk_draw_trapezoids (GdkDrawable *drawable,
- GdkGC *gc,
- GdkTrapezoid *trapezoids,
- gint n_trapezoids)
+gdk_draw_trapezoids (GdkDrawable *drawable,
+ GdkGC *gc,
+ const GdkTrapezoid *trapezoids,
+ gint n_trapezoids)
{
cairo_t *cr;
int i;
typedef void (*GdkRgbConvFunc) (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0,
gint width, gint height,
- guchar *buf, int rowstride,
+ const guchar *buf, int rowstride,
gint x_align, gint y_align,
GdkRgbCmap *cmap);
static void
gdk_rgb_convert_8 (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0, gint width, gint height,
- guchar *buf, int rowstride,
+ const guchar *buf, int rowstride,
gint x_align, gint y_align, GdkRgbCmap *cmap)
{
int x, y;
gint bpl;
guchar *obuf, *obptr;
- guchar *bptr, *bp2;
+ const guchar *bptr, *bp2;
gint r, g, b;
guchar *colorcube = image_info->colorcube;
static void
gdk_rgb_convert_8 (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0, gint width, gint height,
- guchar *buf, int rowstride,
+ const guchar *buf, int rowstride,
gint x_align, gint y_align, GdkRgbCmap *cmap)
{
int x, y;
gint bpl;
guchar *obuf, *obptr;
- guchar *bptr, *bp2;
+ const guchar *bptr, *bp2;
gint r, g, b;
guchar *colorcube = image_info->colorcube;
static void
gdk_rgb_convert_8_d666 (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0, gint width, gint height,
- guchar *buf, int rowstride,
+ const guchar *buf, int rowstride,
gint x_align, gint y_align, GdkRgbCmap *cmap)
{
int x, y;
gint bpl;
guchar *obuf, *obptr;
- guchar *bptr, *bp2;
+ const guchar *bptr, *bp2;
gint r, g, b;
const guchar *dmp;
gint dith;
static void
gdk_rgb_convert_8_d (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0, gint width, gint height,
- guchar *buf, int rowstride,
+ const guchar *buf, int rowstride,
gint x_align, gint y_align,
GdkRgbCmap *cmap)
{
int x, y;
gint bpl;
guchar *obuf, *obptr;
- guchar *bptr, *bp2;
+ const guchar *bptr, *bp2;
gint r, g, b;
const guchar *dmp;
gint dith;
static void
gdk_rgb_convert_8_indexed (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0, gint width, gint height,
- guchar *buf, int rowstride,
+ const guchar *buf, int rowstride,
gint x_align, gint y_align, GdkRgbCmap *cmap)
{
int x, y;
gint bpl;
guchar *obuf, *obptr;
- guchar *bptr, *bp2;
+ const guchar *bptr, *bp2;
guchar c;
guchar *lut;
GdkRgbCmapInfo *cmap_info = gdk_rgb_cmap_get_info (cmap, image_info);
static void
gdk_rgb_convert_gray8 (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0, gint width, gint height,
- guchar *buf, int rowstride,
+ const guchar *buf, int rowstride,
gint x_align, gint y_align, GdkRgbCmap *cmap)
{
int x, y;
gint bpl;
guchar *obuf, *obptr;
- guchar *bptr, *bp2;
+ const guchar *bptr, *bp2;
gint r, g, b;
bptr = buf;
static void
gdk_rgb_convert_gray8_gray (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0, gint width, gint height,
- guchar *buf, int rowstride,
+ const guchar *buf, int rowstride,
gint x_align, gint y_align, GdkRgbCmap *cmap)
{
int y;
gint bpl;
guchar *obuf;
- guchar *bptr;
+ const guchar *bptr;
bptr = buf;
bpl = image->bpl;
static void
gdk_rgb_convert_565 (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0, gint width, gint height,
- guchar *buf, int rowstride,
+ const guchar *buf, int rowstride,
gint x_align, gint y_align, GdkRgbCmap *cmap)
{
int x, y;
guchar *obuf, *obptr;
gint bpl;
- guchar *bptr, *bp2;
+ const guchar *bptr, *bp2;
guchar r, g, b;
bptr = buf;
static void
gdk_rgb_convert_565 (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0, gint width, gint height,
- guchar *buf, int rowstride,
+ const guchar *buf, int rowstride,
gint x_align, gint y_align, GdkRgbCmap *cmap)
{
int x, y;
guchar *obuf;
gint bpl;
- guchar *bptr, *bp2;
+ const guchar *bptr, *bp2;
guchar r, g, b;
bptr = buf;
static void
gdk_rgb_convert_565_gray (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0, gint width, gint height,
- guchar *buf, int rowstride,
+ const guchar *buf, int rowstride,
gint x_align, gint y_align, GdkRgbCmap *cmap)
{
int x, y;
guchar *obuf, *obptr;
gint bpl;
- guchar *bptr, *bp2;
+ const guchar *bptr, *bp2;
guchar g;
bptr = buf;
static void
gdk_rgb_convert_565_gray (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0, gint width, gint height,
- guchar *buf, int rowstride,
+ const guchar *buf, int rowstride,
gint x_align, gint y_align, GdkRgbCmap *cmap)
{
int x, y;
guchar *obuf;
gint bpl;
- guchar *bptr, *bp2;
+ const guchar *bptr, *bp2;
guchar g;
bptr = buf;
static void
gdk_rgb_convert_565_br (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0, gint width, gint height,
- guchar *buf, int rowstride,
+ const guchar *buf, int rowstride,
gint x_align, gint y_align, GdkRgbCmap *cmap)
{
int x, y;
guchar *obuf;
gint bpl;
- guchar *bptr, *bp2;
+ const guchar *bptr, *bp2;
guchar r, g, b;
bptr = buf;
#ifdef HAIRY_CONVERT_565
static void
gdk_rgb_convert_565_d (GdkRgbInfo *image_info, GdkImage *image,
- gint x0, gint y0, gint width, gint height,
- guchar *buf, int rowstride,
- gint x_align, gint y_align, GdkRgbCmap *cmap)
+ gint x0, gint y0, gint width, gint height,
+ const guchar *buf, int rowstride,
+ gint x_align, gint y_align, GdkRgbCmap *cmap)
{
/* Now this is what I'd call some highly tuned code! */
int x, y;
guchar *obuf, *obptr;
gint bpl;
- guchar *bptr, *bp2;
+ const guchar *bptr, *bp2;
width += x_align;
height += y_align;
static void
gdk_rgb_convert_565_d (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0, gint width, gint height,
- guchar *buf, int rowstride,
+ const guchar *buf, int rowstride,
gint x_align, gint y_align, GdkRgbCmap *cmap)
{
int x, y;
guchar *obuf;
gint bpl;
- guchar *bptr;
+ const guchar *bptr;
width += x_align;
height += y_align;
static void
gdk_rgb_convert_555 (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0, gint width, gint height,
- guchar *buf, int rowstride,
+ const guchar *buf, int rowstride,
gint x_align, gint y_align, GdkRgbCmap *cmap)
{
int x, y;
guchar *obuf;
gint bpl;
- guchar *bptr, *bp2;
+ const guchar *bptr, *bp2;
guchar r, g, b;
bptr = buf;
static void
gdk_rgb_convert_555_br (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0, gint width, gint height,
- guchar *buf, int rowstride,
+ const guchar *buf, int rowstride,
gint x_align, gint y_align, GdkRgbCmap *cmap)
{
int x, y;
guchar *obuf;
gint bpl;
- guchar *bptr, *bp2;
+ const guchar *bptr, *bp2;
guchar r, g, b;
bptr = buf;
static void
gdk_rgb_convert_888_msb (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0, gint width, gint height,
- guchar *buf, int rowstride,
+ const guchar *buf, int rowstride,
gint x_align, gint y_align, GdkRgbCmap *cmap)
{
int y;
guchar *obuf;
gint bpl;
- guchar *bptr;
+ const guchar *bptr;
bptr = buf;
bpl = image->bpl;
static void
gdk_rgb_convert_888_lsb (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0, gint width, gint height,
- guchar *buf, int rowstride,
+ const guchar *buf, int rowstride,
gint x_align, gint y_align, GdkRgbCmap *cmap)
{
int x, y;
guchar *obuf, *obptr;
gint bpl;
- guchar *bptr, *bp2;
+ const guchar *bptr, *bp2;
int r, g, b;
bptr = buf;
static void
gdk_rgb_convert_888_lsb (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0, gint width, gint height,
- guchar *buf, int rowstride,
+ const guchar *buf, int rowstride,
gint x_align, gint y_align, GdkRgbCmap *cmap)
{
int x, y;
guchar *obuf;
gint bpl;
- guchar *bptr, *bp2;
+ const guchar *bptr, *bp2;
int r, g, b;
bptr = buf;
static void
gdk_rgb_convert_0888 (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0, gint width, gint height,
- guchar *buf, int rowstride,
+ const guchar *buf, int rowstride,
gint x_align, gint y_align, GdkRgbCmap *cmap)
{
int y, w;
guchar *obuf, *p;
gint bpl;
- guchar *bptr, *bp2;
+ const guchar *bptr, *bp2;
bptr = buf;
bpl = image->bpl;
static void
gdk_rgb_convert_0888_medialib (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0, gint width, gint height,
- guchar *buf, int rowstride,
+ const guchar *buf, int rowstride,
gint x_align, gint y_align, GdkRgbCmap *cmap)
{
int y, w;
guchar *obuf, *p;
gint bpl;
- guchar *bptr, *bp2;
+ const guchar *bptr, *bp2;
bptr = buf;
bpl = image->bpl;
static void
gdk_rgb_convert_0888_br (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0, gint width, gint height,
- guchar *buf, int rowstride,
+ const guchar *buf, int rowstride,
gint x_align, gint y_align, GdkRgbCmap *cmap)
{
int y, w;
guchar *obuf, *p;
gint bpl;
- guchar *bptr, *bp2;
+ const guchar *bptr, *bp2;
bptr = buf;
bpl = image->bpl;
static void
gdk_rgb_convert_8880_br (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0, gint width, gint height,
- guchar *buf, int rowstride,
+ const guchar *buf, int rowstride,
gint x_align, gint y_align, GdkRgbCmap *cmap)
{
int x, y;
guchar *obuf;
gint bpl;
- guchar *bptr, *bp2;
+ const guchar *bptr, *bp2;
int r, g, b;
bptr = buf;
static void
gdk_rgb_convert_truecolor_lsb (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0, gint width, gint height,
- guchar *buf, int rowstride,
+ const guchar *buf, int rowstride,
gint x_align, gint y_align,
GdkRgbCmap *cmap)
{
int x, y;
guchar *obuf, *obptr;
gint bpl;
- guchar *bptr, *bp2;
+ const guchar *bptr, *bp2;
gint r, g, b;
gint r_right, r_left;
gint g_right, g_left;
static void
gdk_rgb_convert_truecolor_lsb_d (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0, gint width, gint height,
- guchar *buf, int rowstride,
+ const guchar *buf, int rowstride,
gint x_align, gint y_align,
GdkRgbCmap *cmap)
{
int x, y;
guchar *obuf, *obptr;
gint bpl;
- guchar *bptr, *bp2;
+ const guchar *bptr, *bp2;
gint r, g, b;
gint r_right, r_left, r_prec;
gint g_right, g_left, g_prec;
static void
gdk_rgb_convert_truecolor_msb (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0, gint width, gint height,
- guchar *buf, int rowstride,
+ const guchar *buf, int rowstride,
gint x_align, gint y_align,
GdkRgbCmap *cmap)
{
int x, y;
guchar *obuf, *obptr;
gint bpl;
- guchar *bptr, *bp2;
+ const guchar *bptr, *bp2;
gint r, g, b;
gint r_right, r_left;
gint g_right, g_left;
static void
gdk_rgb_convert_truecolor_msb_d (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0, gint width, gint height,
- guchar *buf, int rowstride,
+ const guchar *buf, int rowstride,
gint x_align, gint y_align,
GdkRgbCmap *cmap)
{
int x, y;
guchar *obuf, *obptr;
gint bpl;
- guchar *bptr, *bp2;
+ const guchar *bptr, *bp2;
gint r, g, b;
gint r_right, r_left, r_prec;
gint g_right, g_left, g_prec;
static void
gdk_rgb_convert_4 (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0, gint width, gint height,
- guchar *buf, int rowstride,
+ const guchar *buf, int rowstride,
gint x_align, gint y_align,
GdkRgbCmap *cmap)
{
int x, y;
gint bpl;
guchar *obuf, *obptr;
- guchar *bptr, *bp2;
+ const guchar *bptr, *bp2;
gint r, g, b;
const guchar *dmp;
gint dith;
static void
gdk_rgb_convert_4_pack (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0, gint width, gint height,
- guchar *buf, int rowstride,
+ const guchar *buf, int rowstride,
gint x_align, gint y_align,
GdkRgbCmap *cmap)
{
int x, y, ix;
gint bpl;
guchar *obuf, *obptr;
- guchar *bptr, *bp2;
+ const guchar *bptr, *bp2;
gint r, g, b;
const guchar *dmp;
gint dith;
static void
gdk_rgb_convert_gray4 (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0, gint width, gint height,
- guchar *buf, int rowstride,
+ const guchar *buf, int rowstride,
gint x_align, gint y_align, GdkRgbCmap *cmap)
{
int x, y;
gint bpl;
guchar *obuf, *obptr;
- guchar *bptr, *bp2;
+ const guchar *bptr, *bp2;
gint r, g, b;
gint shift;
static void
gdk_rgb_convert_gray4_pack (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0, gint width, gint height,
- guchar *buf, int rowstride,
+ const guchar *buf, int rowstride,
gint x_align, gint y_align, GdkRgbCmap *cmap)
{
int x, y;
gint bpl;
guchar *obuf, *obptr;
- guchar *bptr, *bp2;
+ const guchar *bptr, *bp2;
gint r, g, b;
gint shift;
guchar pix0, pix1;
static void
gdk_rgb_convert_gray4_d (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0, gint width, gint height,
- guchar *buf, int rowstride,
+ const guchar *buf, int rowstride,
gint x_align, gint y_align, GdkRgbCmap *cmap)
{
int x, y;
gint bpl;
guchar *obuf, *obptr;
- guchar *bptr, *bp2;
+ const guchar *bptr, *bp2;
gint r, g, b;
const guchar *dmp;
gint prec, right;
static void
gdk_rgb_convert_gray4_d_pack (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0, gint width, gint height,
- guchar *buf, int rowstride,
+ const guchar *buf, int rowstride,
gint x_align, gint y_align, GdkRgbCmap *cmap)
{
int x, y;
gint bpl;
guchar *obuf, *obptr;
- guchar *bptr, *bp2;
+ const guchar *bptr, *bp2;
gint r, g, b;
const guchar *dmp;
gint prec, right;
static void
gdk_rgb_convert_1 (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0, gint width, gint height,
- guchar *buf, int rowstride,
+ const guchar *buf, int rowstride,
gint x_align, gint y_align,
GdkRgbCmap *cmap)
{
int x, y;
gint bpl;
guchar *obuf, *obptr;
- guchar *bptr, *bp2;
+ const guchar *bptr, *bp2;
gint r, g, b;
const guchar *dmp;
gint dith;
/* This is slow. Speed me up, please. */
static void
gdk_rgb_32_to_stage (GdkRgbInfo *image_info,
- guchar *buf, gint rowstride, gint width, gint height)
+ const guchar *buf, gint rowstride, gint width, gint height)
{
gint x, y;
- guchar *pi_start, *po_start;
- guchar *pi, *po;
+ const guchar *pi_start;
+ guchar *po_start;
+ const guchar *pi;
+ guchar *po;
pi_start = buf;
po_start = gdk_rgb_ensure_stage (image_info);
static void
gdk_rgb_convert_32_generic (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0, gint width, gint height,
- guchar *buf, gint rowstride,
+ const guchar *buf, gint rowstride,
gint x_align, gint y_align, GdkRgbCmap *cmap)
{
gdk_rgb_32_to_stage (image_info, buf, rowstride, width, height);
static void
gdk_rgb_convert_32_generic_d (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0, gint width, gint height,
- guchar *buf, gint rowstride,
+ const guchar *buf, gint rowstride,
gint x_align, gint y_align, GdkRgbCmap *cmap)
{
gdk_rgb_32_to_stage (image_info, buf, rowstride, width, height);
/* This is slow. Speed me up, please. */
static void
gdk_rgb_gray_to_stage (GdkRgbInfo *image_info,
- guchar *buf, gint rowstride, gint width, gint height)
+ const guchar *buf, gint rowstride, gint width, gint height)
{
gint x, y;
- guchar *pi_start, *po_start;
- guchar *pi, *po;
+ const guchar *pi_start;
+ guchar *po_start;
+ const guchar *pi;
+ guchar *po;
guchar gray;
pi_start = buf;
static void
gdk_rgb_convert_gray_generic (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0, gint width, gint height,
- guchar *buf, gint rowstride,
+ const guchar *buf, gint rowstride,
gint x_align, gint y_align, GdkRgbCmap *cmap)
{
gdk_rgb_gray_to_stage (image_info, buf, rowstride, width, height);
static void
gdk_rgb_convert_gray_generic_d (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0, gint width, gint height,
- guchar *buf, gint rowstride,
+ const guchar *buf, gint rowstride,
gint x_align, gint y_align, GdkRgbCmap *cmap)
{
gdk_rgb_gray_to_stage (image_info, buf, rowstride, width, height);
static void
gdk_rgb_convert_gray_cmap (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0, gint width, gint height,
- guchar *buf, gint rowstride,
+ const guchar *buf, gint rowstride,
gint x_align, gint y_align, GdkRgbCmap *cmap)
{
(*image_info->conv_indexed) (image_info, image, x0, y0, width, height,
static void
gdk_rgb_convert_gray_cmap_d (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0, gint width, gint height,
- guchar *buf, gint rowstride,
+ const guchar *buf, gint rowstride,
gint x_align, gint y_align, GdkRgbCmap *cmap)
{
(*image_info->conv_indexed_d) (image_info, image, x0, y0, width, height,
/* This is slow. Speed me up, please. */
static void
gdk_rgb_indexed_to_stage (GdkRgbInfo *image_info,
- guchar *buf, gint rowstride, gint width, gint height,
+ const guchar *buf, gint rowstride, gint width, gint height,
GdkRgbCmap *cmap)
{
gint x, y;
- guchar *pi_start, *po_start;
- guchar *pi, *po;
+ const guchar *pi_start;
+ guchar *po_start;
+ const guchar *pi;
+ guchar *po;
gint rgb;
pi_start = buf;
static void
gdk_rgb_convert_indexed_generic (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0, gint width, gint height,
- guchar *buf, gint rowstride,
+ const guchar *buf, gint rowstride,
gint x_align, gint y_align, GdkRgbCmap *cmap)
{
gdk_rgb_indexed_to_stage (image_info, buf, rowstride, width, height, cmap);
static void
gdk_rgb_convert_indexed_generic_d (GdkRgbInfo *image_info, GdkImage *image,
gint x0, gint y0, gint width, gint height,
- guchar *buf, gint rowstride,
+ const guchar *buf, gint rowstride,
gint x_align, gint y_align,
GdkRgbCmap *cmap)
{
}
static void
-gdk_draw_rgb_image_core (GdkRgbInfo *image_info,
- GdkDrawable *drawable,
- GdkGC *gc,
- gint x,
- gint y,
- gint width,
- gint height,
- guchar *buf,
- gint pixstride,
- gint rowstride,
- GdkRgbConvFunc conv,
- GdkRgbCmap *cmap,
- gint xdith,
- gint ydith)
+gdk_draw_rgb_image_core (GdkRgbInfo *image_info,
+ GdkDrawable *drawable,
+ GdkGC *gc,
+ gint x,
+ gint y,
+ gint width,
+ gint height,
+ const guchar *buf,
+ gint pixstride,
+ gint rowstride,
+ GdkRgbConvFunc conv,
+ GdkRgbCmap *cmap,
+ gint xdith,
+ gint ydith)
{
gint y0, x0;
gint xs0, ys0;
GdkImage *image;
gint width1, height1;
- guchar *buf_ptr;
+ const guchar *buf_ptr;
if (image_info->bitmap)
{
}
void
-gdk_draw_rgb_image (GdkDrawable *drawable,
- GdkGC *gc,
- gint x,
- gint y,
- gint width,
- gint height,
- GdkRgbDither dith,
- guchar *rgb_buf,
- gint rowstride)
+gdk_draw_rgb_image (GdkDrawable *drawable,
+ GdkGC *gc,
+ gint x,
+ gint y,
+ gint width,
+ gint height,
+ GdkRgbDither dith,
+ const guchar *rgb_buf,
+ gint rowstride)
{
GdkRgbInfo *image_info = gdk_rgb_get_info_from_drawable (drawable);
if (!image_info)
}
void
-gdk_draw_rgb_image_dithalign (GdkDrawable *drawable,
- GdkGC *gc,
- gint x,
- gint y,
- gint width,
- gint height,
- GdkRgbDither dith,
- guchar *rgb_buf,
- gint rowstride,
- gint xdith,
- gint ydith)
+gdk_draw_rgb_image_dithalign (GdkDrawable *drawable,
+ GdkGC *gc,
+ gint x,
+ gint y,
+ gint width,
+ gint height,
+ GdkRgbDither dith,
+ const guchar *rgb_buf,
+ gint rowstride,
+ gint xdith,
+ gint ydith)
{
GdkRgbInfo *image_info = gdk_rgb_get_info_from_drawable (drawable);
if (!image_info)
}
void
-gdk_draw_rgb_32_image (GdkDrawable *drawable,
- GdkGC *gc,
- gint x,
- gint y,
- gint width,
- gint height,
- GdkRgbDither dith,
- guchar *buf,
- gint rowstride)
+gdk_draw_rgb_32_image (GdkDrawable *drawable,
+ GdkGC *gc,
+ gint x,
+ gint y,
+ gint width,
+ gint height,
+ GdkRgbDither dith,
+ const guchar *buf,
+ gint rowstride)
{
GdkRgbInfo *image_info = gdk_rgb_get_info_from_drawable (drawable);
if (!image_info)
*
**/
void
-gdk_draw_rgb_32_image_dithalign (GdkDrawable *drawable,
- GdkGC *gc,
- gint x,
- gint y,
- gint width,
- gint height,
- GdkRgbDither dith,
- guchar *buf,
- gint rowstride,
- gint xdith,
- gint ydith)
+gdk_draw_rgb_32_image_dithalign (GdkDrawable *drawable,
+ GdkGC *gc,
+ gint x,
+ gint y,
+ gint width,
+ gint height,
+ GdkRgbDither dith,
+ const guchar *buf,
+ gint rowstride,
+ gint xdith,
+ gint ydith)
{
GdkRgbInfo *image_info = gdk_rgb_get_info_from_drawable (drawable);
if (!image_info)
}
void
-gdk_draw_gray_image (GdkDrawable *drawable,
- GdkGC *gc,
- gint x,
- gint y,
- gint width,
- gint height,
- GdkRgbDither dith,
- guchar *buf,
- gint rowstride)
+gdk_draw_gray_image (GdkDrawable *drawable,
+ GdkGC *gc,
+ gint x,
+ gint y,
+ gint width,
+ gint height,
+ GdkRgbDither dith,
+ const guchar *buf,
+ gint rowstride)
{
GdkRgbInfo *image_info = gdk_rgb_get_info_from_drawable (drawable);
if (!image_info)
}
void
-gdk_draw_indexed_image (GdkDrawable *drawable,
- GdkGC *gc,
- gint x,
- gint y,
- gint width,
- gint height,
- GdkRgbDither dith,
- guchar *buf,
- gint rowstride,
- GdkRgbCmap *cmap)
+gdk_draw_indexed_image (GdkDrawable *drawable,
+ GdkGC *gc,
+ gint x,
+ gint y,
+ gint width,
+ gint height,
+ GdkRgbDither dith,
+ const guchar *buf,
+ gint rowstride,
+ GdkRgbCmap *cmap)
{
GdkRgbInfo *image_info = gdk_rgb_get_info_from_drawable (drawable);
if (!image_info)