File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2017, 2018 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2017, 2019 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
4444import com .oracle .truffle .r .library .fastrGrid .device .DrawingContext .GridLineJoin ;
4545import com .oracle .truffle .r .library .fastrGrid .device .GridColor ;
4646import com .oracle .truffle .r .library .fastrGrid .device .GridDevice ;
47+ import com .oracle .truffle .r .runtime .FastRConfig ;
4748import com .oracle .truffle .r .runtime .RInternalError ;
4849
4950/**
@@ -59,7 +60,7 @@ public class Graphics2DDevice implements GridDevice {
5960 // may wish to apply his/her own transformations to the graphics object and we should not
6061 // interfere with these. In cases we do use transformation, we make sure to set back the
6162 // original one after we're done.
62- static final double AWT_POINTS_IN_INCH = GraphicsEnvironment .isHeadless () ? 72. : Toolkit .getDefaultToolkit ().getScreenResolution ();
63+ static final double AWT_POINTS_IN_INCH = FastRConfig . UseRemoteGridAwtDevice || GraphicsEnvironment .isHeadless () ? 72. : Toolkit .getDefaultToolkit ().getScreenResolution ();
6364
6465 private static final BasicStroke blankStroke = new BasicStroke (0f );
6566
Original file line number Diff line number Diff line change @@ -75,6 +75,9 @@ protected Object call(RArgsValuesAndNames args) {
7575 // check if we got custom Graphics2D object as 3rd parameter
7676 boolean isFastRDevice = args .getArgument (0 ).equals (".FASTR.AWT" );
7777 if (isFastRDevice && args .getLength () > 3 ) {
78+ if (FastRConfig .UseRemoteGridAwtDevice ) {
79+ throw error (Message .GENERIC , "Using custom Graphics2D object is not supported on the remote grid device." );
80+ }
7881 Object arg3 = args .getArgument (3 );
7982 boolean isForeignTruffleObj = RRuntime .isForeignObject (arg3 );
8083 TruffleLanguage .Env env = RContext .getInstance ().getEnv ();
You can’t perform that action at this time.
0 commit comments