Logo Search packages:      
Sourcecode: navit version File versions

struct map_selection* map_selection_dup_pro ( struct map_selection sel,
enum projection  from,
enum projection  to 
) [read]

Duplicates a map selection, transforming coordinates.

This duplicates a map selection and at the same time transforms the internal coordinates of the selection from one projection to another.

sel The map selection to be duplicated
from The projection used for the selection at the moment
to The projection that should be used for the duplicated selection
A duplicated, transformed map selection

Definition at line 491 of file map.c.

References map_selection::c_rect, map_selection::next, and map_selection::u.

Referenced by map_selection_dup().

      struct map_selection *next,**last;
      struct map_selection *ret=NULL;
      while (sel) {
            next = g_new(struct map_selection, 1);
            if (from != projection_none || to != projection_none) {
                  transform_from_to(&sel->u.c_rect.lu, from, &next->u.c_rect.lu, to);
                  transform_from_to(&sel->u.c_rect.rl, from, &next->u.c_rect.rl, to);
            sel = sel->next;
      return ret;

Generated by  Doxygen 1.6.0   Back to index