Tile class
Leave feedback
On this page
Represents the drawing region.
For details, see the documentation at https://docs.groupdocs.com/viewer/net/specify-cad-rendering-options/#split-a-drawing-into-tiles.
The Tile type exposes the following members:
| Method | Description |
|---|---|
| get_end_point_x | Returns the X coordinate of the highest right point on the drawing where the tile ends. |
| get_end_point_y | Returns the Y coordinate of the highest right point on the drawing where the tile ends. |
| Property | Description |
|---|---|
| height | The height of the tile in pixels. |
| start_point_x | The X coordinate of the lowest left point on the drawing where the tile begins. |
| start_point_y | The Y coordinate of the lowest left point on the drawing where the tile begins. |
| width | The width of the tile in pixels. |
from groupdocs.viewer import Viewer
from groupdocs.viewer.options import ViewInfoOptions, HtmlViewOptions, Tile
with Viewer("sample.dwg") as viewer:
view_info = viewer.get_view_info(ViewInfoOptions.for_html_view())
width = view_info.pages[0].width
height = view_info.pages[0].height
columns, rows = 2, 2
tile_width = width / columns
tile_height = height / rows
view_options = HtmlViewOptions.for_embedded_resources(
"output/drawing_tile_{0}.html"
)
for i in range(columns):
for j in range(rows):
tile = Tile(i * tile_width, j * tile_height, tile_width, tile_height)
view_options.cad_options.tiles.append(tile)
- module
groupdocs.viewer.options
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.