@@ -1176,14 +1176,12 @@ def writeHatches(self):
1176
1176
'XStep' : sidelen , 'YStep' : sidelen ,
1177
1177
'Resources' : res })
1178
1178
1179
- # lst is a tuple of stroke color, fill color,
1180
- # number of - lines, number of / lines,
1181
- # number of | lines, number of \ lines
1182
- rgb = hatch_style [0 ]
1183
- self .output (rgb [0 ], rgb [1 ], rgb [2 ], Op .setrgb_stroke )
1184
- if hatch_style [1 ] is not None :
1185
- rgb = hatch_style [1 ]
1186
- self .output (rgb [0 ], rgb [1 ], rgb [2 ], Op .setrgb_nonstroke ,
1179
+ stroke_rgb , fill_rgb , path = hatch_style
1180
+ self .output (stroke_rgb [0 ], stroke_rgb [1 ], stroke_rgb [2 ],
1181
+ Op .setrgb_stroke )
1182
+ if fill_rgb is not None :
1183
+ self .output (fill_rgb [0 ], fill_rgb [1 ], fill_rgb [2 ],
1184
+ Op .setrgb_nonstroke ,
1187
1185
0 , 0 , sidelen , sidelen , Op .rectangle ,
1188
1186
Op .fill )
1189
1187
@@ -1192,7 +1190,7 @@ def writeHatches(self):
1192
1190
# TODO: We could make this dpi-dependent, but that would be
1193
1191
# an API change
1194
1192
self .output (* self .pathOperations (
1195
- Path .hatch (hatch_style [ 2 ] ),
1193
+ Path .hatch (path ),
1196
1194
Affine2D ().scale (sidelen ),
1197
1195
simplify = False ))
1198
1196
self .output (Op .stroke )
0 commit comments