Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Playing card curl effect

Status
Not open for further replies.

urosv

Programmer
Mar 3, 2008
10
SI
Is there any way a can simply create Playing card curl effect. Back side to front side corner view only ? Any idea on solution will be greatfull. I need delphi sulution not inserting animated gif in delphi app.
 
Or just use a couple of bitblts.

You'll need a bitmap for each:
1) the front side of the card
2) the back side of the card
3) a diagonal mask:
Code:
+------+
| a   /|  a = transparent
|   /  |
| /    |
|      |
|    b |  b = background color
+------+

Now blit the cards so that the bottom-right corner of (1) intersects with the top-left corner of (2) (or whatever) and then blit the background so that the diagonal takes out the lower-right part of the triangle:
Code:
+------+
|      |
|      |
|      |
|  +---+
|  | /
+--+
Depending on how you want to do it, you may want to rotate one 90.

If you just want a top to bottom flip, that makes it much easier. Instead of a 3rd bitmap, all you need is a DrawRect.

Hope this helps.
 
You can embed an animated gif into your project.
A third party component TGifImage (Freeware) will do this it comes with a basic gif animator.


It might even be built into new versions of Delphi (not sure about that)



Steve: N.M.N.F.
If something is popular, it must be wrong: Mark Twain
 
Yes as i said in my first post animated gif may not be an option solutions, this is already being done... Tnx anyway
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top