Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
77c9dd86
Commit
77c9dd86
authored
Mar 24, 2004
by
Sami Nopanen
Committed by
Alexandre Julliard
Mar 24, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented card drawing mode flag for rounding card corners.
parent
4d6db9a6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
0 deletions
+40
-0
cards.c
dlls/cards/cards.c
+38
-0
cards.h
dlls/cards/cards.h
+2
-0
No files found.
dlls/cards/cards.c
View file @
77c9dd86
...
...
@@ -84,9 +84,15 @@ BOOL WINAPI cdtDrawExt(HDC hdc, int x, int y, int dx, int dy, int card, int mode
HBITMAP
hCardBitmap
;
HGDIOBJ
result
;
DWORD
rasterOp
=
SRCCOPY
;
BOOL
roundCornersFlag
;
COLORREF
savedPixels
[
12
];
TRACE
(
"(%p, %d, %d, %d, %d, %d, %d, %ld)
\n
"
,
hdc
,
x
,
y
,
dx
,
dy
,
card
,
mode
,
color
);
roundCornersFlag
=
!
(
mode
&
MODEFLAG_DONT_ROUND_CORNERS
)
&&
(
dx
==
cardWidth
)
&&
(
dy
==
cardHeight
);
mode
&=
~
MODEFLAG_DONT_ROUND_CORNERS
;
if
((
card
<
0
)
||
(
card
>
CARD_MAX
))
{
FIXME
(
"Unexpected card: %d
\n
"
,
card
);
...
...
@@ -144,10 +150,42 @@ BOOL WINAPI cdtDrawExt(HDC hdc, int x, int y, int dx, int dy, int card, int mode
SetBkColor
(
hdc
,
color
);
if
(
roundCornersFlag
)
{
savedPixels
[
0
]
=
GetPixel
(
hdc
,
x
,
y
);
savedPixels
[
1
]
=
GetPixel
(
hdc
,
x
+
1
,
y
);
savedPixels
[
2
]
=
GetPixel
(
hdc
,
x
,
y
+
1
);
savedPixels
[
3
]
=
GetPixel
(
hdc
,
x
+
dx
-
1
,
y
);
savedPixels
[
4
]
=
GetPixel
(
hdc
,
x
+
dx
-
2
,
y
);
savedPixels
[
5
]
=
GetPixel
(
hdc
,
x
+
dx
-
1
,
y
+
1
);
savedPixels
[
6
]
=
GetPixel
(
hdc
,
x
,
y
+
dy
-
1
);
savedPixels
[
7
]
=
GetPixel
(
hdc
,
x
+
1
,
y
+
dy
-
1
);
savedPixels
[
8
]
=
GetPixel
(
hdc
,
x
,
y
+
dy
-
2
);
savedPixels
[
9
]
=
GetPixel
(
hdc
,
x
+
dx
-
1
,
y
+
dy
-
1
);
savedPixels
[
10
]
=
GetPixel
(
hdc
,
x
+
dx
-
2
,
y
+
dy
-
1
);
savedPixels
[
11
]
=
GetPixel
(
hdc
,
x
+
dx
-
1
,
y
+
dy
-
2
);
}
if
((
cardWidth
==
dx
)
&&
(
cardHeight
==
dy
))
BitBlt
(
hdc
,
x
,
y
,
cardWidth
,
cardHeight
,
hMemoryDC
,
0
,
0
,
rasterOp
);
else
StretchBlt
(
hdc
,
x
,
y
,
dx
,
dy
,
hMemoryDC
,
0
,
0
,
cardWidth
,
cardHeight
,
rasterOp
);
if
(
roundCornersFlag
)
{
SetPixel
(
hdc
,
x
,
y
,
savedPixels
[
0
]);
SetPixel
(
hdc
,
x
+
1
,
y
,
savedPixels
[
1
]);
SetPixel
(
hdc
,
x
,
y
+
1
,
savedPixels
[
2
]);
SetPixel
(
hdc
,
x
+
dx
-
1
,
y
,
savedPixels
[
3
]);
SetPixel
(
hdc
,
x
+
dx
-
2
,
y
,
savedPixels
[
4
]);
SetPixel
(
hdc
,
x
+
dx
-
1
,
y
+
1
,
savedPixels
[
5
]);
SetPixel
(
hdc
,
x
,
y
+
dy
-
1
,
savedPixels
[
6
]);
SetPixel
(
hdc
,
x
+
1
,
y
+
dy
-
1
,
savedPixels
[
7
]);
SetPixel
(
hdc
,
x
,
y
+
dy
-
2
,
savedPixels
[
8
]);
SetPixel
(
hdc
,
x
+
dx
-
1
,
y
+
dy
-
1
,
savedPixels
[
9
]);
SetPixel
(
hdc
,
x
+
dx
-
2
,
y
+
dy
-
1
,
savedPixels
[
10
]);
SetPixel
(
hdc
,
x
+
dx
-
1
,
y
+
dy
-
2
,
savedPixels
[
11
]);
}
}
DeleteDC
(
hMemoryDC
);
...
...
dlls/cards/cards.h
View file @
77c9dd86
...
...
@@ -61,6 +61,8 @@
#define MODE_DECKX 6
#define MODE_DECKO 7
#define MODEFLAG_DONT_ROUND_CORNERS 0x80000000
/* As defined by CARD_SUIT_* */
#define SUIT_FROM_CARD(card) (card & 3)
/* 0 = ace, ..., 12 = king */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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