* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
* Authors: Benjamin Otte <otte@gnome.org>
*/
{
GtkCssImageWin32 *wimage = GTK_CSS_IMAGE_WIN32 (image);
cairo_surface_t *surface;
+ int dx, dy;
surface = _gtk_win32_theme_part_create_surface (wimage->theme, wimage->part, wimage->state, wimage->margins,
- width, height);
+ width, height, &dx, &dy);
if (wimage->state2 >= 0)
{
cairo_surface_t *surface2;
cairo_t *cr;
+ int dx2, dy2;
surface2 = _gtk_win32_theme_part_create_surface (wimage->theme, wimage->part2, wimage->state2, wimage->margins,
- width, height);
+ width, height, &dx2, &dy2);
cr = cairo_create (surface);
- cairo_set_source_surface (cr, surface2, 0, 0);
+ cairo_set_source_surface (cr, surface2, dx2 - dx, dy2-dy);
cairo_paint_with_alpha (cr, wimage->over_alpha);
cairo_destroy (cr);
cairo_surface_destroy (surface2);
}
- cairo_set_source_surface (cr, surface, 0, 0);
- cairo_pattern_set_extend (cairo_get_source (cr), CAIRO_EXTEND_PAD);
+ cairo_set_source_surface (cr, surface, dx, dy);
+ cairo_pattern_set_extend (cairo_get_source (cr), CAIRO_EXTEND_NONE);
cairo_rectangle (cr, 0, 0, width, height);
cairo_fill (cr);
static gboolean
gtk_css_image_win32_parse (GtkCssImage *image,
- GtkCssParser *parser,
- GFile *base)
+ GtkCssParser *parser)
{
GtkCssImageWin32 *wimage = GTK_CSS_IMAGE_WIN32 (image);
char *class;