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