The R Project SVN R

Rev

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

Rev 30129 Rev 30980
Line 1423... Line 1423...
1423
	fontindex = INTEGER(vfont)[1];
1423
	fontindex = INTEGER(vfont)[1];
1424
    }
1424
    }
1425
    args = CDR(args);
1425
    args = CDR(args);
1426
 
1426
 
1427
    rawcol = CAR(args);
1427
    rawcol = CAR(args);
1428
    PROTECT(col = FixupCol(rawcol, NA_INTEGER));
1428
    PROTECT(col = FixupCol(rawcol, R_TRANWHITE));
1429
    ncol = length(col);
1429
    ncol = length(col);
1430
    args = CDR(args);
1430
    args = CDR(args);
1431
 
1431
 
1432
    PROTECT(lty = FixupLty(CAR(args), Rf_gpptr(dd)->lty));
1432
    PROTECT(lty = FixupLty(CAR(args), Rf_gpptr(dd)->lty));
1433
    nlty = length(lty);
1433
    nlty = length(lty);
Line 1696... Line 1696...
1696
	errorcall(call, "dimension mismatch");
1696
	errorcall(call, "dimension mismatch");
1697
 
1697
 
1698
    if (nc < 1)
1698
    if (nc < 1)
1699
	errorcall(call, "no contour values");
1699
	errorcall(call, "no contour values");
1700
 
1700
 
1701
    PROTECT(scol = FixupCol(CAR(args), NA_INTEGER));
1701
    PROTECT(scol = FixupCol(CAR(args), R_TRANWHITE));
1702
    ncol = length(scol);
1702
    ncol = length(scol);
1703
 
1703
 
1704
    /* Shorthand Pointers */
1704
    /* Shorthand Pointers */
1705
 
1705
 
1706
    x = REAL(sx);
1706
    x = REAL(sx);
Line 1745... Line 1745...
1745
				    z[i - 1 + j * nx],
1745
				    z[i - 1 + j * nx],
1746
				    z[i + j * nx],
1746
				    z[i + j * nx],
1747
				    px, py, pz, &npt);
1747
				    px, py, pz, &npt);
1748
                if (npt > 2)
1748
                if (npt > 2)
1749
		    GPolygon(npt, px, py, USER, col[(k-1)%ncol],
1749
		    GPolygon(npt, px, py, USER, col[(k-1)%ncol],
1750
			     NA_INTEGER, dd);
1750
			     R_TRANWHITE, dd);
1751
	    }
1751
	    }
1752
	}
1752
	}
1753
    }
1753
    }
1754
    GMode(0, dd);
1754
    GMode(0, dd);
1755
    Rf_gpptr(dd)->col = colsave;
1755
    Rf_gpptr(dd)->col = colsave;
Line 1798... Line 1798...
1798
 
1798
 
1799
    sz = CAR(args);
1799
    sz = CAR(args);
1800
    internalTypeCheck(call, sz, INTSXP);
1800
    internalTypeCheck(call, sz, INTSXP);
1801
    args = CDR(args);
1801
    args = CDR(args);
1802
 
1802
 
1803
    PROTECT(sc = FixupCol(CAR(args), NA_INTEGER));
1803
    PROTECT(sc = FixupCol(CAR(args), R_TRANWHITE));
1804
    nc = LENGTH(sc);
1804
    nc = LENGTH(sc);
1805
 
1805
 
1806
    /* Shorthand Pointers */
1806
    /* Shorthand Pointers */
1807
 
1807
 
1808
    x = REAL(sx);
1808
    x = REAL(sx);
Line 1831... Line 1831...
1831
    for (i = 0; i < nx - 1 ; i++) {
1831
    for (i = 0; i < nx - 1 ; i++) {
1832
	for (j = 0; j < ny - 1; j++) {
1832
	for (j = 0; j < ny - 1; j++) {
1833
	    tmp = z[i + j * (nx - 1)];
1833
	    tmp = z[i + j * (nx - 1)];
1834
	    if (tmp >= 0 && tmp < nc && tmp != NA_INTEGER)
1834
	    if (tmp >= 0 && tmp < nc && tmp != NA_INTEGER)
1835
		GRect(x[i], y[j], x[i+1], y[j+1], USER, c[tmp],
1835
		GRect(x[i], y[j], x[i+1], y[j+1], USER, c[tmp],
1836
		      NA_INTEGER, dd);
1836
		      R_TRANWHITE, dd);
1837
	}
1837
	}
1838
    }
1838
    }
1839
    GMode(0, dd);
1839
    GMode(0, dd);
1840
    Rf_gpptr(dd)->col = colsave;
1840
    Rf_gpptr(dd)->col = colsave;
1841
    Rf_gpptr(dd)->xpd = xpdsave;
1841
    Rf_gpptr(dd)->xpd = xpdsave;