papyru 2.11.1.dev133__tar.gz → 2.11.1.dev134__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {papyru-2.11.1.dev133/papyru.egg-info → papyru-2.11.1.dev134}/PKG-INFO +1 -1
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru/create_variant/edit_template/xml.py +12 -25
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134/papyru.egg-info}/PKG-INFO +1 -1
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/setup.py +1 -1
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/LICENSE.txt +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/README.md +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/bin/generate_jsonschema.py +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru/__init__.py +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru/auth.py +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru/context.py +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru/create_variant/__init__.py +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru/create_variant/component.py +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru/create_variant/constants.py +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru/create_variant/edit_template/__init__.py +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru/create_variant/edit_template/ean.py +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru/create_variant/edit_template/manufacturer_address.py +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru/create_variant/edit_template/motive.py +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru/create_variant/edit_template/render_text.py +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru/create_variant/edit_template/title.py +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru/create_variant/resi.py +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru/logger.py +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru/logger_stdout.py +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru/logger_types.py +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru/middleware.py +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru/problem.py +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru/profiler.py +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru/resource.py +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru/serializer.py +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru/stack_context.py +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru/static/__init__.py +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru/static/apps.py +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru/static/urls.py +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru/static/views.py +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru/utils.py +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru/validation.py +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru/varspool/__init__.py +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru/varspool/assets/Job.json +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru/varspool/assets/JobStatusHistory.json +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru/varspool/command/__init__.py +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru/varspool/command/config.py +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru/varspool/command/types.py +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru/varspool/serializers.py +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru/varspool/types.py +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru/xml_helper.py +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru.egg-info/SOURCES.txt +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru.egg-info/dependency_links.txt +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru.egg-info/requires.txt +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru.egg-info/top_level.txt +0 -0
- {papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/setup.cfg +0 -0
|
@@ -11,16 +11,13 @@ class PlaceholderInfo:
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
@dataclass(frozen=True)
|
|
14
|
-
class
|
|
14
|
+
class CustomPlacement:
|
|
15
15
|
container_width: float
|
|
16
16
|
container_height: float
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
scale_x: float
|
|
22
|
-
scale_y: float
|
|
23
|
-
rotation: float
|
|
17
|
+
scaled_img_width: float
|
|
18
|
+
scaled_img_height: float
|
|
19
|
+
x_offset: float
|
|
20
|
+
y_offset: float
|
|
24
21
|
|
|
25
22
|
|
|
26
23
|
@dataclass(frozen=True)
|
|
@@ -28,7 +25,7 @@ class ImageInfo:
|
|
|
28
25
|
location: str
|
|
29
26
|
width: int
|
|
30
27
|
height: int
|
|
31
|
-
placement:
|
|
28
|
+
placement: CustomPlacement = None
|
|
32
29
|
|
|
33
30
|
|
|
34
31
|
def find_placeholder(doc: XMLHelper,
|
|
@@ -151,27 +148,17 @@ def _place_custom_image(doc: XMLHelper, ph: PlaceholderInfo,
|
|
|
151
148
|
'0 0 %s %s' % (placement.container_width,
|
|
152
149
|
placement.container_height))
|
|
153
150
|
|
|
154
|
-
img_width = image_info.width * placement.scale_x
|
|
155
|
-
img_height = image_info.height * placement.scale_y
|
|
156
|
-
x = placement.placement_x - placement.container_x
|
|
157
|
-
y = placement.placement_y - placement.container_y
|
|
158
|
-
|
|
159
151
|
has_xlink = doc.namespace('xlink') is not None
|
|
160
152
|
doc.set_attribute(ph.placeholder,
|
|
161
153
|
'href', image_info.location,
|
|
162
154
|
'xlink' if has_xlink else None)
|
|
163
155
|
|
|
164
|
-
doc.set_attribute(ph.placeholder, 'x', '%s' %
|
|
165
|
-
doc.set_attribute(ph.placeholder, 'y', '%s' %
|
|
166
|
-
doc.set_attribute(ph.placeholder, 'width', '%s' %
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
doc.set_attribute(ph.placeholder, 'transform',
|
|
171
|
-
'rotate(%s %s %s)' % (
|
|
172
|
-
placement.rotation,
|
|
173
|
-
x + img_width / 2,
|
|
174
|
-
y + img_height / 2))
|
|
156
|
+
doc.set_attribute(ph.placeholder, 'x', '%s' % placement.x_offset)
|
|
157
|
+
doc.set_attribute(ph.placeholder, 'y', '%s' % placement.y_offset)
|
|
158
|
+
doc.set_attribute(ph.placeholder, 'width', '%s' %
|
|
159
|
+
placement.scaled_img_width)
|
|
160
|
+
doc.set_attribute(ph.placeholder, 'height', '%s' %
|
|
161
|
+
placement.scaled_img_height)
|
|
175
162
|
|
|
176
163
|
_set_changed(doc, ph.placeholder)
|
|
177
164
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru/create_variant/edit_template/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{papyru-2.11.1.dev133 → papyru-2.11.1.dev134}/papyru/create_variant/edit_template/render_text.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|