|
From: <arj...@us...> - 2013-12-06 07:20:50
|
Revision: 12820
http://sourceforge.net/p/plplot/code/12820
Author: arjenmarkus
Date: 2013-12-06 07:20:46 +0000 (Fri, 06 Dec 2013)
Log Message:
-----------
Support the "rectangular" argument to plshades
Modified Paths:
--------------
trunk/bindings/f95/sccont.c
trunk/bindings/f95/sfstubs.f90
Modified: trunk/bindings/f95/sccont.c
===================================================================
--- trunk/bindings/f95/sccont.c 2013-12-06 00:23:27 UTC (rev 12819)
+++ trunk/bindings/f95/sccont.c 2013-12-06 07:20:46 UTC (rev 12820)
@@ -73,12 +73,12 @@
void PLSHADES07( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined,
PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax,
PLFLT *clevel, PLINT *nlevel, PLFLT *fill_width,
- PLINT *cont_color, PLFLT *cont_width, PLINT *lx );
+ PLINT *cont_color, PLFLT *cont_width, PLINT *lx, PLINT *rect );
void PLSHADES17( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined,
PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax,
PLFLT *clevel, PLINT *nlevel, PLFLT *fill_width,
PLINT *cont_color, PLFLT *cont_width,
- PLFLT *xg1, PLFLT *yg1, PLINT *lx );
+ PLFLT *xg1, PLFLT *yg1, PLINT *lx, PLINT *rect );
void PLSHADES27( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined,
PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax,
PLFLT *clevel, PLINT *nlevel, PLFLT *fill_width,
@@ -519,9 +519,8 @@
PLSHADES07( PLFLT *z, PLINT *nx, PLINT *ny, const char * PL_UNUSED( defined ),
PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax,
PLFLT *clevel, PLINT *nlevel, PLFLT *fill_width,
- PLINT *cont_color, PLFLT *cont_width, PLINT *lx )
+ PLINT *cont_color, PLFLT *cont_width, PLINT *lx, PLINT *rect )
{
- PLINT rect = 1;
PLFLT ** a;
int i, j;
@@ -539,7 +538,7 @@
*xmin, *xmax, *ymin, *ymax,
clevel, *nlevel, *fill_width,
*cont_color, *cont_width,
- c_plfill, rect, NULL, NULL );
+ c_plfill, *rect, NULL, NULL );
// Clean up memory allocated for a
plFree2dGrid( a, *nx, *ny );
@@ -550,9 +549,8 @@
PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax,
PLFLT *clevel, PLINT *nlevel, PLFLT *fill_width,
PLINT *cont_color, PLFLT *cont_width,
- PLFLT *xg1, PLFLT *yg1, PLINT *lx )
+ PLFLT *xg1, PLFLT *yg1, PLINT *lx, PLINT *rect )
{
- PLINT rect = 1;
PLFLT ** a;
int i, j;
PLcGrid cgrid;
@@ -576,12 +574,15 @@
*xmin, *xmax, *ymin, *ymax,
clevel, *nlevel, *fill_width,
*cont_color, *cont_width,
- c_plfill, rect, pltr1, ( PLPointer ) & cgrid );
+ c_plfill, *rect, pltr1, ( PLPointer ) & cgrid );
// Clean up memory allocated for a
plFree2dGrid( a, *nx, *ny );
}
+
+// Note that in this case the rectangular argument should always be 0,
+// it makes no sense to propagate it as an optional argument
void
PLSHADES27( PLFLT *z, PLINT *nx, PLINT *ny, const char * PL_UNUSED( defined ),
PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax,
Modified: trunk/bindings/f95/sfstubs.f90
===================================================================
--- trunk/bindings/f95/sfstubs.f90 2013-12-06 00:23:27 UTC (rev 12819)
+++ trunk/bindings/f95/sfstubs.f90 2013-12-06 07:20:46 UTC (rev 12820)
@@ -502,22 +502,30 @@
subroutine plshades_multiple_0(z, defined, &
xmin, xmax, ymin, ymax, &
clevel, fill_width, &
- cont_color, cont_width )
+ cont_color, cont_width, rectangular)
implicit none
character defined*(*)
integer cont_color
+ logical, optional :: rectangular
real(kind=plflt) fill_width, cont_width
real(kind=plflt) clevel(:)
real(kind=plflt) z(:,:), xmin, xmax, ymin, ymax
+ integer rect
+
! call plstrf2c(dnam, string1)
+ rect = 1
+ if ( present(rectangular) ) then
+ rect = merge( 1, 0, rectangular )
+ endif
+
s1 = transfer( string1, s1 )
call plshades07(z, size(z,1), size(z,2), s1, &
xmin, xmax, ymin, ymax, &
clevel, size(clevel), fill_width, &
- cont_color, cont_width, size(z,1))
+ cont_color, cont_width, size(z,1), rect)
end subroutine
@@ -526,23 +534,31 @@
subroutine plshades_multiple_1(z, defined, &
xmin, xmax, ymin, ymax, &
clevel, fill_width, &
- cont_color, cont_width, xg1, yg1)
+ cont_color, cont_width, xg1, yg1, rectangular)
implicit none
character defined*(*)
integer cont_color
+ logical, optional :: rectangular
real(kind=plflt) fill_width, cont_width
real(kind=plflt) clevel(:)
real(kind=plflt) z(:,:), xmin, xmax, ymin, ymax, &
xg1(:), yg1(:)
+ integer rect
+
! call plstrf2c(dnam, string1)
+ rect = 1
+ if ( present(rectangular) ) then
+ rect = merge( 1, 0, rectangular )
+ endif
+
s1 = transfer( string1, s1 )
call plshades17(z, size(z,1), size(z,2), s1, &
xmin, xmax, ymin, ymax, &
clevel, size(clevel), fill_width, &
- cont_color, cont_width, xg1, yg1, size(z,1))
+ cont_color, cont_width, xg1, yg1, size(z,1), rect)
end subroutine
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|