[evince/wip/gpoo/gtk4-rebase-port: 21/65] ev-poppler: Use GdkRGBA instead of GdkColor
- From: Germán Poo-Caamaño <gpoo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince/wip/gpoo/gtk4-rebase-port: 21/65] ev-poppler: Use GdkRGBA instead of GdkColor
- Date: Mon, 21 Mar 2022 02:57:02 +0000 (UTC)
commit 81065535b7734074ad879258b07f927ff6948cc7
Author: Qiu Wenbo <qiuwenbo kylinos com cn>
Date: Sun Aug 15 21:19:36 2021 +0800
ev-poppler: Use GdkRGBA instead of GdkColor
Signed-off-by: Qiu Wenbo <qiuwenbo kylinos com cn>
backend/pdf/ev-poppler.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/backend/pdf/ev-poppler.c b/backend/pdf/ev-poppler.c
index 8738f0052..9094cfb84 100644
--- a/backend/pdf/ev-poppler.c
+++ b/backend/pdf/ev-poppler.c
@@ -1905,8 +1905,8 @@ pdf_selection_render_selection (EvSelection *selection,
EvRectangle *points,
EvRectangle *old_points,
EvSelectionStyle style,
- GdkColor *text,
- GdkColor *base)
+ GdkRGBA *text,
+ GdkRGBA *base)
{
PopplerPage *poppler_page;
cairo_t *cr;
@@ -1921,13 +1921,13 @@ pdf_selection_render_selection (EvSelection *selection,
&width_points, &height_points);
ev_render_context_compute_scaled_size (rc, width_points, height_points, &width, &height);
- text_color.red = text->red;
- text_color.green = text->green;
- text_color.blue = text->blue;
+ text_color.red = CLAMP ((guint) (text->red * 65535), 0, 65535);
+ text_color.green = CLAMP ((guint) (text->green * 65535), 0, 65535);
+ text_color.blue = CLAMP ((guint) (text->blue * 65535), 0, 65535);
- base_color.red = base->red;
- base_color.green = base->green;
- base_color.blue = base->blue;
+ base_color.red = CLAMP ((guint) (base->red * 65535), 0, 65535);
+ base_color.green = CLAMP ((guint) (base->green * 65535), 0, 65535);
+ base_color.blue = CLAMP ((guint) (base->blue * 65535), 0, 65535);
if (*surface == NULL) {
*surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]