~ubuntu-branches/ubuntu/vivid/grass/vivid-proposed

« back to all changes in this revision

Viewing changes to imagery/i.ortho.photo/i.photo.2target/title.c

  • Committer: Package Import Robot
  • Author(s): Bas Couwenberg
  • Date: 2015-02-20 23:12:08 UTC
  • mfrom: (8.2.6 experimental)
  • Revision ID: package-import@ubuntu.com-20150220231208-1u6qvqm84v430b10
Tags: 7.0.0-1~exp1
* New upstream release.
* Update python-ctypes-ternary.patch to use if/else instead of and/or.
* Drop check4dev patch, rely on upstream check.
* Add build dependency on libpq-dev to grass-dev for libpq-fe.h.
* Drop patches applied upstream, refresh remaining patches.
* Update symlinks for images switched from jpg to png.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#include <grass/raster.h>
2
 
#include "globals.h"
3
 
#include "local_proto.h"
4
 
 
5
 
int display_title(View * view)
6
 
{
7
 
    View *title;
8
 
    char left[100], center[100];
9
 
    int size;
10
 
 
11
 
    *left = 0;
12
 
    *center = 0;
13
 
 
14
 
    if (view->cell.configured) {
15
 
        sprintf(center, "%s (mag %.1f)",
16
 
                view->cell.name, magnification(view));
17
 
    }
18
 
 
19
 
    if (view == VIEW_MAP1) {
20
 
        sprintf(left, "%s", G_location());
21
 
        title = VIEW_TITLE1;
22
 
    }
23
 
    else if (view == VIEW_MAP1_ZOOM) {
24
 
        title = VIEW_TITLE1_ZOOM;
25
 
    }
26
 
 
27
 
    if (view == VIEW_MAP2) {
28
 
        sprintf(left, "%s", G_location());
29
 
        title = VIEW_TITLE2;
30
 
    }
31
 
    else if (view == VIEW_MAP2_ZOOM) {
32
 
        title = VIEW_TITLE2_ZOOM;
33
 
    }
34
 
 
35
 
    Erase_view(title);
36
 
    R_standard_color(WHITE);
37
 
    size = title->nrows - 4;
38
 
    R_text_size(size, size);
39
 
    Text(left, title->top, title->bottom, title->left, title->right, 2);
40
 
    if (*center) {
41
 
        R_standard_color(YELLOW);
42
 
        Text(center, title->top, title->bottom,
43
 
             (title->left + title->right - Text_width(center)) / 2,
44
 
             title->right, 2);
45
 
    }
46
 
 
47
 
    return 0;
48
 
}