Page
src.drawpyo.page.Page
Source code in src/drawpyo/page.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | |
__init__(file=None, **kwargs)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file
|
Optional[File]
|
Parent File object this page belongs to. |
None
|
Other Parameters:
| Name | Type | Description |
|---|---|---|
objects |
list[Any]
|
Initial list of objects on the page. |
name |
str
|
Page name. Default: "Page-{page_num}" |
page_num |
int
|
Page index within the file. Default: inferred from file. |
dx |
int | float
|
Horizontal translation of the page. Default: 2037 |
dy |
int | float
|
Vertical translation of the page. Default: 830 |
scale |
int | float
|
Page scale factor. Default: 1 |
grid |
int
|
Whether grid is enabled. Default: 1 |
grid_size |
int
|
Grid spacing. Default: 10 |
guides |
int
|
Whether alignment guides are enabled. Default: 1 |
tooltips |
int
|
Whether tooltips are enabled. Default: 1 |
connect |
int
|
Whether connections are enabled. Default: 1 |
arrows |
int
|
Whether arrows are enabled. Default: 1 |
fold |
int
|
Whether page folding is enabled. Default: 1 |
size_preset |
PageSize
|
Optional predefined page size. Overrides width and height. |
width |
int | float
|
Page width. Default: 850 |
height |
int | float
|
Page height. Default: 1100 |
math |
int
|
Whether math rendering is enabled. Default: 0 |
shadow |
int
|
Whether shadows are enabled. Default: 0 |
Source code in src/drawpyo/page.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | |
remove()
This function removes the Page from its linked File object then deletes itself.
Source code in src/drawpyo/page.py
92 93 94 95 96 | |
Page Size Preset
src.drawpyo.utils.page_sizes.PageSize
Bases: tuple, Enum
Predefined page sizes expressed as (width, height) in Draw.io units.
Source code in src/drawpyo/utils/page_sizes.py
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | |