diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2016-07-13 03:26:11 +0800 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2016-07-15 02:19:54 +0800 |
commit | 9f3f059c93a98715aa00f37d1ab1e3868fc1fb0f (patch) | |
tree | f2f66d307824f3860c7ba1fdee6403cac24f5b6f /platform/java/example | |
parent | a39339c8a26246fcf864946e8530bce4bf11343c (diff) | |
download | mupdf-9f3f059c93a98715aa00f37d1ab1e3868fc1fb0f.tar.xz |
Cleanup of JNI code for consistency.
* Make sure that arguments are checked for NULL before being
passed to ->Get JNI-functions (as these may crash on NULL).
* Remove unused argument to from_Device().
* Consistently use jint and jfloat in JNIEXPORTed functions.
* Check ctx for NULL in all relevant functions.
* Throw Java exception when constructors fail.
* to_*_safe() means that the function doesn't fz_throw().
* to_*_own() means that the function takes ownership of the object.
* Make sure that jprefixing of argument identifies does not
clash with jprefixing of types, specifically jstring.
* Rename (j)colorspace -> (j)cs, (j)shade -> (j)shd,
(j)device -> (j)dev.
* Always check that the context is available in bindings.
* Always check that required arguments are non-NULL or have
decent default values (e.g. for fz_matrix and fz_rect).
Diffstat (limited to 'platform/java/example')
-rw-r--r-- | platform/java/example/TraceDevice.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/java/example/TraceDevice.java b/platform/java/example/TraceDevice.java index 01e7b6c8..d6bb2953 100644 --- a/platform/java/example/TraceDevice.java +++ b/platform/java/example/TraceDevice.java @@ -81,7 +81,7 @@ public class TraceDevice extends Device implements PathWalker, TextWalker System.out.println("ignoreText " + ctm); traceText(text); } - public void fillShade(Shade shade, Matrix ctm, float alpha) { + public void fillShade(Shade shd, Matrix ctm, float alpha) { System.out.println("fillShade " + ctm + " " + alpha); } public void fillImage(Image img, Matrix ctm, float alpha) { |