AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

1 image, get parts, and use in Gui in "canvas"? [G

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
n-l-i-d
Guest





PostPosted: Wed May 14, 2008 2:12 pm    Post subject: 1 image, get parts, and use in Gui in "canvas"? [G Reply with quote

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.

Smile
Back to top
[VxE]



Joined: 07 Oct 2006
Posts: 926

PostPosted: Wed May 14, 2008 7:59 pm    Post subject: Reply with quote

[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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group