How to bind a cairo surface to a GTKImage widget
- From: Arvind Arvind Pro <arvind_dev arvind pro>
- To: gtkmm-list gnome org
- Subject: How to bind a cairo surface to a GTKImage widget
- Date: Thu, 23 May 2019 12:52:13 +0530
Hi
I have with me code to load an SVG (Vector) image into a cairo surface using GTKMM and CairoMM-
#ifdef CAIRO_HAS_SVG_SURFACE
std::string filename = "image.svg";
double width = 600;
double height = 400;
auto surface =
Cairo::SvgSurface::create(filename, width, height);
auto cr = Cairo::Context::create(surface);
cr->save(); // save the state of the context
Now, I want to load this SVG image into a GTKImage area. One GTKIMage named "image_svg" is the GTKImage widget into which I want to load the SVG image.
How do I link the SVG image to the "image_svg" GTKImage widget?
Yours sincerely,
Arvind.
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]