~ubuntu-branches/ubuntu/trusty/librsvg/trusty-proposed

« back to all changes in this revision

Viewing changes to rsvg-cairo-draw.c

  • Committer: Package Import Robot
  • Author(s): Michael Biebl, Michael Biebl, Laurent Bigonville
  • Date: 2013-10-21 13:58:34 UTC
  • mfrom: (1.2.2)
  • Revision ID: package-import@ubuntu.com-20131021135834-rrvvy5hm5amr838j
Tags: 2.40.0-1
[ Michael Biebl ]
* New upstream release.
  - Fixes local resource access vulnerability. Closes: #724741
    CVE-2013-1881
* Refresh patches.
* GTK2 support has been removed upstream. Drop Build-Depends on
  libgtk2.0-dev, libgtk2.0-doc and the now obsolete --disable-gtk-theme
  configure switch.
* Bump Build-Depends on libgtk-3-dev to (>= 3.2.0).
* Bump Build-Depends on libpango1.0-dev to (>= 1.36.0) to get the
  thread-safe version.

[ Laurent Bigonville ]
* debian/control.in:
  - Use canonical URL for VCS-* fields
  - Update Homepage URL
  - Move source package to the "libs" Section
  - Remove duplicate Section, thanks to lintian

Show diffs side-by-side

added added

removed removed

Lines of Context:
162
162
{
163
163
    RsvgCairoRender *render = RSVG_CAIRO_RENDER (ctx->render);
164
164
    cairo_t *cr = render->cr;
165
 
    guint32 rgb = colour->rgb;
166
 
    double r, g, b;
 
165
    guint32 argb = colour->argb;
 
166
    double r, g, b, a;
167
167
 
168
168
    if (colour->currentcolour)
169
 
        rgb = current_colour;
170
 
 
171
 
    r = ((rgb >> 16) & 0xff) / 255.0;
172
 
    g = ((rgb >> 8) & 0xff) / 255.0;
173
 
    b = ((rgb >> 0) & 0xff) / 255.0;
174
 
 
175
 
    if (opacity == 0xff)
176
 
        cairo_set_source_rgb (cr, r, g, b);
177
 
    else
178
 
        cairo_set_source_rgba (cr, r, g, b, opacity / 255.0);
 
169
        argb = current_colour;
 
170
 
 
171
    r = ((argb >> 16) & 0xff) / 255.0;
 
172
    g = ((argb >>  8) & 0xff) / 255.0;
 
173
    b = ((argb >>  0) & 0xff) / 255.0;
 
174
    a =  (argb >> 24) / 255.0 * (opacity / 255.0);
 
175
 
 
176
    cairo_set_source_rgba (cr, r, g, b, a);
179
177
}
180
178
 
181
179
static void