Kickassjoe Posted November 10, 2006 Share Posted November 10, 2006 Is there any way to rotate a label to a certain degree? _guictrlrotate($labelthatiwanttorotate, clockwise, 180) That would rotate the label so that it would be upside down... Is there a function or UDF that someone has made to do this? If anyone could help me I would greatly appreciate it! What goes around comes around... Payback's a bitch. Link to comment Share on other sites More sharing options...
PaulIA Posted November 10, 2006 Share Posted November 10, 2006 Ugh. Here is what's involved: 1) Save the current font handle 2) GetObject on the current font 3) Set the lfEscapement value of the LOGFONT record return to the angle to be rotated 4) CreateFontIndirect to create the new font 5) SelectObject to select the new font 6) Write the label text 7) SelectObject to restore the original font handle 8) DeleteObject to delete the temporary font And this is just off the top of my head... Auto3Lib: A library of over 1200 functions for AutoIt Link to comment Share on other sites More sharing options...
Developers Jos Posted November 10, 2006 Developers Share Posted November 10, 2006 Ugh. Here is what's involved:1) Save the current font handle2) GetObject on the current font3) Set the lfEscapement value of the LOGFONT record return to the angle to be rotated4) CreateFontIndirect to create the new font5) SelectObject to select the new font6) Write the label text7) SelectObject to restore the original font handle8) DeleteObject to delete the temporary fontAnd this is just off the top of my head... I would just turn to whole damn screen ... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
GaryFrost Posted November 10, 2006 Share Posted November 10, 2006 I would just turn to whole damn screen ... SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Valuater Posted November 10, 2006 Share Posted November 10, 2006 (edited) really nice text effects from Peethebeehttp://www.autoitscript.com/forum/index.php?showtopic=14409#may do the job... or give some insight on text/label control8) Edited November 10, 2006 by Valuater Link to comment Share on other sites More sharing options...
Lakes Posted November 10, 2006 Share Posted November 10, 2006 Ugh. Here is what's involved:1) Save the current font handle2) GetObject on the current font3) Set the lfEscapement value of the LOGFONT record return to the angle to be rotated4) CreateFontIndirect to create the new font5) SelectObject to select the new font6) Write the label text7) SelectObject to restore the original font handle8) DeleteObject to delete the temporary fontAnd this is just off the top of my head... Blah, much to complicated...1) Create the label using the standard GuiCreate method2) Capture the Label, using one of one the graphics capture functions from the forum3) Rotate the Graphic by using the 3D rotate function from the forumSee, easy! lol 2015 - Still no flying cars, instead blankets with sleeves. Link to comment Share on other sites More sharing options...
PaulIA Posted November 10, 2006 Share Posted November 10, 2006 Blah, much to complicated...1) Create the label using the standard GuiCreate method2) Capture the Label, using one of one the graphics capture functions from the forum3) Rotate the Graphic by using the 3D rotate function from the forumSee, easy! lol Uh... no! (but you made me think there for a moment). It should be that easy, but Microsoft took care of that for us... Auto3Lib: A library of over 1200 functions for AutoIt Link to comment Share on other sites More sharing options...
Kickassjoe Posted November 11, 2006 Author Share Posted November 11, 2006 If I really wanted to... I could make labels on the background color I want... put them all in paint... rotate them, and then save them all as different pictures, and create pictures in my GUI... I don't really want to rotate the label after it is on the GUI, I want to have it rotated before It goes onto the GUI, but I guess if the function is made to rotate it after the GUI shows, that will be fine too. Thanks Valuater, for the link, I hope it will help me, just downloaded the file from peethebee's fileman! . Going to go test it ATM. What goes around comes around... Payback's a bitch. Link to comment Share on other sites More sharing options...
Lakes Posted November 11, 2006 Share Posted November 11, 2006 If you created each letter as a label, then you could position each letter as you wanted with GUICtrlSetPos This is a just a quick and dirty example... expandcollapse popup#include <GUIConstants.au3> ; == GUI generated with Koda ==); $Test = GUICreate("AForm1", 312, 138, 192, 125) GUISetFont(18, 400, 0, "MS Sans Serif") $T = GUICtrlCreateLabel("T", 16, 16, 20, 33, $WS_GROUP) GUICtrlSetFont(-1, 18, 400, 0, "MS Sans Serif") $H = GUICtrlCreateLabel("H", 40, 16, 21, 33, $WS_GROUP) GUICtrlSetFont(-1, 18, 400, 0, "MS Sans Serif") $I = GUICtrlCreateLabel("I", 64, 16, 10, 33, $WS_GROUP) GUICtrlSetFont(-1, 18, 400, 0, "MS Sans Serif") $S = GUICtrlCreateLabel("S", 72, 16, 20, 33, $WS_GROUP) GUICtrlSetFont(-1, 18, 400, 0, "MS Sans Serif") $I2 = GUICtrlCreateLabel("I", 104, 16, 10, 33, $WS_GROUP) GUICtrlSetFont(-1, 18, 400, 0, "MS Sans Serif") $S = GUICtrlCreateLabel("S", 112, 16, 20, 33, $WS_GROUP) GUICtrlSetFont(-1, 18, 400, 0, "MS Sans Serif") $T2 = GUICtrlCreateLabel("T", 136, 16, 20, 33, $WS_GROUP) GUICtrlSetFont(-1, 18, 400, 0, "MS Sans Serif") $E = GUICtrlCreateLabel("E", 160, 16, 20, 33, $WS_GROUP) GUICtrlSetFont(-1, 18, 400, 0, "MS Sans Serif") $X = GUICtrlCreateLabel("X", 184, 16, 21, 33, $WS_GROUP) GUICtrlSetFont(-1, 18, 400, 0, "MS Sans Serif") $T3 = GUICtrlCreateLabel("T", 208, 16, 20, 33, $WS_GROUP) GUICtrlSetFont(-1, 18, 400, 0, "MS Sans Serif") GUISetState(@SW_SHOW) For $Xpos = 16 to 110 GUICtrlSetPos($T2,136,$Xpos) sleep(10) Next For $Xpos = 16 to 110 GUICtrlSetPos($E,160,$Xpos) sleep(10) Next For $Xpos = 16 to 110 GUICtrlSetPos($X,184,$Xpos) sleep(10) Next For $Xpos = 16 to 110 GUICtrlSetPos($T3,208,$Xpos) sleep(10) NextThis shows the basic idea. In the actual program you would use $Stringsplit to create each letter on its own and do some simple calculations to get the correct spacings. You would then be able to position the letters however you want. 2015 - Still no flying cars, instead blankets with sleeves. Link to comment Share on other sites More sharing options...
Kickassjoe Posted November 11, 2006 Author Share Posted November 11, 2006 peethebee's functions are really great... but I don't think that is what I was looking for... I don't really NEED this... It is just for a script I am making right now to make it look better, it is not essential that I have this... and lakes... there are like 1000 letters that i would have to make labels for! What goes around comes around... Payback's a bitch. Link to comment Share on other sites More sharing options...
Lakes Posted November 11, 2006 Share Posted November 11, 2006 (edited) peethebee's functions are really great... but I don't think that is what I was looking for... I don't really NEED this... It is just for a script I am making right now to make it look better, it is not essential that I have this... and lakes... there are like 1000 letters that i would have to make labels for! Ok, a 1000 is a lot, sorry.If I were doing this I would write a script to do it for me rather than do it by hand, this was just a quick proof of concept really, and it does`nt rotate the actual letters just moves them.So that THIScould be comeTHISor anything you want. Edited November 11, 2006 by Lakes 2015 - Still no flying cars, instead blankets with sleeves. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now