@@ -286,57 +286,6 @@ def draw_markers(self, gc, marker_path, marker_trans, path, transform,
286
286
self ._fill_and_stroke (
287
287
ctx , rgbFace , gc .get_alpha (), gc .get_forced_alpha ())
288
288
289
- def draw_path_collection (
290
- self , gc , master_transform , paths , all_transforms , offsets ,
291
- offsetTrans , facecolors , edgecolors , linewidths , linestyles ,
292
- antialiaseds , urls , offset_position ):
293
-
294
- path_ids = [
295
- (path , Affine2D (transform ))
296
- for path , transform in self ._iter_collection_raw_paths (
297
- master_transform , paths , all_transforms )]
298
-
299
- reuse_key = None
300
- grouped_draw = []
301
-
302
- def _draw_paths ():
303
- if not grouped_draw :
304
- return
305
- gc_vars , rgb_fc = reuse_key
306
- gc = copy .copy (gc0 )
307
- # We actually need to call the setters to reset the internal state.
308
- vars (gc ).update (gc_vars )
309
- for k , v in gc_vars .items ():
310
- if k == "_linestyle" : # Deprecated, no effect.
311
- continue
312
- try :
313
- getattr (gc , "set" + k )(v )
314
- except (AttributeError , TypeError ) as e :
315
- pass
316
- gc .ctx .new_path ()
317
- paths , transforms = zip (* grouped_draw )
318
- grouped_draw .clear ()
319
- _append_paths (gc .ctx , paths , transforms )
320
- self ._fill_and_stroke (
321
- gc .ctx , rgb_fc , gc .get_alpha (), gc .get_forced_alpha ())
322
-
323
- for xo , yo , path_id , gc0 , rgb_fc in self ._iter_collection (
324
- gc , master_transform , all_transforms , path_ids , offsets ,
325
- offsetTrans , facecolors , edgecolors , linewidths , linestyles ,
326
- antialiaseds , urls , offset_position ):
327
- path , transform = path_id
328
- transform = (Affine2D (transform .get_matrix ())
329
- .translate (xo , yo - self .height ).scale (1 , - 1 ))
330
- # rgb_fc could be a ndarray, for which equality is elementwise.
331
- new_key = vars (gc0 ), tuple (rgb_fc ) if rgb_fc is not None else None
332
- if new_key == reuse_key :
333
- grouped_draw .append ((path , transform ))
334
- else :
335
- _draw_paths ()
336
- grouped_draw .append ((path , transform ))
337
- reuse_key = new_key
338
- _draw_paths ()
339
-
340
289
def draw_image (self , gc , x , y , im ):
341
290
im = cbook ._unmultiplied_rgba8888_to_premultiplied_argb32 (im [::- 1 ])
342
291
surface = cairo .ImageSurface .create_for_data (
0 commit comments