diff options
| author | Po Lu <luangruo@yahoo.com> | 2024-04-23 14:30:38 +0800 |
|---|---|---|
| committer | Po Lu <luangruo@yahoo.com> | 2024-04-23 14:30:38 +0800 |
| commit | b9c191d690fd5d1480858469df23cc4509996fae (patch) | |
| tree | 2e0536607f1442a99e88e39af8d24c51bab45aeb /java/org/gnu/emacs/EmacsFillRectangle.java | |
| parent | 63765a74f15ef22109750414ec3025c8a40039f0 (diff) | |
Implement face stipples on Android
* .gitignore:
* java/Makefile.in: Fix typos.
* java/org/gnu/emacs/EmacsFillRectangle.java (perform): Call
blitOpaqueStipple if filling an unobscured rectangle with an
opaque stipple.
* java/org/gnu/emacs/EmacsGC.java (EmacsGC) <tileObject>: New
field.
(markDirty): Synchronize the current stipple with tileObject.
(prepareStipple, blitOpaqueStipple): New functions.
* java/org/gnu/emacs/EmacsService.java (EmacsService)
<resources>: New static field.
(onCreate): Set it.
* src/android.c (android_create_bitmap_from_data): Correct order
of arguments to android_create_pixmap_from_bitmap_data.
(HAS_BUILTIN_TRAP): Delete macro.
(emacs_abort): Always induce backtraces by means of a NULL
pointer deference.
* src/dispextern.h (Emacs_GC, Emacs_Rectangle, GCForeground)
(GCBackground, GCFillStyle, GCStipple, FillOpaqueStipple)
[HAVE_ANDROID]: Define to their Android counterparts rather
than simulating their existence.
* src/epaths.in: Set bitmap path to /assets/bitmaps on Android.
* src/image.c (image_bitmap_pixmap): Also enable when
HAVE_ANDROID.
* src/sfntfont-android.c (sfntfont_android_put_glyphs): Assert
that this is never called to draw a stippled background.
* src/xfaces.c (x_create_gc) [HAVE_ANDROID]: Redefine as
wrapper around android_create_gc.
(prepare_face_for_display) [HAVE_ANDROID]: Enable stipples.
Diffstat (limited to 'java/org/gnu/emacs/EmacsFillRectangle.java')
| -rw-r--r-- | java/org/gnu/emacs/EmacsFillRectangle.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/java/org/gnu/emacs/EmacsFillRectangle.java b/java/org/gnu/emacs/EmacsFillRectangle.java index ca87c06c014..f338a54f97b 100644 --- a/java/org/gnu/emacs/EmacsFillRectangle.java +++ b/java/org/gnu/emacs/EmacsFillRectangle.java @@ -40,22 +40,23 @@ public final class EmacsFillRectangle Canvas canvas; Bitmap clipBitmap; - /* TODO implement stippling. */ - if (gc.fill_style == EmacsGC.GC_FILL_OPAQUE_STIPPLED) - return; - canvas = drawable.lockCanvas (gc); if (canvas == null) return; - paint = gc.gcPaint; rect = new Rect (x, y, x + width, y + height); + paint = gc.gcPaint; paint.setStyle (Paint.Style.FILL); if (gc.clip_mask == null) - canvas.drawRect (rect, paint); + { + if (gc.fill_style != EmacsGC.GC_FILL_OPAQUE_STIPPLED) + canvas.drawRect (rect, paint); + else + gc.blitOpaqueStipple (canvas, rect); + } else { /* Drawing with a clip mask involves calculating the @@ -113,4 +114,4 @@ public final class EmacsFillRectangle drawable.damageRect (rect); } -} +}; |
