The R Project SVN R

Rev

Rev 59039 | Rev 59258 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 59039 Rev 59177
Line 1324... Line 1324...
1324
 */
1324
 */
1325
SEXP attribute_hidden do_contour(SEXP call, SEXP op, SEXP args, SEXP env)
1325
SEXP attribute_hidden do_contour(SEXP call, SEXP op, SEXP args, SEXP env)
1326
{
1326
{
1327
    SEXP oargs, c, x, y, z, vfont, col, rawcol, lty, lwd, labels;
1327
    SEXP oargs, c, x, y, z, vfont, col, rawcol, lty, lwd, labels;
1328
    int i, j, nx, ny, nc, ncol, nlty, nlwd;
1328
    int i, j, nx, ny, nc, ncol, nlty, nlwd;
1329
    int ltysave, lwdsave, fontsave = 1 /* -Wall */;
1329
    int ltysave, fontsave = 1 /* -Wall */;
1330
    rcolor colsave;
1330
    rcolor colsave;
1331
    double cexsave;
1331
    double cexsave, lwdsave;
1332
    double atom, zmin, zmax;
1332
    double atom, zmin, zmax;
1333
    const void *vmax, *vmax0;
1333
    const void *vmax, *vmax0;
1334
    char familysave[201];
1334
    char familysave[201];
1335
    int method;
1335
    int method;
1336
    Rboolean drawLabels;
1336
    Rboolean drawLabels;
Line 1383... Line 1383...
1383
 
1383
 
1384
    PROTECT(vfont = FixupVFont(CAR(args)));
1384
    PROTECT(vfont = FixupVFont(CAR(args)));
1385
    if (!isNull(vfont)) {
1385
    if (!isNull(vfont)) {
1386
	strncpy(familysave, gpptr(dd)->family, 201);
1386
	strncpy(familysave, gpptr(dd)->family, 201);
1387
	strncpy(gpptr(dd)->family, "Her ", 201);
1387
	strncpy(gpptr(dd)->family, "Her ", 201);
1388
	gpptr(dd)->family[3] = INTEGER(vfont)[0];
1388
	gpptr(dd)->family[3] = (char) INTEGER(vfont)[0];
1389
	fontsave = gpptr(dd)->font;
1389
	fontsave = gpptr(dd)->font;
1390
	gpptr(dd)->font = INTEGER(vfont)[1];
1390
	gpptr(dd)->font = INTEGER(vfont)[1];
1391
    }
1391
    }
1392
    args = CDR(args);
1392
    args = CDR(args);
1393
 
1393
 
Line 1959... Line 1959...
1959
	}
1959
	}
1960
 
1960
 
1961
	if (nv > 2) {
1961
	if (nv > 2) {
1962
	    newcol = col[icol];
1962
	    newcol = col[icol];
1963
	    if (DoLighting) {
1963
	    if (DoLighting) {
1964
		r = shade * R_RED(newcol);
1964
		r = (int)(shade * R_RED(newcol));
1965
		g = shade * R_GREEN(newcol);
1965
		g = (int)(shade * R_GREEN(newcol));
1966
		b = shade * R_BLUE(newcol);
1966
		b = (int)(shade * R_BLUE(newcol));
1967
		newcol = R_RGB(r, g, b);
1967
		newcol = R_RGB(r, g, b);
1968
	    }
1968
	    }
1969
	    GPolygon(nv, xx, yy, USER, newcol, border, dd);
1969
	    GPolygon(nv, xx, yy, USER, newcol, border, dd);
1970
	}
1970
	}
1971
    }
1971
    }