diff options
| author | Po Lu <luangruo@yahoo.com> | 2024-05-02 11:31:37 +0800 |
|---|---|---|
| committer | Po Lu <luangruo@yahoo.com> | 2024-05-02 11:31:37 +0800 |
| commit | b84fa71f8985284560bacda7d407e3559583844f (patch) | |
| tree | d7ed4518760fe51795dce384bc9dfa0b4ed32faf /java/org/gnu/emacs/EmacsGC.java | |
| parent | d3e95fcae9078a0ea8fcb15a4aee417e6e546ee5 (diff) | |
Port visible bell to Android
* java/org/gnu/emacs/EmacsDrawRectangle.java (perform): Ignore
GC_INVERT.
* java/org/gnu/emacs/EmacsFillRectangle.java
(EmacsFillRectangle) <invertFilter>: New variable.
(perform): If the transfer mode is invert, copy the source
to itself with invertFilter as the color filter.
* java/org/gnu/emacs/EmacsGC.java (EmacsGC) <xorAlu, srcInAlu>:
Delete now-redundant ALUs.
(markDirty): Cease updating the paint's transfermode.
* java/org/gnu/emacs/EmacsSafThread.java (openDocument1): Fix
typo in documentation.
* src/android.c (android_blit_xor): Delete unused function.
(android_copy_area): Remove calls to unused blit functions.
* src/androidgui.h (enum android_gc_function): Rename XOR to
INVERT.
* src/androidterm.c (android_flash): Replace with GXinvert.
Diffstat (limited to 'java/org/gnu/emacs/EmacsGC.java')
| -rw-r--r-- | java/org/gnu/emacs/EmacsGC.java | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/java/org/gnu/emacs/EmacsGC.java b/java/org/gnu/emacs/EmacsGC.java index ec2b9c9e475..bb11f76c800 100644 --- a/java/org/gnu/emacs/EmacsGC.java +++ b/java/org/gnu/emacs/EmacsGC.java @@ -27,9 +27,7 @@ import android.graphics.Canvas; import android.graphics.ColorFilter; import android.graphics.PorterDuff.Mode; import android.graphics.PorterDuffColorFilter; -import android.graphics.PorterDuffXfermode; import android.graphics.Shader.TileMode; -import android.graphics.Xfermode; import android.graphics.drawable.BitmapDrawable; @@ -40,8 +38,8 @@ import android.os.Build; public final class EmacsGC extends EmacsHandleObject { - public static final int GC_COPY = 0; - public static final int GC_XOR = 1; + public static final int GC_COPY = 0; + public static final int GC_INVERT = 1; public static final int GC_FILL_SOLID = 0; public static final int GC_FILL_OPAQUE_STIPPLED = 1; @@ -49,8 +47,6 @@ public final class EmacsGC extends EmacsHandleObject public static final int GC_LINE_SOLID = 0; public static final int GC_LINE_ON_OFF_DASH = 1; - public static final Xfermode xorAlu, srcInAlu; - public int function, fill_style; public int foreground, background; public int clip_x_origin, clip_y_origin; @@ -72,12 +68,6 @@ public final class EmacsGC extends EmacsHandleObject rectangles changed. 0 if there are no clip rectangles. */ public long clipRectID; - static - { - xorAlu = new PorterDuffXfermode (Mode.XOR); - srcInAlu = new PorterDuffXfermode (Mode.SRC_IN); - } - /* The following fields are only set on immutable GCs. */ public @@ -131,8 +121,6 @@ public final class EmacsGC extends EmacsHandleObject /* A line_width of 0 is equivalent to that of 1. */ gcPaint.setStrokeWidth (line_width < 1 ? 1 : line_width); gcPaint.setColor (foreground | 0xff000000); - gcPaint.setXfermode (function == GC_XOR - ? xorAlu : srcInAlu); /* Update the stipple object with the new stipple bitmap, or delete it if the stipple has been cleared on systems too old to support |
