~ubuntu-branches/ubuntu/precise/grass/precise

« back to all changes in this revision

Viewing changes to display/d.rgb/main.c

  • Committer: Bazaar Package Importer
  • Author(s): Francesco Paolo Lovergine
  • Date: 2011-04-13 17:08:41 UTC
  • mfrom: (8.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20110413170841-ss1t9bic0d0uq0gz
Tags: 6.4.1-1
* New upstream version.
* Now build-dep on libjpeg-dev and current libreadline6-dev.
* Removed patch swig: obsolete.
* Policy bumped to 3.9.2, without changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
1
/****************************************************************************
3
2
 *
4
3
 * MODULE:       d.rgb
8
7
 *               Hamish Bowman <hamish_nospam yahoo.com>, 
9
8
 *               Markus Neteler <neteler itc.it>, 
10
9
 *               Radim Blazek <radim.blazek gmail.com>
11
 
 * PURPOSE:      combine three rasters to form a colour image using red, green,
 
10
 * PURPOSE:      Combine three rasters to form a colour image using red, green,
12
11
 *               and blue display channels
13
 
 * COPYRIGHT:    (C) 2001-2007 by the GRASS Development Team
 
12
 * COPYRIGHT:    (C) 2001-2007, 2010 by the GRASS Development Team
14
13
 *
15
14
 *               This program is free software under the GNU General Public
16
15
 *               License (>=v2). Read the file COPYING that comes with GRASS
52
51
    G_gisinit(argv[0]);
53
52
 
54
53
    module = G_define_module();
55
 
    module->keywords = _("display");
 
54
    module->keywords = _("display, raster, RGB");
56
55
    module->description =
57
 
        _("Displays three user-specified raster map layers "
 
56
        _("Displays three user-specified raster maps "
58
57
          "as red, green, and blue overlays in the active graphics frame.");
59
58
 
60
59
    flag_o = G_define_flag();
61
60
    flag_o->key = 'o';
62
61
    flag_o->description = _("Overlay (non-null values only)");
63
 
 
 
62
    
64
63
    flag_x = G_define_flag();
65
64
    flag_x->key = 'x';
66
65
    flag_x->description = _("Don't add to list of commands in monitor");
68
67
    for (i = 0; i < 3; i++) {
69
68
        char buff[80];
70
69
 
71
 
        sprintf(buff, _("Name of raster map to be used for <%s>"),
 
70
        sprintf(buff, _("Name of raster map to be used for '%s'"),
72
71
                color_names[i]);
73
72
 
74
 
        B[i].opt = G_define_option();
 
73
        B[i].opt = G_define_standard_option(G_OPT_R_MAP);
75
74
        B[i].opt->key = G_store(color_names[i]);
76
 
        B[i].opt->type = TYPE_STRING;
77
 
        B[i].opt->answer = NULL;
78
 
        B[i].opt->required = YES;
79
 
        B[i].opt->gisprompt = "old,cell,raster";
80
75
        B[i].opt->description = G_store(buff);
81
 
        B[i].opt->key_desc = "name";
82
76
    }
83
77
 
84
78
    if (G_parser(argc, argv))
87
81
    /* Do screen initializing stuff */
88
82
    if (R_open_driver() != 0)
89
83
        G_fatal_error(_("No graphics device selected"));
90
 
 
 
84
    
91
85
    D_get_screen_window(&t, &b, &l, &r);
92
86
    D_set_overlay_mode(flag_o->answer);
93
87
    D_cell_draw_setup(t, b, l, r);