Position
positions_vertical = [Dimensions.Top, Dimensions.Bottom, Dimensions.CenterY]
module-attribute
ALIGNMENT
align(axis=None, layer=None, reference=None)
Align the currently active layer to current selection, vertically or horizontal. @param axis: Which axis use when aligning the layer, can be provided as a single axis or list. @param layer: ArtLayer or LayerSet to align. Uses active layer if not provided. @param reference: Reference to align the layer within. Uses current selection if not provided.
Source code in src/helpers/position.py
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 |
|
align_all(layer=None, reference=None)
Utility definition for passing CenterX and CenterY to align function.
Source code in src/helpers/position.py
62 63 64 65 66 67 |
|
align_bottom(layer=None, reference=None)
Utility definition for passing Bottom to align function.
Source code in src/helpers/position.py
110 111 112 113 114 115 |
|
align_horizontal(layer=None, reference=None)
Utility definition for passing CenterX to align function.
Source code in src/helpers/position.py
78 79 80 81 82 83 |
|
align_left(layer=None, reference=None)
Utility definition for passing Left to align function.
Source code in src/helpers/position.py
86 87 88 89 90 91 |
|
align_right(layer=None, reference=None)
Utility definition for passing Right to align function.
Source code in src/helpers/position.py
94 95 96 97 98 99 |
|
align_top(layer=None, reference=None)
Utility definition for passing Top to align function.
Source code in src/helpers/position.py
102 103 104 105 106 107 |
|
align_vertical(layer=None, reference=None)
Utility definition for passing CenterY to align function.
Source code in src/helpers/position.py
70 71 72 73 74 75 |
|
frame_layer(layer, reference, smallest=False, anchor=AnchorPosition.TopLeft, alignments=None)
Scale and position a layer within the bounds of a reference layer. @param layer: Layer to scale and position. @param reference: Reference frame to position within. @param smallest: Whether to scale to smallest or largest edge. @param anchor: Anchor position for scaling the layer. @param alignments: Alignments used to position the layer.
Source code in src/helpers/position.py
208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 |
|
position_between_layers(layer, top_layer, bottom_layer)
Align layer vertically between two reference layers. @param layer: Layer to align vertically @param top_layer: Reference layer above the layer to be aligned. @param bottom_layer: Reference layer below the layer to be aligned.
Source code in src/helpers/position.py
123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
|
position_dividers(dividers, layers)
Positions a list of dividers between a list of layers. @param dividers: Divider layers to position, should contain 1 fewer objects than layers param. @param layers: Layers to position the dividers between.
Source code in src/helpers/position.py
139 140 141 142 143 144 145 146 147 148 149 |
|
space_layers_apart(layers, gap)
Position list of layers apart using a given gap. @param layers: List of ArtLayers or LayerSets. @param gap: Gap in pixels.
Source code in src/helpers/position.py
196 197 198 199 200 201 202 203 204 205 |
|
spread_layers_over_reference(layers, ref, gap=None, inside_gap=None, outside_matching=True)
Spread layers apart across a reference layer. @param layers: List of ArtLayers or LayerSets. @param ref: Reference used as the maximum height boundary for all layers given. @param gap: Gap between the top of the reference and the first layer, or between all layers if not provided. @param inside_gap: Gap between each layer, calculated using leftover space if not provided. @param outside_matching: If enabled, will enforce top and bottom gap to match.
Source code in src/helpers/position.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 |
|