Bounds
BOUNDS HELPERS
check_textbox_overflow(layer)
Check if a TextLayer overflows the bounding box. @param layer: ArtLayer with "kind" of TextLayer. @return: True if text overflowing, else False.
Source code in src/helpers/bounds.py
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
|
get_bounds_no_effects(layer)
Returns the bounds of a given layer without its effects applied. @param layer: A layer object @return list: Pixel location top left, top right, bottom left, bottom right.
Source code in src/helpers/bounds.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
|
get_dimensions_from_bounds(bounds)
Compute width and height based on a set of bounds given. @param bounds: List of bounds given. @return: Dict containing height, width, and positioning locations.
Source code in src/helpers/bounds.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
|
get_dimensions_no_effects(layer)
Compute the dimensions of a layer without its effects applied. @param layer: A layer object @return: Dict containing height, width, and positioning locations.
Source code in src/helpers/bounds.py
63 64 65 66 67 68 69 70 |
|
get_layer_dimensions(layer)
Compute the width and height dimensions of a layer. @param layer: A layer object @return: Dict containing height, width, and positioning locations.
Source code in src/helpers/bounds.py
73 74 75 76 77 78 79 |
|
get_text_layer_bounds(layer, legacy=False)
Returns a list of the text layer's bounds [left, top, right, bottom]. @param layer: Layer to get the bounds of. @param legacy: Force old way for legacy Photoshop versions. @return: List of the bounds of a given layer.
Source code in src/helpers/bounds.py
101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
|
get_text_layer_dimensions(layer, legacy=False)
Return an object with the specified text layer's width and height, on some versions of Photoshop a text layer must be rasterized before pulling accessing its true bounds. @param layer: Layer to get the dimensions of. @param legacy: Force old way for legacy text layers. @return: Dict containing height and width of the given layer.
Source code in src/helpers/bounds.py
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
|
get_textbox_bounds(layer)
Get the bounds of a TextLayer's bounding box. @param layer: ArtLayer with "kind" of TextLayer. @return: List of bounds integers.
Source code in src/helpers/bounds.py
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
|
get_textbox_dimensions(layer)
Get the dimensions of a TextLayer's bounding box. @param layer: ArtLayer with "kind" of TextLayer. @return: Dict containing width and height.
Source code in src/helpers/bounds.py
135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
|