diff options
author | Po Lu <luangruo@yahoo.com> | 2022-05-08 04:42:11 +0000 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2022-05-08 04:42:11 +0000 |
commit | b205d67f8c92593f8e170419d677a70e535a3a19 (patch) | |
tree | fe40a61bb0a5af50d20821c37cead392d04b310f /src/haikuterm.h | |
parent | faa342c794dec66d6b77ccf550361d58455a4454 (diff) | |
download | emacs-b205d67f8c92593f8e170419d677a70e535a3a19.tar.gz |
Fully implement stipples for text on Haiku
* src/haikufont.c (haikufont_draw): Use
`haiku_draw_background_rect' instead.
* src/haikuterm.c (haiku_draw_plain_background): Change
arguments to accept rect manually.
(haiku_get_bitmap): Delete function.
(haiku_get_bitmap_rec): New function.
(haiku_draw_stipple_background): Accept rect instead of box
sizes.
(haiku_draw_background_rect): New function.
(haiku_maybe_draw_background): Use that instead.
(haiku_draw_image_glyph_string): Add notice.
(haiku_draw_glyph_string): Set `stippled_p' correctly.
* src/haikuterm.h (struct haiku_bitmap_record): New fields for
keeping track of stipple state.
* src/image.c (image_create_bitmap_from_data)
(image_create_bitmap_from_file, free_bitmap_record): Free and
set them accordingly.
Diffstat (limited to 'src/haikuterm.h')
-rw-r--r-- | src/haikuterm.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/haikuterm.h b/src/haikuterm.h index 1bff03ae39e..cc032d03892 100644 --- a/src/haikuterm.h +++ b/src/haikuterm.h @@ -52,6 +52,10 @@ struct haiku_bitmap_record char *file; int refcount; int height, width, depth; + + uint32_t stipple_foreground; + uint32_t stipple_background; + void *stipple_bits; }; struct haiku_display_info @@ -325,6 +329,9 @@ extern int haiku_load_image (struct frame *, struct image *, extern void syms_of_haikuimage (void); #endif +extern void haiku_draw_background_rect (struct glyph_string *, struct face *, + int, int, int, int); + #ifdef USE_BE_CAIRO extern cairo_t *haiku_begin_cr_clip (struct frame *, struct glyph_string *); |