1
! $Id: x25f.f90 11680 2011-03-27 17:57:51Z airwin $
3
! Filling and clipping polygons.
5
! Copyright (C) 2005 Arjen Markus
6
! Copyright (C) 2008 Andrew Ross
8
! This file is part of PLplot.
10
! PLplot is free software; you can redistribute it and/or modify
11
! it under the terms of the GNU Library General Public License as published
12
! by the Free Software Foundation; either version 2 of the License, or
13
! (at your option) any later version.
15
! PLplot is distributed in the hope that it will be useful,
16
! but WITHOUT ANY WARRANTY; without even the implied warranty of
17
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
! GNU Library General Public License for more details.
20
! You should have received a copy of the GNU Library General Public License
21
! along with PLplot; if not, write to the Free Software
22
! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
25
! --------------------------------------------------------------------------
28
! Test program for filling polygons and proper clipping
29
! --------------------------------------------------------------------------
38
real(kind=plflt) xextreme(2,10)
39
real(kind=plflt) yextreme(2,10)
40
real(kind=plflt) x0(10)
41
real(kind=plflt) y0(10)
43
data ( xextreme(1,i), xextreme(2,i), yextreme(1,i), yextreme(2,i), &
45
-120.0_plflt, 120.0_plflt, -120.0_plflt, 120.0_plflt, &
46
-120.0_plflt, 120.0_plflt, 20.0_plflt, 120.0_plflt, &
47
-120.0_plflt, 120.0_plflt, -20.0_plflt, 120.0_plflt, &
48
-80.0_plflt, 80.0_plflt, -20.0_plflt, 120.0_plflt, &
49
-220.0_plflt, -120.0_plflt, -120.0_plflt, 120.0_plflt, &
50
-20.0_plflt, 20.0_plflt, -120.0_plflt, 120.0_plflt, &
51
-20.0_plflt, 20.0_plflt, -20.0_plflt, 20.0_plflt, &
52
-80.0_plflt, 80.0_plflt, -80.0_plflt, 80.0_plflt, &
53
20.0_plflt, 120.0_plflt, -120.0_plflt, 120.0_plflt/
57
! Parse and process command line arguments
59
call plparseopts(PL_PARSE_FULL)
70
! Polygon 1: a diamond
82
! Polygon 1: a diamond - reverse direction
94
! Polygon 2: a square with punctures
114
y0(10) = -100.0_plflt
118
! Polygon 2: a square with punctures - reversed direction
119
x0(10) = -100.0_plflt
120
y0(10) = -100.0_plflt
145
call plwind(xextreme(1,i), xextreme(2,i), &
146
yextreme(1,i), yextreme(2,i))
149
call plbox('bc', 1.0d0, 0, 'bcnv', 10.0d0, 0)
153
call plfill(x0(1:npts),y0(1:npts))
155
call plgradient(x0(1:npts),y0(1:npts),45.d0)
159
call plline(x0(1:npts),y0(1:npts))
163
! Don't forget to call plend() to finish off!