saywell Posted March 16, 2011 Share Posted March 16, 2011 I'm writing a simple prog to calculate the cutting lines for photographic mounts, displaying the results in a graphic. However, both teh graphic and the square drawn into it come out taller than their width when I run the script below. Is this something to do with a cheap Dell on-board graphics card, or something wrong with my script - or what? expandcollapse popup#include <GUIConstantsEx.au3> #include <StaticConstants.au3> Opt('MustDeclareVars', 1) Local $msg, $inc, $i, $close, $main, $del $main = GUICreate("Mount Calculator",500,550) $close = GUICtrlCreateButton("Close", 50, 515, 50) GUICtrlCreateGraphic(50, 105, 400, 400) ;GUICtrlSetBkColor(-1, 0xf08080) GUICtrlSetColor(-1, 0xff) GUICtrlSetColor(-1, -1) ;GUICtrlSetGraphic(-1, $GUI_GR_HINT, 1) GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0xff00) GUICtrlSetBkColor(-1, 0xfdfdfd) GUICtrlSetGraphic(-1, $GUI_GR_RECT, 00, 00, 400 , 400) GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0xf000000) GUICtrlSetGraphic(-1, $GUI_GR_RECT, 25, 25, 250, 250) GUISetState() While 1 ;Sleep(100) $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $close Exit EndSelect Regards, William Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 16, 2011 Moderators Share Posted March 16, 2011 saywell, Must be your graphics card - they are both square on my monitor. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
saywell Posted March 16, 2011 Author Share Posted March 16, 2011 (edited) Thanks - I'll try it tonight on my home PC and see how it looks there. William [edit] Update - yes, displays as a square on a 'proper' PC! Edited March 16, 2011 by saywell Link to comment Share on other sites More sharing options...
kylomas Posted March 16, 2011 Share Posted March 16, 2011 saywell, I get the same result. H=88mm W=82mm Graphics = NVIDIA GEFORCE 6150SE kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
iamtheky Posted March 16, 2011 Share Posted March 16, 2011 i can do so with resolution adjustments. in 1024x768 its a square. in 1280 x 800 they are slightly taller than wide. ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
kylomas Posted March 16, 2011 Share Posted March 16, 2011 iamtheky, So even though the doc specifies that if w=h then the result is a square, it really depends on device geometry? kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
iamtheky Posted March 16, 2011 Share Posted March 16, 2011 ...was merely pointing out what I am seeing on my box. I would imagine there is a much more fun reason that hopefully someone smart will explain very smartly. ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
Tvern Posted March 16, 2011 Share Posted March 16, 2011 I would think it creates a rectangle with heigth equal to width in pixels. How your PC displays that rectangle wouldn't have anything to do with the script, but more with the settings of your graphics adapter and monitor. To test this you could fire up MS Paint and make a rectangle while pressing shift. If it does not come out square, your display setting are wrong. First thing to check is if you are using the monitors native resolution, then you can look in the OSD of the display to see if the display settings might be distorting the image, and lastly you can check the same in your gfx adapter settings, provided it has such a setting. 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