GetVisibleTiles(in Viewport, Int32, Span, Double) Method

Definition

Assembly Broadside.Viewer.dll

Lists the tiles a viewport shows: each visible page cut into a grid of tileSize pixel squares from its pixel origin (the last row and column clipped to the page), at the viewport's zoom and the layout's rotation, page by page in order.

public int GetVisibleTiles(in Viewport viewport, int tileSize, Span<Tile> destination, double margin = 0)

Parameters

viewport
Viewport

The viewport.

tileSize
Int32

The side of a tile in pixels.

destination
Span<Tile>

Receives the tiles, as many as fit.

margin
Double

Pixels added on every side of the viewport, for render-ahead.

Returns

Int32
The number of tiles; when it is more than destination holds, call again with more room.