mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-03-15 19:31:29 -07:00
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.
This commit is contained in:
parent
63765a74f1
commit
b9c191d690
11 changed files with 139 additions and 61 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue