The R Project SVN R

Rev

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

Rev 30604 Rev 30832
Line 27... Line 27...
27
#include <string.h>
27
#include <string.h>
28
#include <stdlib.h>
28
#include <stdlib.h>
29
 
29
 
30
#include <Defn.h>
30
#include <Defn.h>
31
#include <Rmath.h>
31
#include <Rmath.h>
-
 
32
 
32
#include <Rdevices.h>
33
#include <Graphics.h>
33
 
34
 
34
#include <R_ext/RConverters.h>
35
#include <R_ext/RConverters.h>
35
 
36
 
36
#ifndef max
37
#ifndef max
37
#define max(a, b) ((a > b)?(a):(b))
38
#define max(a, b) ((a > b)?(a):(b))
Line 1288... Line 1289...
1288
/*  Call dynamically loaded "internal" graphics functions */
1289
/*  Call dynamically loaded "internal" graphics functions */
1289
/*  .External.gr  and  .Call.gr */
1290
/*  .External.gr  and  .Call.gr */
1290
 
1291
 
1291
SEXP do_Externalgr(SEXP call, SEXP op, SEXP args, SEXP env)
1292
SEXP do_Externalgr(SEXP call, SEXP op, SEXP args, SEXP env)
1292
{
1293
{
-
 
1294
    SEXP retval;
1293
    SEXP retval = do_External(call, op, args, env);
1295
    PROTECT(retval = do_External(call, op, args, env));
1294
    if (call != R_NilValue) {
1296
    if (call != R_NilValue) {
1295
        DevDesc *dd = CurrentDevice();
1297
        GEDevDesc *dd = GEcurrentDevice();
1296
        GCheckState(dd);
1298
	if (!GEcheckState(dd))
-
 
1299
	    error("Invalid graphics state");
1297
	recordGraphicOperation(op, args, dd);
1300
	GErecordGraphicOperation(op, args, dd);
1298
    }
1301
    }
-
 
1302
    UNPROTECT(1);
1299
    return retval;
1303
    return retval;
1300
}
1304
}
1301
 
1305
 
1302
SEXP do_dotcallgr(SEXP call, SEXP op, SEXP args, SEXP env)
1306
SEXP do_dotcallgr(SEXP call, SEXP op, SEXP args, SEXP env)
1303
{
1307
{
-
 
1308
    SEXP retval;
1304
    SEXP retval = do_dotcall(call, op, args, env);
1309
    PROTECT(retval = do_dotcall(call, op, args, env));
1305
    if (call != R_NilValue) {
1310
    if (call != R_NilValue) {
1306
        DevDesc *dd = CurrentDevice();
1311
        GEDevDesc *dd = GEcurrentDevice();
1307
	GCheckState(dd);
1312
	if (!GEcheckState(dd))
-
 
1313
	    error("Invalid graphics state");
1308
	recordGraphicOperation(op, args, dd);
1314
	GErecordGraphicOperation(op, args, dd);
1309
    }
1315
    }
-
 
1316
    UNPROTECT(1);
1310
    return retval;
1317
    return retval;
1311
}
1318
}
1312
 
1319
 
1313
 
1320
 
1314
 
1321