andygo 1 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 Share this post Link to post Share on other sites
Zedna 279 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 Share this post Link to post Share on other sites
andygo 1 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 Share this post Link to post Share on other sites
andygo 1 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. Share this post Link to post Share on other sites