Commit graph

28 commits

Author SHA1 Message Date
Basile Clement
55a2f75d16
Make cards rounded (#4765)
* Make cards rounded

Magic cards have rounded corners, and playing cards tend to have rounded
corners as well, but Cockatrice currently displays rectangular cards.

This can cause visual glitches when using image scans where the border
does not extend in the corner, and for this reason Cockatrice always
draws a (rectangular) border around the card to try and make it look a
bit better.

In this patch I take a different approach: rather than try to make
rounded pegs, er, cards, go into a square hole, the hole is now rounded.
More precisely, the AbstractCardItem now has a rounded rectangular shape
(with a corner of 5% of the width of the card, identical to that of
modern M:TG physical cards).

As a side effect, the card drawing gets a bit simplified by getting rid
of transformPainter() when drawing the card outline and using the
QPainter::drawPixmap overloads that takes a target QRectF instead.  This
means we no longer have to bother about card rotation when painting
since that's taken care of by the Graphics View framework (which
transformPainter() undoes).

* format

* Also give PileZone rounded corners

* Forgot untap status + bits of CardDragItem

* fix deckviewcard calculations

* Rounded CardInfoPicture
2023-03-07 01:41:08 +01:00
ebbit1q
18a07274d4
clangify everything with the new header sorting (#3908) 2020-03-18 17:36:02 -04:00
ctrlaltca
b29bd9e070
Clang-format (#3028)
* 1/3 Add .clang-format file and travis compilation check

* 2/3 Run clang-format

* 3/3 Fix compilation problems due to include reordering

* 3bis/3 AfterControlStatement: false
2018-01-27 10:41:32 +01:00
Fabio Bas
484a6e8bdc Fix crash #202 2014-08-11 10:50:55 +02:00
Matt Kelly
1bc48a7849 Convert rest of source to 4-space indent 2014-02-11 11:14:19 -05:00
Max-Wilhelm Bruker
c4eb7ba6cf PB: more client files compile 2011-12-30 22:29:57 +01:00
unknown
da467468d5 improved facedown moving 2011-09-15 14:19:29 +02:00
Max-Wilhelm Bruker
46fdae43cd visual improvements: card hover effect, independent scaling of ZoneViewWidget 2011-07-20 21:25:43 +02:00
Max-Wilhelm Bruker
9c527fb5aa Click to hide revealed cards; MultiMove function 2011-01-15 21:39:24 +01:00
Max-Wilhelm Bruker
231887367c card menu improvement, change controller support (bug #3) 2010-12-23 19:21:47 +01:00
Max-Wilhelm Bruker
cbfbc542e7 disallow dropping a card onto another 2010-07-17 23:37:22 +02:00
Max-Wilhelm Bruker
1b286973dd crash fix; weird behaviour fix 2010-07-17 19:22:50 +02:00
Max-Wilhelm Bruker
614f106304 arrows can target players; card attachment works 2010-07-17 18:24:14 +02:00
Max-Wilhelm Bruker
929f4f9b4d cleanup 2010-03-09 14:43:06 +01:00
Max-Wilhelm Bruker
4bf4bbea6a some fixes 2010-03-08 20:17:48 +01:00
Max-Wilhelm Bruker
26a77d9e40 new zone view code 2010-03-08 15:55:35 +01:00
Max-Wilhelm Bruker
b2f83541e7 Initial commit for sideboarding. It's supposed to be fully functional. 2010-03-06 17:17:54 +01:00
Max-Wilhelm Bruker
5fa009714b fixed multi-card dragging 2009-09-09 16:46:09 +02:00
Max-Wilhelm Bruker
00a2f49c94 some fixes 2009-09-08 22:45:48 +02:00
Max-Wilhelm Bruker
ca07cce5ed debug stuff 2009-09-08 19:41:39 +02:00
Max-Wilhelm Bruker
9749423d62 improved card drag, still unfinished 2009-07-07 16:32:32 +02:00
brukie
0f272a2f51 improved card dragging 2009-06-16 18:20:29 +02:00
brukie
04072b02d1 scaled pixmap cache. major speed improvement 2009-06-03 15:38:21 +02:00
Max-Wilhelm Bruker
13b6a360d2 minor fixes 2009-05-27 02:33:43 +02:00
Max-Wilhelm Bruker
a429a4a004 minor changes, implemented 'doesn't untap' and facedown cards 2009-04-07 21:37:57 +02:00
Max-Wilhelm Bruker
6e94221112 improved appearance 2009-03-25 17:02:44 +01:00
Max-Wilhelm Bruker
8782438fcc renamed playerzone to cardzone 2009-03-25 15:08:36 +01:00
Max-Wilhelm Bruker
a11f93df4d initial commit 2009-03-13 22:50:41 +01:00