diff options
| author | tghs <> | 2017-01-25 09:49:49 +0000 |
|---|---|---|
| committer | JazzyNico <nicoduf@yahoo.fr> | 2017-01-25 09:49:49 +0000 |
| commit | b2c6a66276f5df743c5b78ef0e78c11051200df8 (patch) | |
| tree | 0750e7db4c0452dd96c9cf34d4358406612ed61c /src/widgets/icon.cpp | |
| parent | Comented one of the shortcuts for doc rotate because bad response now interac... (diff) | |
| download | inkscape-b2c6a66276f5df743c5b78ef0e78c11051200df8.tar.gz inkscape-b2c6a66276f5df743c5b78ef0e78c11051200df8.zip | |
[Bug #1537497] Icon preview doesn't render background.
Fixed bugs:
- https://launchpad.net/bugs/1537497
(bzr r15446)
Diffstat (limited to 'src/widgets/icon.cpp')
| -rw-r--r-- | src/widgets/icon.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/widgets/icon.cpp b/src/widgets/icon.cpp index 1efa8f06b..885deaab7 100644 --- a/src/widgets/icon.cpp +++ b/src/widgets/icon.cpp @@ -35,6 +35,7 @@ #include "display/drawing.h" #include "io/sys.h" #include "sp-root.h" +#include "sp-namedview.h" #include "util/units.h" #include "icon.h" @@ -1163,6 +1164,19 @@ sp_icon_doc_icon( SPDocument *doc, Inkscape::Drawing &drawing, CAIRO_FORMAT_ARGB32, psize, psize, stride); Inkscape::DrawingContext dc(s, ua.min()); + SPNamedView *nv = sp_document_namedview(doc, NULL); + float bg_r = SP_RGBA32_R_F(nv->pagecolor); + float bg_g = SP_RGBA32_G_F(nv->pagecolor); + float bg_b = SP_RGBA32_B_F(nv->pagecolor); + float bg_a = SP_RGBA32_A_F(nv->pagecolor); + + cairo_t *cr = cairo_create(s); + cairo_set_source_rgba(cr, bg_r, bg_g, bg_b, bg_a); + cairo_rectangle(cr, 0, 0, psize, psize); + cairo_fill(cr); + cairo_save(cr); + cairo_destroy(cr); + drawing.render(dc, ua); cairo_surface_destroy(s); |
