Skip to content

Commit 21841c5

Browse files
committed
doc: document AbstractSlide
It's used in the type signature of the DeepZoomGenerator constructor because DeepZoomGenerator also supports user-supplied AbstractSlide subclasses. Ensure the hyperlink has somewhere to point, and update the DeepZoomGenerator description to mention user-provided implementations. Signed-off-by: Benjamin Gilbert <[email protected]>
1 parent 959f702 commit 21841c5

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

doc/index.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,10 @@ Exceptions
366366
Wrapping a Pillow Image
367367
=======================
368368

369+
.. class:: AbstractSlide
370+
371+
The abstract base class of :class:`OpenSlide` and :class:`ImageSlide`.
372+
369373
.. class:: ImageSlide(file: str | bytes | ~os.PathLike[typing.Any] | ~PIL.Image.Image)
370374

371375
A wrapper around an :class:`Image <PIL.Image.Image>` object that
@@ -400,8 +404,9 @@ Deep Zoom or a similar format.
400404
.. class:: DeepZoomGenerator(osr: AbstractSlide, tile_size: int = 254, overlap: int = 1, limit_bounds: bool = False)
401405

402406
A Deep Zoom generator that wraps an
403-
:class:`OpenSlide <openslide.OpenSlide>` or
404-
:class:`ImageSlide <openslide.ImageSlide>` object.
407+
:class:`OpenSlide <openslide.OpenSlide>` object,
408+
:class:`ImageSlide <openslide.ImageSlide>` object, or user-provided
409+
instance of :class:`~openslide.AbstractSlide`.
405410

406411
:param osr: the slide object
407412
:param tile_size: the width and height of a single tile. For best viewer

0 commit comments

Comments
 (0)