Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
76512a08
Commit
76512a08
authored
Oct 15, 2010
by
unknown
Browse files
Text rendering fix
parent
dd7f8724
Changes
10
Hide whitespace changes
Inline
Side-by-side
cockatrice/cockatrice.pro
View file @
76512a08
...
@@ -6,7 +6,6 @@ MOC_DIR = build
...
@@ -6,7 +6,6 @@ MOC_DIR = build
OBJECTS_DIR
=
build
OBJECTS_DIR
=
build
RESOURCES
=
cockatrice
.
qrc
RESOURCES
=
cockatrice
.
qrc
QT
+=
network
svg
QT
+=
network
svg
CONFIG
+=
debug
HEADERS
+=
src
/
counter
.
h
\
HEADERS
+=
src
/
counter
.
h
\
src
/
dlg_creategame
.
h
\
src
/
dlg_creategame
.
h
\
...
...
cockatrice/resources/countries/hu.svg
View file @
76512a08
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"1200"
height=
"600"
>
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"1200"
height=
"600"
>
<rect
fill=
"#ce1126"
width=
"1200"
height=
"200"
/>
<rect
fill=
"#ce1126"
width=
"1200"
height=
"200"
/>
<rect
fill=
"#fff"
y=
"200"
width=
"1200"
height=
"200"
/>
<rect
fill=
"#fff"
y=
"200"
width=
"1200"
height=
"200"
/>
<rect
fill=
"#008751"
y=
"400"
width=
"1200"
height=
"200"
/>
<rect
fill=
"#008751"
y=
"400"
width=
"1200"
height=
"200"
/>
</svg>
</svg>
\ No newline at end of file
cockatrice/resources/countries/ie.svg
View file @
76512a08
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"1200"
height=
"600"
>
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"1200"
height=
"600"
>
<rect
fill=
"#009B48"
width=
"400"
height=
"600"
/>
<rect
fill=
"#009B48"
width=
"400"
height=
"600"
/>
<rect
fill=
"#fff"
x=
"400"
width=
"400"
height=
"600"
/>
<rect
fill=
"#fff"
x=
"400"
width=
"400"
height=
"600"
/>
<rect
fill=
"#FF7900"
x=
"800"
width=
"400"
height=
"600"
/>
<rect
fill=
"#FF7900"
x=
"800"
width=
"400"
height=
"600"
/>
</svg>
</svg>
\ No newline at end of file
cockatrice/resources/countries/jp.svg
View file @
76512a08
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"900"
height=
"600"
>
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"900"
height=
"600"
>
<rect
fill=
"#fff"
height=
"600"
width=
"900"
/>
<rect
fill=
"#fff"
height=
"600"
width=
"900"
/>
<circle
fill=
"#bc002d"
cx=
"450"
cy=
"300"
r=
"180"
/>
<circle
fill=
"#bc002d"
cx=
"450"
cy=
"300"
r=
"180"
/>
</svg>
</svg>
\ No newline at end of file
cockatrice/resources/countries/nl.svg
View file @
76512a08
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"900"
height=
"600"
viewBox=
"0 0 9 6"
>
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"900"
height=
"600"
viewBox=
"0 0 9 6"
>
<rect
fill=
"#21468B"
width=
"9"
height=
"6"
/>
<rect
fill=
"#21468B"
width=
"9"
height=
"6"
/>
<rect
fill=
"#FFF"
width=
"9"
height=
"4"
/>
<rect
fill=
"#FFF"
width=
"9"
height=
"4"
/>
<rect
fill=
"#AE1C28"
width=
"9"
height=
"2"
/>
<rect
fill=
"#AE1C28"
width=
"9"
height=
"2"
/>
</svg>
</svg>
\ No newline at end of file
cockatrice/resources/countries/se.svg
View file @
76512a08
<?xml version="1.0" encoding="UTF-8"?>
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"1600"
height=
"1000"
viewBox=
"0 0 16 10"
>
<?xml version="1.0" encoding="UTF-8"?>
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"1600"
height=
"1000"
viewBox=
"0 0 16 10"
>
<rect
width=
"16"
height=
"10"
fill=
"#005293"
/>
<rect
width=
"16"
height=
"10"
fill=
"#005293"
/>
<rect
width=
"2"
height=
"10"
x=
"5"
fill=
"#FECB00"
/>
<rect
width=
"2"
height=
"10"
x=
"5"
fill=
"#FECB00"
/>
<rect
width=
"16"
height=
"2"
y=
"4"
fill=
"#FECB00"
/>
<rect
width=
"16"
height=
"2"
y=
"4"
fill=
"#FECB00"
/>
</svg>
</svg>
cockatrice/resources/countries/tr.svg
View file @
76512a08
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"1200"
height=
"800"
viewBox=
"0 0 360 240"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
>
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"1200"
height=
"800"
viewBox=
"0 0 360 240"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
>
<rect
fill=
"#e30a17"
width=
"360"
height=
"240"
/>
<rect
fill=
"#e30a17"
width=
"360"
height=
"240"
/>
<rect
fill=
"#fff"
width=
"8"
height=
"240"
/>
<rect
fill=
"#fff"
width=
"8"
height=
"240"
/>
<circle
fill=
"#fff"
cx=
"128"
cy=
"120"
r=
"60"
/>
<circle
fill=
"#fff"
cx=
"128"
cy=
"120"
r=
"60"
/>
<circle
fill=
"#e30a17"
cx=
"143"
cy=
"120"
r=
"48"
/>
<circle
fill=
"#e30a17"
cx=
"143"
cy=
"120"
r=
"48"
/>
<g
fill=
"#fff"
transform=
"translate(205,120) scale(30) rotate(-90)"
>
<g
fill=
"#fff"
transform=
"translate(205,120) scale(30) rotate(-90)"
>
<g
id=
"g2"
>
<g
id=
"g2"
>
<polygon
id=
"g1"
points=
"0,0 0,1 .5,1"
transform=
"translate(0,-1) rotate(18)"
/>
<polygon
id=
"g1"
points=
"0,0 0,1 .5,1"
transform=
"translate(0,-1) rotate(18)"
/>
<use
xlink:href=
"#g1"
transform=
"scale(-1,1)"
/>
<use
xlink:href=
"#g1"
transform=
"scale(-1,1)"
/>
</g>
</g>
<use
xlink:href=
"#g2"
transform=
"rotate(72)"
/>
<use
xlink:href=
"#g2"
transform=
"rotate(72)"
/>
<use
xlink:href=
"#g2"
transform=
"rotate(-72)"
/>
<use
xlink:href=
"#g2"
transform=
"rotate(-72)"
/>
<use
xlink:href=
"#g2"
transform=
"rotate(144)"
/>
<use
xlink:href=
"#g2"
transform=
"rotate(144)"
/>
<use
xlink:href=
"#g2"
transform=
"rotate(-144)"
/>
<use
xlink:href=
"#g2"
transform=
"rotate(-144)"
/>
</g>
</g>
</svg>
</svg>
cockatrice/resources/countries/us.svg
View file @
76512a08
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<svg
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
width=
"1235"
height=
"650"
>
<svg
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
width=
"1235"
height=
"650"
>
<defs>
<defs>
<polygon
id=
"pt"
points=
"-0.1624598481164531,0 0,-0.5 0.1624598481164531,0"
transform=
"scale(0.0616)"
fill=
"#FFF"
/>
<polygon
id=
"pt"
points=
"-0.1624598481164531,0 0,-0.5 0.1624598481164531,0"
transform=
"scale(0.0616)"
fill=
"#FFF"
/>
<g
id=
"star"
><use
xlink:href=
"#pt"
transform=
"rotate(-144)"
/><use
xlink:href=
"#pt"
transform=
"rotate(-72)"
/><use
xlink:href=
"#pt"
/><use
xlink:href=
"#pt"
transform=
"rotate(72)"
/><use
xlink:href=
"#pt"
transform=
"rotate(144)"
/></g>
<g
id=
"star"
><use
xlink:href=
"#pt"
transform=
"rotate(-144)"
/><use
xlink:href=
"#pt"
transform=
"rotate(-72)"
/><use
xlink:href=
"#pt"
/><use
xlink:href=
"#pt"
transform=
"rotate(72)"
/><use
xlink:href=
"#pt"
transform=
"rotate(144)"
/></g>
<g
id=
"s5"
><use
xlink:href=
"#star"
x=
"-0.252"
/><use
xlink:href=
"#star"
x=
"-0.126"
/><use
xlink:href=
"#star"
/><use
xlink:href=
"#star"
x=
"0.126"
/><use
xlink:href=
"#star"
x=
"0.252"
/></g>
<g
id=
"s5"
><use
xlink:href=
"#star"
x=
"-0.252"
/><use
xlink:href=
"#star"
x=
"-0.126"
/><use
xlink:href=
"#star"
/><use
xlink:href=
"#star"
x=
"0.126"
/><use
xlink:href=
"#star"
x=
"0.252"
/></g>
<g
id=
"s6"
><use
xlink:href=
"#s5"
x=
"-0.063"
/><use
xlink:href=
"#star"
x=
"0.315"
/></g>
<g
id=
"s6"
><use
xlink:href=
"#s5"
x=
"-0.063"
/><use
xlink:href=
"#star"
x=
"0.315"
/></g>
<g
id=
"x4"
><use
xlink:href=
"#s6"
/><use
xlink:href=
"#s5"
y=
"0.054"
/><use
xlink:href=
"#s6"
y=
"0.108"
/><use
xlink:href=
"#s5"
y=
"0.162"
/></g>
<g
id=
"x4"
><use
xlink:href=
"#s6"
/><use
xlink:href=
"#s5"
y=
"0.054"
/><use
xlink:href=
"#s6"
y=
"0.108"
/><use
xlink:href=
"#s5"
y=
"0.162"
/></g>
<g
id=
"u"
><use
xlink:href=
"#x4"
y=
"-0.216"
/><use
xlink:href=
"#x4"
/><use
xlink:href=
"#s6"
y=
"0.216"
/></g>
<g
id=
"u"
><use
xlink:href=
"#x4"
y=
"-0.216"
/><use
xlink:href=
"#x4"
/><use
xlink:href=
"#s6"
y=
"0.216"
/></g>
<rect
id=
"stripe"
width=
"1235"
height=
"50"
fill=
"#B22234"
/>
<rect
id=
"stripe"
width=
"1235"
height=
"50"
fill=
"#B22234"
/>
</defs>
</defs>
<rect
width=
"1235"
height=
"650"
fill=
"#FFF"
/><use
xlink:href=
"#stripe"
/><use
xlink:href=
"#stripe"
y=
"100"
/><use
xlink:href=
"#stripe"
y=
"200"
/><use
xlink:href=
"#stripe"
y=
"300"
/><use
xlink:href=
"#stripe"
y=
"400"
/><use
xlink:href=
"#stripe"
y=
"500"
/><use
xlink:href=
"#stripe"
y=
"600"
/><rect
width=
"494"
height=
"350"
fill=
"#3C3B6E"
/><use
xlink:href=
"#u"
transform=
"translate(247,175) scale(650)"
/></svg>
<rect
width=
"1235"
height=
"650"
fill=
"#FFF"
/><use
xlink:href=
"#stripe"
/><use
xlink:href=
"#stripe"
y=
"100"
/><use
xlink:href=
"#stripe"
y=
"200"
/><use
xlink:href=
"#stripe"
y=
"300"
/><use
xlink:href=
"#stripe"
y=
"400"
/><use
xlink:href=
"#stripe"
y=
"500"
/><use
xlink:href=
"#stripe"
y=
"600"
/><rect
width=
"494"
height=
"350"
fill=
"#3C3B6E"
/><use
xlink:href=
"#u"
transform=
"translate(247,175) scale(650)"
/></svg>
\ No newline at end of file
cockatrice/src/abstractcarditem.cpp
View file @
76512a08
...
@@ -118,7 +118,7 @@ void AbstractCardItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *
...
@@ -118,7 +118,7 @@ void AbstractCardItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *
transformPainter
(
painter
,
translatedSize
);
transformPainter
(
painter
,
translatedSize
);
painter
->
setPen
(
textColor
);
painter
->
setPen
(
textColor
);
painter
->
drawText
(
QRectF
(
2
*
scaleFactor
,
2
*
scaleFactor
,
translatedSize
.
width
()
-
4
*
scaleFactor
,
translatedSize
.
height
()
-
4
*
scaleFactor
),
Qt
::
AlignTop
|
Qt
::
AlignLeft
|
Qt
::
TextWrapAnywhere
,
name
);
painter
->
drawText
(
QRectF
(
4
*
scaleFactor
,
4
*
scaleFactor
,
translatedSize
.
width
()
-
8
*
scaleFactor
,
translatedSize
.
height
()
-
8
*
scaleFactor
),
Qt
::
AlignTop
|
Qt
::
AlignLeft
|
Qt
::
TextWrapAnywhere
,
name
);
}
}
painter
->
restore
();
painter
->
restore
();
...
...
cockatrice/src/carditem.cpp
View file @
76512a08
...
@@ -172,12 +172,14 @@ void CardItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
...
@@ -172,12 +172,14 @@ void CardItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
if
(
!
pt
.
isEmpty
())
{
if
(
!
pt
.
isEmpty
())
{
painter
->
save
();
painter
->
save
();
QSizeF
translatedSize
=
getTranslatedSize
(
painter
);
QSizeF
translatedSize
=
getTranslatedSize
(
painter
);
qreal
scaleFactor
=
translatedSize
.
width
()
/
boundingRect
().
width
();
transformPainter
(
painter
,
translatedSize
);
transformPainter
(
painter
,
translatedSize
);
painter
->
setBackground
(
Qt
::
black
);
painter
->
setBackground
(
Qt
::
black
);
painter
->
setBackgroundMode
(
Qt
::
OpaqueMode
);
painter
->
setBackgroundMode
(
Qt
::
OpaqueMode
);
painter
->
setPen
(
Qt
::
white
);
painter
->
setPen
(
Qt
::
white
);
painter
->
drawText
(
QRectF
(
2
,
2
,
translatedSize
.
width
()
-
4
,
translatedSize
.
height
()
-
4
),
Qt
::
AlignRight
|
Qt
::
AlignBottom
,
pt
);
painter
->
drawText
(
QRectF
(
4
*
scaleFactor
,
4
*
scaleFactor
,
translatedSize
.
width
()
-
8
,
translatedSize
.
height
()
-
8
),
Qt
::
AlignRight
|
Qt
::
AlignBottom
,
pt
);
painter
->
restore
();
painter
->
restore
();
}
}
if
(
getBeingPointedAt
())
if
(
getBeingPointedAt
())
...
...
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