#include "gtkgl.h"
#include "grits-marker.h"
-#ifdef SYS_WIN
-#include <GL/glext.h>
-#endif
-
/* Texture setup functions */
static void render_point(GritsMarker *marker)
{
/* Draw outline */
- cairo_set_source_rgba(marker->cairo, 0, 0, 0, 1);
+ cairo_set_line_join(marker->cairo, CAIRO_LINE_JOIN_ROUND);
cairo_set_line_width(marker->cairo, marker->outline*2);
+ cairo_set_source_rgba(marker->cairo, 0, 0, 0, 1);
cairo_arc(marker->cairo, marker->xoff, marker->yoff, marker->radius,
0, 2*G_PI);
{
g_assert(marker->label);
+ /* Draw outline */
+ cairo_set_line_join(marker->cairo, CAIRO_LINE_JOIN_ROUND);
+ cairo_set_line_width(marker->cairo, marker->outline*2);
cairo_set_source_rgba(marker->cairo, 0, 0, 0, 1);
cairo_select_font_face(marker->cairo, "sans-serif",
CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
{
GritsMarker *marker = g_object_new(GRITS_TYPE_MARKER, NULL);
+ GRITS_OBJECT(marker)->skip = GRITS_SKIP_CENTER;
+
marker->display_mask = GRITS_MARKER_DMASK_POINT |
GRITS_MARKER_DMASK_LABEL;
point->lat, point->lon, point->elev,
&px, &py, &pz);
- gint win_width = GTK_WIDGET(opengl)->allocation.width;
- gint win_height = GTK_WIDGET(opengl)->allocation.height;
if (pz > 1)
return;
- glMatrixMode(GL_PROJECTION); glLoadIdentity();
- glMatrixMode(GL_MODELVIEW); glLoadIdentity();
- glOrtho(0, win_width, win_height, 0, 1, -1);
- glTranslated(px, win_height-py, 0);
+ GtkAllocation alloc;
+ gtk_widget_get_allocation(GTK_WIDGET(opengl), &alloc);
+ glTranslated(px, alloc.height-py, 0);
glRotatef(marker->angle, 0, 0, -1);
glTranslated(-marker->xoff, -marker->yoff, 0);
} else {