maps4fs 2.2.1__py3-none-any.whl → 2.2.2__py3-none-any.whl
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.
- maps4fs/generator/component/background.py +1 -0
- maps4fs/generator/component/base/component.py +10 -2
- {maps4fs-2.2.1.dist-info → maps4fs-2.2.2.dist-info}/METADATA +2 -1
- {maps4fs-2.2.1.dist-info → maps4fs-2.2.2.dist-info}/RECORD +7 -7
- {maps4fs-2.2.1.dist-info → maps4fs-2.2.2.dist-info}/WHEEL +0 -0
- {maps4fs-2.2.1.dist-info → maps4fs-2.2.2.dist-info}/licenses/LICENSE.md +0 -0
- {maps4fs-2.2.1.dist-info → maps4fs-2.2.2.dist-info}/top_level.txt +0 -0
@@ -597,6 +597,7 @@ class Background(MeshComponent, ImageComponent):
|
|
597
597
|
polygon_points=polygon.exterior.coords,
|
598
598
|
angle=self.rotation,
|
599
599
|
canvas_size=self.background_size,
|
600
|
+
xshift=-Parameters.BACKGROUND_DISTANCE,
|
600
601
|
)
|
601
602
|
fitted_polygon = shapely.Polygon(fitted_polygon_points)
|
602
603
|
fitted_polygons.append(fitted_polygon)
|
@@ -365,6 +365,8 @@ class Component:
|
|
365
365
|
angle: int = 0,
|
366
366
|
border: int = 0,
|
367
367
|
canvas_size: int | None = None,
|
368
|
+
xshift: int = 0,
|
369
|
+
yshift: int = 0,
|
368
370
|
) -> list[tuple[int, int]]:
|
369
371
|
"""Fits a polygon into the bounds of the map.
|
370
372
|
|
@@ -374,6 +376,9 @@ class Component:
|
|
374
376
|
margin (int, optional): The margin to add to the polygon. Defaults to 0.
|
375
377
|
angle (int, optional): The angle to rotate the polygon by. Defaults to 0.
|
376
378
|
border (int, optional): The border to add to the bounds. Defaults to 0.
|
379
|
+
canvas_size (int, optional): The size of the canvas. Defaults to None.
|
380
|
+
xshift (int, optional): The x-axis shift to apply. Will be added to calculated offset.
|
381
|
+
yshift (int, optional): The y-axis shift to apply. Will be added to calculated offset.
|
377
382
|
|
378
383
|
Returns:
|
379
384
|
list[tuple[int, int]]: The points of the polygon fitted into the map bounds.
|
@@ -400,8 +405,11 @@ class Component:
|
|
400
405
|
)
|
401
406
|
osm_object = rotate(osm_object, -angle, origin=(center_x, center_y))
|
402
407
|
offset = int((self.map_size / 2) - (self.map_rotated_size / 2)) * self.map.size_scale
|
403
|
-
|
404
|
-
|
408
|
+
xoff = yoff = offset
|
409
|
+
xoff += xshift
|
410
|
+
yoff += yshift
|
411
|
+
self.logger.debug("Translating the osm_object by X: %s, Y: %s", xoff, yoff)
|
412
|
+
osm_object = translate(osm_object, xoff=xoff, yoff=yoff)
|
405
413
|
self.logger.debug("Rotated and translated the osm_object.")
|
406
414
|
|
407
415
|
if margin and object_type is Polygon:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: maps4fs
|
3
|
-
Version: 2.2.
|
3
|
+
Version: 2.2.2
|
4
4
|
Summary: Generate map templates for Farming Simulator from real places.
|
5
5
|
Author-email: iwatkot <iwatkot@gmail.com>
|
6
6
|
License: Apache License 2.0
|
@@ -54,6 +54,7 @@ Dynamic: license-file
|
|
54
54
|
<a href="docs/step_by_step.md">Create a map in 10 steps</a> •
|
55
55
|
<a href="docs/recommendations.md">Practical recommendations</a> •
|
56
56
|
<a href="#How-To-Run">How-To-Run</a><br>
|
57
|
+
<a href="docs/my_maps.md">My Maps</a> •
|
57
58
|
<a href="docs/FAQ.md">FAQ</a> •
|
58
59
|
<a href="docs/map_structure.md">Map Structure</a> •
|
59
60
|
<a href="#Schemas-Editor">Schemas Editor</a> •
|
@@ -8,7 +8,7 @@ maps4fs/generator/qgis.py,sha256=Es8hLuqN_KH8lDfnJE6He2rWYbAKJ3RGPn-o87S6CPI,611
|
|
8
8
|
maps4fs/generator/settings.py,sha256=NukAt1s4CS0HEWmUcBPc8OiqkWqjts3AvvkX0APZKes,11385
|
9
9
|
maps4fs/generator/statistics.py,sha256=aynS3zbAtiwnU_YLKHPTiiaKW98_suvQUhy1SGBA6mc,2448
|
10
10
|
maps4fs/generator/component/__init__.py,sha256=s01yVVVi8R2xxNvflu2D6wTd9I_g73AMM2x7vAC7GX4,490
|
11
|
-
maps4fs/generator/component/background.py,sha256
|
11
|
+
maps4fs/generator/component/background.py,sha256=-GNA6zdQmfu7Oi4Cny0uhxlgl39VbvhEGhl4wKdh0ew,34533
|
12
12
|
maps4fs/generator/component/config.py,sha256=uL76h9UwyhZKZmbxz0mBmWtEPN6qYay4epTEqqtej60,8601
|
13
13
|
maps4fs/generator/component/dem.py,sha256=mtsdTIcEHmR9mW1LMcCaX4F2OCch9BM_WXHkvJby9ZY,11930
|
14
14
|
maps4fs/generator/component/grle.py,sha256=3BKGlR0q0t0NvmqeT81WieS6MIc_UlMQjIDDZiqTiws,27243
|
@@ -17,12 +17,12 @@ maps4fs/generator/component/layer.py,sha256=U_DzJTn1m_yGOtwuvbXxr7oL7YHHBGBcK37l
|
|
17
17
|
maps4fs/generator/component/satellite.py,sha256=9nKwL8zQ-BB6WFMx2m8zduFn6RaxSNv6Vtpge1-QMYE,5052
|
18
18
|
maps4fs/generator/component/texture.py,sha256=Ngvfe51grb6Ead6WvNjx1Zr0yz65y8y2vY8xUteLoNo,35019
|
19
19
|
maps4fs/generator/component/base/__init__.py,sha256=zZMLEkGzb4z0xql650gOtGSvcgX58DnJ2yN3vC2daRk,43
|
20
|
-
maps4fs/generator/component/base/component.py,sha256=
|
20
|
+
maps4fs/generator/component/base/component.py,sha256=lf0V9CLUXMg88Nm2yI3rP5taVYYlNivud0x6kbhBYqA,23312
|
21
21
|
maps4fs/generator/component/base/component_image.py,sha256=WTGC6v1KuS5sLNCC95Z48nCspvATKKNOuhTNYzTWXr4,8315
|
22
22
|
maps4fs/generator/component/base/component_mesh.py,sha256=3hC-qDT8Vde6SmRMqs9USAkrF-gL2dDTYW71ATpxUS4,9130
|
23
23
|
maps4fs/generator/component/base/component_xml.py,sha256=MT-VhU2dEckLFxAgmxg6V3gnv11di_94Qq6atfpOLdc,5342
|
24
|
-
maps4fs-2.2.
|
25
|
-
maps4fs-2.2.
|
26
|
-
maps4fs-2.2.
|
27
|
-
maps4fs-2.2.
|
28
|
-
maps4fs-2.2.
|
24
|
+
maps4fs-2.2.2.dist-info/licenses/LICENSE.md,sha256=pTKD_oUexcn-yccFCTrMeLkZy0ifLRa-VNcDLqLZaIw,10749
|
25
|
+
maps4fs-2.2.2.dist-info/METADATA,sha256=m6Ilrs7QCxuaGxLXvcLUVOjQLeZsTBTcpV-e14ihpW0,46076
|
26
|
+
maps4fs-2.2.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
27
|
+
maps4fs-2.2.2.dist-info/top_level.txt,sha256=Ue9DSRlejRQRCaJueB0uLcKrWwsEq9zezfv5dI5mV1M,8
|
28
|
+
maps4fs-2.2.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|