mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-31 01:20:37 -08:00
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.
This commit is contained in:
parent
d3e95fcae9
commit
b84fa71f89
7 changed files with 62 additions and 374 deletions
|
|
@ -22,13 +22,23 @@ package org.gnu.emacs;
|
|||
import android.graphics.Bitmap;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.PorterDuff.Mode;
|
||||
import android.graphics.PorterDuffXfermode;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.RectF;
|
||||
import android.graphics.Xfermode;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
public final class EmacsDrawRectangle
|
||||
{
|
||||
private static final Xfermode srcInAlu;
|
||||
|
||||
static
|
||||
{
|
||||
srcInAlu = new PorterDuffXfermode (Mode.SRC_IN);
|
||||
};
|
||||
|
||||
public static void
|
||||
perform (EmacsDrawable drawable, EmacsGC gc,
|
||||
int x, int y, int width, int height)
|
||||
|
|
@ -40,8 +50,10 @@ public final class EmacsDrawRectangle
|
|||
Canvas canvas;
|
||||
Bitmap clipBitmap;
|
||||
|
||||
/* TODO implement stippling. */
|
||||
if (gc.fill_style == EmacsGC.GC_FILL_OPAQUE_STIPPLED)
|
||||
/* TODO implement stippling for this request. */
|
||||
if (gc.fill_style == EmacsGC.GC_FILL_OPAQUE_STIPPLED
|
||||
/* And GC_INVERT also. */
|
||||
|| gc.fill_style == EmacsGC.GC_INVERT)
|
||||
return;
|
||||
|
||||
canvas = drawable.lockCanvas (gc);
|
||||
|
|
@ -103,7 +115,7 @@ public final class EmacsDrawRectangle
|
|||
/* Set the transfer mode to SRC_IN to preserve only the parts
|
||||
of the source that overlap with the mask. */
|
||||
maskPaint = new Paint ();
|
||||
maskPaint.setXfermode (EmacsGC.srcInAlu);
|
||||
maskPaint.setXfermode (srcInAlu);
|
||||
maskPaint.setStyle (Paint.Style.STROKE);
|
||||
|
||||
/* Draw the source. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue