[vte] draw: Add extra define for separated mosaic drawing
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] draw: Add extra define for separated mosaic drawing
- Date: Sun, 16 Feb 2020 11:59:10 +0000 (UTC)
commit 34cf6f5717d1404c2d8902cb8710aa5ab78c9950
Author: Christian Persch <chpe src gnome org>
Date: Sun Feb 16 12:57:18 2020 +0100
draw: Add extra define for separated mosaic drawing
The new Unicode 13.0 characters will be enabled soon, but the
separated mosaic drawing will need to be proposed to terminal-wg
before we can enable this in a release.
src/vtedraw.cc | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/src/vtedraw.cc b/src/vtedraw.cc
index 1ecb5b24..22f46508 100644
--- a/src/vtedraw.cc
+++ b/src/vtedraw.cc
@@ -1035,6 +1035,7 @@ _vte_draw_get_char_edges (struct _vte_draw *draw, vteunistr c, int columns, guin
#ifdef WITH_UNICODE_NEXT
+#ifdef WITH_SEPARATED_MOSAICS
static bool
_vte_draw_is_separable_mosaic(vteunistr c)
{
@@ -1125,6 +1126,7 @@ create_mosaic_separation_pattern(int width,
return pattern;
}
+#endif /* WITH_SEPARATED_MOSAICS */
/* pixman data must have stride 0 mod 4 */
static unsigned char const hatching_pattern_lr_data[16] = {
@@ -1287,9 +1289,11 @@ _vte_draw_terminal_draw_graphic(struct _vte_draw *draw,
ybottom = y + height;
#ifdef WITH_UNICODE_NEXT
+#ifdef WITH_SEPARATED_MOSAICS
auto const separated = vte_attr_get_bool(attr, VTE_ATTR_SEPARATED_MOSAIC_SHIFT)
&&_vte_draw_is_separable_mosaic(c);
if (separated)
cairo_push_group(cr);
+#endif
#endif
switch (c) {
@@ -2223,12 +2227,14 @@ _vte_draw_terminal_draw_graphic(struct _vte_draw *draw,
}
#ifdef WITH_UNICODE_NEXT
+#ifdef WITH_SEPARATED_MOSAICS
if (separated) {
cairo_pop_group_to_source(cr);
auto pattern = create_mosaic_separation_pattern(width, height, light_line_width);
cairo_mask(cr, pattern);
cairo_pattern_destroy(pattern);
}
+#endif
#endif
cairo_restore(cr);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]