+void vik_viewport_draw_copyright ( VikViewport *vvp )
+{
+ g_return_if_fail ( vvp != NULL );
+
+ PangoFontDescription *pfd;
+ PangoLayout *pl;
+ PangoRectangle ink_rect, logical_rect;
+ gchar s[128] = "";
+
+ /* compute copyrights string */
+ guint len = g_slist_length ( vvp->copyrights );
+ int i;
+ for (i = 0 ; i < len ; i++)
+ {
+ gchar *copyright = g_slist_nth_data ( vvp->copyrights, i );
+ strcat ( s, copyright );
+ strcat ( s, " " );
+ }
+
+ /* create pango layout */
+ pl = gtk_widget_create_pango_layout (GTK_WIDGET(&vvp->drawing_area), NULL);
+ pfd = pango_font_description_from_string ("Sans 8"); // FIXME: settable option? global variable?
+ pango_layout_set_font_description (pl, pfd);
+ pango_font_description_free (pfd);
+ pfd = NULL;
+ pango_layout_set_alignment ( pl, PANGO_ALIGN_RIGHT );
+
+ /* Set the text */
+ pango_layout_set_text(pl, s, -1);
+
+ /* Use maximum of half the viewport width */
+ pango_layout_set_width ( pl, ( vvp->width / 2 - PAD ) * PANGO_SCALE );
+ pango_layout_get_pixel_extents(pl, &ink_rect, &logical_rect);
+ vik_viewport_draw_layout(vvp, GTK_WIDGET(&vvp->drawing_area)->style->black_gc,
+ vvp->width / 2, vvp->height - PAD - logical_rect.height, pl);
+
+ /* Free memory */
+ g_object_unref(pl);
+ pl = NULL;
+}
+
+/**
+ * vik_viewport_set_draw_centermark:
+ * @vvp: self object
+ * @draw_centermark: new value
+ *
+ * Enable/Disable display of center mark.
+ */