Render to an image, not a RecordingSurface
This commit is contained in:
parent
4e14c44266
commit
9f366ef191
1 changed files with 2 additions and 2 deletions
|
@ -58,9 +58,9 @@ class HexagonPattern(Pattern):
|
|||
def __init__(self):
|
||||
super().__init__(self.COMMANDS)
|
||||
|
||||
def to_surface(self) -> cairo.RecordingSurface:
|
||||
def to_surface(self) -> cairo.ImageSurface:
|
||||
rect = cairo.Rectangle(0, 0, self.WIDTH, self.HEIGHT)
|
||||
surface = cairo.RecordingSurface(cairo.Content.COLOR_ALPHA, rect)
|
||||
surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, self.WIDTH, self.HEIGHT)
|
||||
|
||||
cr = cairo.Context(surface)
|
||||
cr.set_source_rgb(*self.COLOR)
|
||||
|
|
Loading…
Add table
Reference in a new issue