~ubuntu-branches/ubuntu/wily/grass/wily

« back to all changes in this revision

Viewing changes to imagery/i.points/title.c

Tags: 7.0.0~rc1+ds1-1~exp1
* New upstream release candidate.
* Repack upstream tarball, remove precompiled Python objects.
* Add upstream metadata.
* Update gbp.conf and Vcs-Git URL to use the experimental branch.
* Update watch file for GRASS 7.0.
* Drop build dependencies for Tcl/Tk, add build dependencies:
  python-numpy, libnetcdf-dev, netcdf-bin, libblas-dev, liblapack-dev
* Update Vcs-Browser URL to use cgit instead of gitweb.
* Update paths to use grass70.
* Add configure options: --with-netcdf, --with-blas, --with-lapack,
  remove --with-tcltk-includes.
* Update patches for GRASS 7.
* Update copyright file, changes:
  - Update copyright years
  - Group files by license
  - Remove unused license sections
* Add patches for various typos.
* Fix desktop file with patch instead of d/rules.
* Use minimal dh rules.
* Bump Standards-Version to 3.9.6, no changes.
* Use dpkg-maintscript-helper to replace directories with symlinks.
  (closes: #776349)
* Update my email to use @debian.org address.

Show diffs side-by-side

added added

removed removed

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