~ubuntu-branches/ubuntu/precise/inkscape/precise-updates

« back to all changes in this revision

Viewing changes to src/display/nr-arena-image.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alex Valavanis
  • Date: 2010-09-12 19:44:58 UTC
  • mfrom: (1.1.12 upstream) (45.1.3 maverick)
  • Revision ID: james.westby@ubuntu.com-20100912194458-4sjwmbl7dlsrk5dc
Tags: 0.48.0-1ubuntu1
* Merge with Debian unstable (LP: #628048, LP: #401567, LP: #456248, 
  LP: #463602, LP: #591986)
* debian/control: 
  - Ubuntu maintainers
  - Promote python-lxml, python-numpy, python-uniconvertor to Recommends.
  - Demote pstoedit to Suggests (universe package).
  - Suggests ttf-dejavu instead of ttf-bitstream-vera (LP: #513319)
* debian/rules:
  - Run intltool-update on build (Ubuntu-specific).
  - Add translation domain to .desktop files (Ubuntu-specific).
* debian/dirs:
  - Add usr/share/pixmaps.  Allow inkscape.xpm installation
* drop 50-poppler-API.dpatch (now upstream)
* drop 51-paste-in-unwritable-directory.dpatch (now upstream) 

Show diffs side-by-side

added added

removed removed

Lines of Context:
92
92
    image->grid2px.setIdentity();
93
93
 
94
94
    image->style = 0;
 
95
    image->render_opacity = TRUE;
95
96
}
96
97
 
97
98
static void
151
152
 
152
153
        nr_rect_d_matrix_transform (&bbox, &bbox, gc->transform);
153
154
 
154
 
        item->bbox.x0 = (int) floor (bbox.x0);
155
 
        item->bbox.y0 = (int) floor (bbox.y0);
156
 
        item->bbox.x1 = (int) ceil (bbox.x1);
157
 
        item->bbox.y1 = (int) ceil (bbox.y1);
 
155
        item->bbox.x0 = static_cast<NR::ICoord>(floor(bbox.x0)); // Floor gives the coordinate in which the point resides
 
156
        item->bbox.y0 = static_cast<NR::ICoord>(floor(bbox.y0));
 
157
        item->bbox.x1 = static_cast<NR::ICoord>(ceil (bbox.x1)); // Ceil gives the first coordinate beyond the point
 
158
        item->bbox.y1 = static_cast<NR::ICoord>(ceil (bbox.y1));
158
159
    } else {
159
160
        item->bbox.x0 = (int) gc->transform[4];
160
161
        item->bbox.y0 = (int) gc->transform[5];
211
212
        } else if (pb->mode == NR_PIXBLOCK_MODE_R8G8B8A8P) {
212
213
            nr_R8G8B8A8_P_R8G8B8A8_P_R8G8B8A8_N_TRANSFORM (dpx, dw, dh, drs, spx, sw, sh, srs, d2s, Falpha, nr_arena_image_x_sample, nr_arena_image_y_sample);
213
214
        } else if (pb->mode == NR_PIXBLOCK_MODE_R8G8B8A8N) {
214
 
 
215
 
            //FIXME: The _N_N_N_ version gives a gray border around images, see bug 906376
216
 
            // This mode is only used when exporting, screen rendering always has _P_P_P_, so I decided to simply replace it for now
217
 
            // Feel free to propose a better fix
218
 
 
219
 
            //nr_R8G8B8A8_N_R8G8B8A8_N_R8G8B8A8_N_TRANSFORM (dpx, dw, dh, drs, spx, sw, sh, srs, d2s, Falpha, nr_arena_image_x_sample, nr_arena_image_y_sample);
220
 
            nr_R8G8B8A8_P_R8G8B8A8_P_R8G8B8A8_N_TRANSFORM (dpx, dw, dh, drs, spx, sw, sh, srs, d2s, Falpha, nr_arena_image_x_sample, nr_arena_image_y_sample);
 
215
            nr_R8G8B8A8_N_R8G8B8A8_N_R8G8B8A8_N_TRANSFORM (dpx, dw, dh, drs, spx, sw, sh, srs, d2s, Falpha, nr_arena_image_x_sample, nr_arena_image_y_sample);
221
216
        }
222
217
 
223
218
        pb->empty = FALSE;