Font/Pango Text: fixed some weird color precision levels
cairo_set_source_rgba takes color and alpha parameters as 0..1.0 doubles. A fully opaque channel value (255) was being set as 0.99609375 instead of 1.0, which it should be.
This commit is contained in:
parent
2eefdd8948
commit
66cec73576
1 changed files with 4 additions and 4 deletions
|
@ -669,10 +669,10 @@ void pango_text::render(PangoLayout& layout, const PangoRectangle& rect, const s
|
|||
|
||||
/* set color (used for foreground). */
|
||||
cairo_set_source_rgba(cr.get(),
|
||||
foreground_color_.r / 256.0,
|
||||
foreground_color_.g / 256.0,
|
||||
foreground_color_.b / 256.0,
|
||||
foreground_color_.a / 256.0
|
||||
foreground_color_.r / 255.0,
|
||||
foreground_color_.g / 255.0,
|
||||
foreground_color_.b / 255.0,
|
||||
foreground_color_.a / 255.0
|
||||
);
|
||||
|
||||
pango_cairo_show_layout(cr.get(), &layout);
|
||||
|
|
Loading…
Add table
Reference in a new issue