 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
n-l-i-d Guest
|
Posted: Wed May 14, 2008 2:12 pm Post subject: 1 image, get parts, and use in Gui in "canvas"? [G |
|
|
Say I downloaded a free playing cards picture, would it possible to use a single file like those smoothly in an AHK game?
It may not be feasible to use AHK to create games, but maybe... (I took the cards, it could have been any other simple game with a limited amount of graphics, like chess for example).
In short:
1. Is it possible with something like GDI+, to load parts of a picture, which can then be drawn on a Gui with Gui, Add, Picture
2. Is it possible, and "better" to draw on a GDI+ "canvas" instead, and can those image parts easily be manipulated (show/hide, move etcet.)?
I want to avoid using multitudes of Gui, Add, Picture, and/or a whole lot of single image files, and I think it could be faster "that way".
So: I hope it is doable to create a "canvas" with AHK, and be able to show and still manipulate something as "dramatic" as an amount of images that is (in this example) at least 3 times a whole stack of cards (plus some Jokers). 3 x 52 + ? = 156+ image parts, say 200 images including backgrounds and other stuff.
 |
|
| Back to top |
|
 |
[VxE]
Joined: 07 Oct 2006 Posts: 926
|
Posted: Wed May 14, 2008 7:59 pm Post subject: |
|
|
[brainfart]
I think you can make a whole bunch of Gui windows (with no title bar or borders) and have each one show a different region of the image (a single card) but have each Gui's region only big enough for one card to show.
Then you could manipulate the Guis instead of trying to draw everything in the correct order (you could even do rudimentary animations with a series of short WinMove's)
[/brainfart]
You should go all the way and photoshop the AHK logo onto each card. _________________ My Home Thread
More Common Answers: 1. It's in the FAQ 2. Ternary ( ? : ) guide 3. Post code with [code][/code] tags |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|