diff options
| author | Adib Taraben <theadib@gmail.com> | 2011-01-17 22:17:48 +0000 |
|---|---|---|
| committer | theAdib <theadib@gmail.com> | 2011-01-17 22:17:48 +0000 |
| commit | 38bfe781de137c7173df661a5b99cef685a86e46 (patch) | |
| tree | f91cdf1afd59924adf180ea494d419e5728e88ff /src/helper/pixbuf-ops.cpp | |
| parent | Translations. Indonesian translation update by Waluyo Adi Siswanto. (diff) | |
| download | inkscape-38bfe781de137c7173df661a5b99cef685a86e46.tar.gz inkscape-38bfe781de137c7173df661a5b99cef685a86e46.zip | |
remove memory boundries on bitmap renderer, optimize memory usage
Fixed bugs:
- https://launchpad.net/bugs/494115
(bzr r10009)
Diffstat (limited to 'src/helper/pixbuf-ops.cpp')
| -rw-r--r-- | src/helper/pixbuf-ops.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/helper/pixbuf-ops.cpp b/src/helper/pixbuf-ops.cpp index 69becad5d..7ce5c7dd2 100644 --- a/src/helper/pixbuf-ops.cpp +++ b/src/helper/pixbuf-ops.cpp @@ -91,6 +91,19 @@ sp_export_jpg_file(SPDocument *doc, gchar const *filename, else return false; } +/** + generates a bitmap from given items + the bitmap is stored in RAM and not written to file + @param x0 + @param y0 + @param x1 + @param y1 + @param width + @param height + @param xdpi + @param ydpi + @return the created GdkPixbuf structure or NULL if no memory is allocable +*/ GdkPixbuf* sp_generate_internal_bitmap(SPDocument *doc, gchar const */*filename*/, double x0, double y0, double x1, double y1, @@ -164,6 +177,7 @@ sp_generate_internal_bitmap(SPDocument *doc, gchar const */*filename*/, dtc[2] = NR_RGBA32_B(bgcolor); dtc[3] = NR_RGBA32_A(bgcolor); + // fill pixelblock using background colour for (gsize fy = 0; fy < height; fy++) { guchar *p = NR_PIXBLOCK_PX(&B) + fy * (gsize)B.rs; for (unsigned int fx = 0; fx < width; fx++) { |
