[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] color 1728230: * src/smooth/ftsmooth.c (ft_smooth_render_bgr
From: |
Alexei Podtelezhnikov |
Subject: |
[freetype2] color 1728230: * src/smooth/ftsmooth.c (ft_smooth_render_bgra): Restore contours. |
Date: |
Tue, 18 Dec 2018 22:40:24 -0500 (EST) |
branch: color
commit 1728230b6d46da3a8bd208550182dbfacf2b5a7b
Author: Alexei Podtelezhnikov <address@hidden>
Commit: Alexei Podtelezhnikov <address@hidden>
* src/smooth/ftsmooth.c (ft_smooth_render_bgra): Restore contours.
---
ChangeLog | 4 ++++
src/smooth/ftsmooth.c | 9 +++++++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 47bd887..76f057a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2018-12-18 Alexei Podtelezhnikov <address@hidden>
+
+ * src/smooth/ftsmooth.c (ft_smooth_render_bgra): Restore contours.
+
2018-12-11 Alexei Podtelezhnikov <address@hidden>
Color glyph framework and rendering (3/3).
diff --git a/src/smooth/ftsmooth.c b/src/smooth/ftsmooth.c
index 44ceb09..4d80bc9 100644
--- a/src/smooth/ftsmooth.c
+++ b/src/smooth/ftsmooth.c
@@ -432,7 +432,7 @@
FT_Outline outline = slot->outline; /* hard copy */
FT_Bitmap target;
FT_Vector target_offset, offset;
- short i, c_done, p_done;
+ short i, j, c_done, p_done;
/* check glyph image format */
@@ -471,7 +471,8 @@
slot->outline.n_points = outline.contours[i] - p_done + 1;
slot->outline.contours[i - c_done] = outline.contours[i] - p_done;
- if ( i == outline.n_contours - 1 ||
+ /* layer ends when color changes */
+ if ( i == outline.n_contours - 1 ||
slot->color[i + 1].red != slot->color[c_done].red ||
slot->color[i + 1].green != slot->color[c_done].green ||
slot->color[i + 1].blue != slot->color[c_done].blue ||
@@ -498,6 +499,10 @@
if ( error )
break;
+ /* restore contours */
+ for ( j = 0; j < slot->outline.n_contours; j++ )
+ slot->outline.contours[j] += p_done;
+
c_done += slot->outline.n_contours;
p_done += slot->outline.n_points;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] color 1728230: * src/smooth/ftsmooth.c (ft_smooth_render_bgra): Restore contours.,
Alexei Podtelezhnikov <=