Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Games
Kajongg
Commits
efb1fc47
Commit
efb1fc47
authored
Apr 06, 2021
by
Wolfgang Rohdewald
Browse files
pixmapFromSvg(): argument pmapSize is now mandatory
there was no call without it anyway
parent
fad593c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/uitile.py
View file @
efb1fc47
...
...
@@ -205,7 +205,7 @@ class UITile(AnimatedMixin, QGraphicsObject, StrMixin):
painter
.
drawLine
(
QPointF
(
0.0
,
0.0
),
QPointF
(
width
,
height
))
painter
.
drawLine
(
QPointF
(
width
,
0.0
),
QPointF
(
0.0
,
height
))
def
pixmapFromSvg
(
self
,
pmapSize
=
None
,
withBorders
=
None
):
def
pixmapFromSvg
(
self
,
pmapSize
,
withBorders
=
None
):
"""return a pixmap with default size as given in SVG
and optional borders/shadows"""
if
withBorders
is
None
:
...
...
@@ -214,8 +214,6 @@ class UITile(AnimatedMixin, QGraphicsObject, StrMixin):
originalSize
=
self
.
tileset
.
tileSize
.
toSize
()
else
:
originalSize
=
self
.
tileset
.
faceSize
.
toSize
()
if
not
pmapSize
:
pmapSize
=
originalSize
result
=
QPixmap
(
pmapSize
)
result
.
fill
(
Qt
.
transparent
)
painter
=
QPainter
(
result
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment