static void
gtk_compass_init (GtkCompass *compass)
{
-g_printf("%s()\n", __PRETTY_FUNCTION__);
-
compass->gc_h=NULL;
compass->gc_d=NULL;
compass->gc_w=NULL;
gtk_compass_finalize(GObject *object)
{
GtkCompass *compass;
-
-g_printf("%s()\n", __PRETTY_FUNCTION__);
g_return_if_fail(GTK_IS_COMPASS(object));
compass=GTK_COMPASS(object);
gtk_compass_size_request(GtkWidget *widget, GtkRequisition *requisition)
{
GtkCompass *compass;
-
-g_printf("%s()\n", __PRETTY_FUNCTION__);
g_return_if_fail(GTK_IS_COMPASS(widget));
g_return_if_fail(requisition != NULL);
{
GtkCompass *compass;
-g_printf("%s()\n", __PRETTY_FUNCTION__);
-
g_return_if_fail(GTK_IS_COMPASS(widget));
g_return_if_fail(allocation!=NULL);
GdkWindowAttr attributes;
gint attributes_mask;
-g_printf("%s()\n", __PRETTY_FUNCTION__);
-
g_return_if_fail (GTK_IS_COMPASS(widget));
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
compass=GTK_COMPASS(widget);
gtk_compass_paint(GtkCompass *compass)
{
GtkWidget *widget;
-guint i, x, y, size, hsize;
+guint i, x, y, size, hsize, fs;
gint dir;
gfloat tmp;
gchar *text;
size=compass->size;
hsize=size/2;
+fs=size/42;
+BOUND(fs, 1, 16);
+
pango_context_set_matrix (compass->context, NULL);
g_snprintf(htext, 8, "%3.0f°", compass->data->heading);
pango_matrix_rotate (&matrix, dir);
pango_context_set_matrix (compass->context, &matrix);
- pango_font_description_set_size(compass->fontdesc, (10 + x) * PANGO_SCALE);
+ pango_font_description_set_size(compass->fontdesc, (10 + x + fs) * PANGO_SCALE);
pango_layout_set_font_description(compass->layout, compass->fontdesc);
pango_layout_set_text(compass->layout, text, -1);
pango_layout_get_pixel_size(compass->layout, &x, &y);
}
}
-return TRUE;
+return;
}
{
GtkCompass *compass;
-g_printf("%s()\n", __PRETTY_FUNCTION__);
g_return_if_fail(GTK_IS_COMPASS(widget));
compass=GTK_COMPASS(widget);
gtk_compass_paint(compass);
-
-g_printf("%s(): return\n", __PRETTY_FUNCTION__);
}