Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Add a path to the cairo context encompassing the current text settings.
- pango_cairo_layout_path(cr.get(), &layout);
- // Set color for background outline.
- cairo_set_source_rgba(cr.get(), 0.0, 0.0, 0.0, 1.0);
- cairo_set_line_join(cr.get(), CAIRO_LINE_JOIN_ROUND);
- cairo_set_line_width(cr.get(), 2.0); // Adjust as necessary
- // Stroke path to draw outline, but don't delete it.
- cairo_stroke_preserve(cr.get());
- // Set main text color.
- cairo_set_source_rgba(cr.get(),
- foreground_color_.r / 255.0,
- foreground_color_.g / 255.0,
- foreground_color_.b / 255.0,
- foreground_color_.a / 255.0
- );
- // Draw main text.
- cairo_fill(cr.get());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement