Commit 580d76a4 authored by Anders Carlsson's avatar Anders Carlsson Committed by Anders Carlsson
Browse files

Implement these functions. (#327226, Thomas Broyer)

2006-01-18  Anders Carlsson  <andersca@imendio.com>

        * gdk/quartz/gdkdrawable-quartz.c:
        (gdk_quartz_draw_polygon):
        (gdk_quartz_draw_lines):
	Implement these functions.
	(#327226, Thomas Broyer)
parent 617595df
2006-01-18 Anders Carlsson <andersca@imendio.com>
* gdk/quartz/gdkdrawable-quartz.c:
(gdk_quartz_draw_polygon):
(gdk_quartz_draw_lines):
Implement these functions.
(#327226, Thomas Broyer)
2006-01-18 Anders Carlsson <andersca@imendio.com>
* gdk/quartz/gdkkeys-quartz.c:
(maybe_update_keymap):
Support non-MacRoman keyboard layouts.
(#322585, Wolfgang Thaller)
(maybe_update_keymap):
Support non-MacRoman keyboard layouts.
(#322585, Wolfgang Thaller)
2006-01-18 Anders Carlsson <andersca@imendio.com>
......
2006-01-18 Anders Carlsson <andersca@imendio.com>
* gdk/quartz/gdkdrawable-quartz.c:
(gdk_quartz_draw_polygon):
(gdk_quartz_draw_lines):
Implement these functions.
(#327226, Thomas Broyer)
2006-01-18 Anders Carlsson <andersca@imendio.com>
* gdk/quartz/gdkkeys-quartz.c:
(maybe_update_keymap):
Support non-MacRoman keyboard layouts.
(#322585, Wolfgang Thaller)
(maybe_update_keymap):
Support non-MacRoman keyboard layouts.
(#322585, Wolfgang Thaller)
2006-01-18 Anders Carlsson <andersca@imendio.com>
......
......@@ -209,7 +209,33 @@ gdk_quartz_draw_polygon (GdkDrawable *drawable,
GdkPoint *points,
gint npoints)
{
/* FIXME: Implement */
CGContextRef context = _gdk_quartz_drawable_get_context (drawable, FALSE, TRUE);
int i;
if (!context)
return;
_gdk_quartz_update_context_from_gc (context, gc);
if (filled)
_gdk_quartz_set_context_fill_color_from_pixel (context, gdk_drawable_get_colormap (drawable),
_gdk_gc_get_fg_pixel (gc));
else
_gdk_quartz_set_context_stroke_color_from_pixel (context, gdk_drawable_get_colormap (drawable),
_gdk_gc_get_fg_pixel (gc));
CGContextMoveToPoint (context, points[0].x, points[0].y);
for (i = 1; i < npoints; i++)
CGContextAddLineToPoint (context, points[i].x, points[i].y);
CGContextClosePath (context);
if (filled)
CGContextFillPath (context);
else
CGContextStrokePath (context);
_gdk_quartz_drawable_release_context (drawable, context);
}
static void
......@@ -338,7 +364,25 @@ gdk_quartz_draw_lines (GdkDrawable *drawable,
GdkPoint *points,
gint npoints)
{
/* FIXME: Implement */
CGContextRef context = _gdk_quartz_drawable_get_context (drawable, FALSE, TRUE);
int i;
if (!context)
return;
_gdk_quartz_update_context_from_gc (context, gc);
_gdk_quartz_set_context_stroke_color_from_pixel (context, gdk_drawable_get_colormap (drawable),
_gdk_gc_get_fg_pixel (gc));
for (i = 1; i < npoints; i++)
{
CGContextMoveToPoint (context, points[i - 1].x, points[i - 1].y);
CGContextAddLineToPoint (context, points[i].x, points[i].y);
}
CGContextStrokePath (context);
_gdk_quartz_drawable_release_context (drawable, context);
}
static void
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment