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 

[SOLVED] Can GUI image control be rotated about z axis

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Leef_me



Joined: 08 Apr 2009
Posts: 1158
Location: San Diego, California

PostPosted: Wed Aug 19, 2009 10:47 pm    Post subject: [SOLVED] Can GUI image control be rotated about z axis Reply with quote

I know (or at least think) that AHK GUI doesn't know about z axis, that is like the rotation of a fan blade viewed from the front.

But is there a simple way to manipulate an image that can show the image rotated to an arbitrary angle? Selectable by GUI control

Edit: Answer found GDI+ standard library 1.28 by tic Arrow http://www.autohotkey.com/forum/viewtopic.php?t=32238

I am not looking for answers that use Gimp, Paint, Photoshop, etc.

Below is my working code that I'd like to modify. Caution: UrlDownloadToFile
Any suggestions? Any questions?

As always, thanks in advance.
Leef_me
Code:
#singleinstance force

IfNotExist, AutoHotkey_logo.gif   ; start with a know image, the picture on http://www.autohotkey.com
{
  UrlDownloadToFile,   http://www.autohotkey.com/docs/images/AutoHotkey_logo.gif, AutoHotkey_logo.gif
}

;msgbox %ErrorLevel%

win_width=400
win_height=300

pic_width=228
pic_height=133

borderx:= (win_width - pic_width)/2
bordery:= (win_height - pic_height)/2

;msgbox  %win_width%  %win_height% `n%pic_width%  %pic_height%  `n%borderx% %bordery%

Gui, Add, Picture,  xm+%borderx% ym+%bordery% w%pic_width% h%pic_height%, AutoHotkey_logo.gif

Gui, Color, 0X000000
Gui, Show, w%win_width% h%win_height%
return

GuiClose:  ; Indicate that the script should exit automatically when the window is closed.
GuiEscape:

ExitApp




Last edited by Leef_me on Thu Aug 27, 2009 2:23 am; edited 1 time in total
Back to top
View user's profile Send private message
Guest






PostPosted: Wed Aug 19, 2009 11:00 pm    Post subject: Reply with quote

enable swf inside ur ahk program
or
use multi-images to produce the effect
Back to top
engunneer



Joined: 30 Aug 2005
Posts: 7698
Location: Germany (but I only speak English)

PostPosted: Thu Aug 20, 2009 6:53 am    Post subject: Reply with quote

you have to use an external tool to do the rotation, like Imagemagick or maybe nona. GDI and GDI+ can only rotate in increments of 90°
_________________
Unless noted, all code is UNTESTED.
Answers Here: 1.(Loops, Viruses, etc.) 2.Search 3.RTFM 4.Ask for Help.
PMs will be ignored unless you are hiring me.
Back to top
View user's profile Send private message Visit poster's website
tic



Joined: 22 Apr 2007
Posts: 1424

PostPosted: Tue Sep 15, 2009 12:16 pm    Post subject: Reply with quote

I care to disagree:

Gdip example 10
Back to top
View user's profile Send private message
engunneer



Joined: 30 Aug 2005
Posts: 7698
Location: Germany (but I only speak English)

PostPosted: Tue Sep 15, 2009 12:34 pm    Post subject: Reply with quote

I'm happy to be corrected Smile

I'm also happy to learn something new every day.
_________________
Unless noted, all code is UNTESTED.
Answers Here: 1.(Loops, Viruses, etc.) 2.Search 3.RTFM 4.Ask for Help.
PMs will be ignored unless you are hiring me.
Back to top
View user's profile Send private message Visit poster's website
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