GRASS 8 Programmer's Manual 8.6.0dev(2026)-ddeab64dbf
Loading...
Searching...
No Matches
display/window.c
Go to the documentation of this file.
1/*
2 * D_erase()
3 * Erases the window on scree. Does not affect window contents list.
4 */
5
6#include <string.h>
7#include <grass/colors.h>
8#include <grass/gis.h>
9#include <grass/display.h>
10#include "driver.h"
11
12void D_erase(const char *color)
13{
14 double t, b, l, r;
15 int colorindex;
16
17 D_get_dst(&t, &b, &l, &r);
18
19 /* Parse and select background color */
20 colorindex = D_parse_color(color, 0);
22
23 /* Do the plotting */
24 COM_Begin();
25 COM_Move(l, b);
26 COM_Cont(r, b);
27 COM_Cont(r, t);
28 COM_Cont(l, t);
29 COM_Close();
30 COM_Fill();
31}
void D_get_dst(double *, double *, double *, double *)
returns frame bounds in destination coordinate system
Definition cnversions.c:345
int D_parse_color(const char *, int)
color option text to usable color number
Definition tran_colr.c:103
int D_use_color(int)
draw with a color from D_parse_color
Definition tran_colr.c:141
void D_erase(const char *color)
void COM_Close(void)
Definition driver/draw.c:28
void COM_Cont(double x, double y)
Definition driver/draw.c:22
void COM_Fill(void)
Definition driver/draw.c:40
void COM_Move(double x, double y)
Definition driver/draw.c:16
void COM_Begin(void)
Definition driver/draw.c:10
double b
Definition r_raster.c:39
double l
Definition r_raster.c:39
double t
Definition r_raster.c:39
double r
Definition r_raster.c:39