GRASS Programmer's Manual
6.5.svn(2014)-r66266
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
pngdriver/Box.c
Go to the documentation of this file.
1
2
#include "
pngdriver.h
"
3
4
void
PNG_Box_abs
(
int
x1,
int
y1,
int
x2,
int
y2)
5
{
6
int
tmp;
7
int
x,
y
;
8
9
if
(x1 > x2)
10
tmp = x1, x1 = x2, x2 = tmp;
11
12
if
(y1 > y2)
13
tmp = y1, y1 = y2, y2 = tmp;
14
15
if
(x2 < 0 || x1 >
width
)
16
return
;
17
18
if
(y2 < 0 || y1 >
height
)
19
return
;
20
21
if
(x1 <
clip_left
)
22
x1 =
clip_left
;
23
24
if
(x2 >
clip_rite
)
25
x2 =
clip_rite
;
26
27
if
(y1 <
clip_top
)
28
y1 =
clip_top
;
29
30
if
(y2 >
clip_bot
)
31
y2 =
clip_bot
;
32
33
for
(y = y1; y < y2; y++) {
34
unsigned
int
*p = &
grid
[y * width + x1];
35
36
for
(x = x1; x < x2; x++)
37
*p++ =
currentColor
;
38
}
39
40
modified
= 1;
41
}
pngdriver.h
currentColor
int currentColor
Definition:
pngdriver/Graph_set.c:27
modified
int modified
Definition:
cairodriver/Graph.c:51
dialogs.width
tuple width
Definition:
psmap/dialogs.py:2959
clip_rite
int clip_rite
Definition:
pngdriver/Graph_set.c:33
grid
unsigned char * grid
Definition:
cairodriver/Graph.c:50
y
int y
Definition:
plot.c:34
clip_bot
int clip_bot
Definition:
pngdriver/Graph_set.c:33
PNG_Box_abs
void PNG_Box_abs(int x1, int y1, int x2, int y2)
Definition:
pngdriver/Box.c:4
clip_top
int clip_top
Definition:
pngdriver/Graph_set.c:33
clip_left
int clip_left
Definition:
pngdriver/Graph_set.c:33
height
int height
Definition:
cairodriver/Graph.c:49
lib
pngdriver
Box.c
Generated on Sat Jan 2 2016 01:46:47 for GRASS Programmer's Manual by
1.8.5