andygo Posted May 8, 2010 Share Posted May 8, 2010 Hello,i have a gui with a small picture-control and some other buttons.please have a look:how can i tell the _GDIPlus_GraphicsDrawLine function to draw just on thepicture area, NOT over it, NOT over my other buttons?thanks, andyp.s.: maybe a dumb question but it's my first time with _GDIPlus_GraphicsDrawLine Link to comment Share on other sites More sharing options...
Zedna Posted May 9, 2010 Share Posted May 9, 2010 (edited) Post your code. I think some kind of clipping (clipping API functions) could be used here. In case of drawing by hand it can be done by simpler way: just test mouse position relative to image position/size Edited May 9, 2010 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
andygo Posted May 10, 2010 Author Share Posted May 10, 2010 Post your code. I think some kind of clipping (clipping API functions) could be used here. In case of drawing by hand it can be done by simpler way: just test mouse position relative to image position/size hello, this is the mainpart of drawing-code: while _IsPressed(01) $aOldPos = MouseGetPos() sleep(50) $aPos = MouseGetPos() _GDIPlus_GraphicsDrawLine($hGraphic, $aOldPos[0], $aOldPos[1], $aPos[0], $aPos[1], $hPen) wend Link to comment Share on other sites More sharing options...
andygo Posted May 10, 2010 Author Share Posted May 10, 2010 edit: ok i created a little tricky solution: before the while-loop i create a dummy-button. it's dimensions are big enough to overlay all previous buttons. if i now draw outside the picturecontrol, i only draw on the dummy-button. after the while-loop i delete this dummy-button. and tadaaa: i have clean main buttons. 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