PNGRendor 0.1.0__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.
@@ -0,0 +1,21 @@
1
+ Metadata-Version: 2.4
2
+ Name: PNGRendor
3
+ Version: 0.1.0
4
+ Summary: use this to render pngs and other
5
+ Author: egor203983
6
+ Classifier: Programming Language :: Python :: 3
7
+ Classifier: License :: OSI Approved :: MIT License
8
+ Description-Content-Type: text/plain
9
+ Requires-Dist: pygame
10
+ Dynamic: author
11
+ Dynamic: classifier
12
+ Dynamic: description
13
+ Dynamic: description-content-type
14
+ Dynamic: requires-dist
15
+ Dynamic: summary
16
+
17
+
18
+ example:
19
+ import PNGRendor
20
+ PNG = inprintator(path)
21
+ PNG.renderPNG(sx, sy, x, y, angle)
@@ -0,0 +1,21 @@
1
+ Metadata-Version: 2.4
2
+ Name: PNGRendor
3
+ Version: 0.1.0
4
+ Summary: use this to render pngs and other
5
+ Author: egor203983
6
+ Classifier: Programming Language :: Python :: 3
7
+ Classifier: License :: OSI Approved :: MIT License
8
+ Description-Content-Type: text/plain
9
+ Requires-Dist: pygame
10
+ Dynamic: author
11
+ Dynamic: classifier
12
+ Dynamic: description
13
+ Dynamic: description-content-type
14
+ Dynamic: requires-dist
15
+ Dynamic: summary
16
+
17
+
18
+ example:
19
+ import PNGRendor
20
+ PNG = inprintator(path)
21
+ PNG.renderPNG(sx, sy, x, y, angle)
@@ -0,0 +1,7 @@
1
+ rendor.py
2
+ setup.py
3
+ PNGRendor.egg-info/PKG-INFO
4
+ PNGRendor.egg-info/SOURCES.txt
5
+ PNGRendor.egg-info/dependency_links.txt
6
+ PNGRendor.egg-info/requires.txt
7
+ PNGRendor.egg-info/top_level.txt
@@ -0,0 +1 @@
1
+ pygame
@@ -0,0 +1 @@
1
+ rendor
@@ -0,0 +1,22 @@
1
+ import pygame
2
+
3
+ screen = pygame.display.get_surface()
4
+ class inprintator:
5
+ def __init__(self, path):
6
+ self.img = pygame.image.load(path).convert_alpha()
7
+ def renderPNG(self, sx, sy, x, y, angle):
8
+ imgs = pygame.transform.scale(self.img, (sx, sy))
9
+ imgsr = pygame.transform.rotate(imgs, angle)
10
+ nw, nh = imgsr.get_size()
11
+ corectx = x - (nw - sx) / 2
12
+ corecty = y - (nh - sy) / 2
13
+ screen.blit(imgsr, (corectx, corecty))
14
+ def renFramedPNG(self, framnmb, cols, rows, sx, sy, x, y):
15
+ nw, nh = self.img.get_size()
16
+ fnw = nw // cols
17
+ fnh = nh // rows
18
+ col = framnmb % cols
19
+ row = framnmb // cols
20
+ framosurfaco = self.img.subsurface((col * fnw, row * fnh, fnw, fnh))
21
+ imgs = pygame.transform.scale(framosurfaco, (sx, sy))
22
+ screen.blit(imgs, (x, y))
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,21 @@
1
+ from setuptools import setup
2
+
3
+ setup(
4
+ name="PNGRendor",
5
+ version="0.1.0",
6
+ author="egor203983",
7
+ description="use this to render pngs and other",
8
+ long_description="""
9
+ example:
10
+ import PNGRendor
11
+ PNG = inprintator(path)
12
+ PNG.renderPNG(sx, sy, x, y, angle)
13
+ """,
14
+ long_description_content_type="text/plain",
15
+ py_modules=["rendor"],
16
+ install_requires=["pygame"],
17
+ classifiers=[
18
+ "Programming Language :: Python :: 3",
19
+ "License :: OSI Approved :: MIT License"
20
+ ],
21
+ )