From cd0de4316f54c4c658b96eea841e1e56369f6b32 Mon Sep 17 00:00:00 2001 From: Ce Gao Date: Sun, 20 Aug 2017 21:19:16 +0800 Subject: [PATCH] BuiltinApplet: Add pixelDensity (#217) Signed-off-by: Ce Gao --- src/rprocessing/applet/BuiltinApplet.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/rprocessing/applet/BuiltinApplet.java b/src/rprocessing/applet/BuiltinApplet.java index 49e976a..c7869dc 100644 --- a/src/rprocessing/applet/BuiltinApplet.java +++ b/src/rprocessing/applet/BuiltinApplet.java @@ -99,8 +99,9 @@ public PGraphics createGraphics(double w, double h, String renderer, String path return super.createGraphics((int) w, (int) h, renderer, path); } - public double getPI() { - return PI; + public void pixelDensity(double density) { + this.logWarningsforCast(); + super.pixelDensity((int) density); } private void logWarningsforCast() {