container.tile: Correctly transfer the Cairo source to the tile.

This commit is contained in:
Emmanuel Lepage Vallee 2021-09-22 20:49:58 -07:00
parent 01ae508899
commit 546ac6aec9
1 changed files with 1 additions and 0 deletions

View File

@ -31,6 +31,7 @@ function module:draw(context, cr, width, height)
if not self._private.surface then
self._private.surface = cairo.ImageSurface(cairo.Format.ARGB32, w+hspace, h+vspace)
self._private.cr = cairo.Context(self._private.surface)
self._private.cr:set_source(cr:get_source())
self._private.pattern = cairo.Pattern.create_for_surface(self._private.surface)
self._private.pattern.extend = cairo.Extend.REPEAT
self._private.cr:translate(math.ceil(hspace), math.ceil(vspace))