andyhill Posted October 21, 2021 Share Posted October 21, 2021 UniCanvas object "cMain" I am having a blank moment, what normally is an easy thing is evading me today 😞 moveTo null ??? Getting old is tough, can someone please advise - thanks ////////////////////////////////////////////////////////////////////////////// if EventName = '_MouseUp_' then begin CanvasUpClk.X:= StrToInt(Params.Values['x']); // TODO Cater For Scale CanvasUpClk.Y:= StrToInt(Params.Values['y']); // TODO Cater For Scale // UniSession.AddJS('var context=fMain.cMain._cc_; '+ '{ '+ ' context.moveTo('+IntToStr(Round(CanvasUpClk.X))+', '+IntToStr(Round(CanvasUpClk.Y))+'); '+ ' context.arc('+IntToStr(Round(CanvasUpClk.X))+', '+IntToStr(Round(CanvasUpClk.Y))+', 2, 0, 2 * Math.PI); '+ ' context.stroke(); '+ '}; '); end; Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 21, 2021 Share Posted October 21, 2021 53 minutes ago, andyhill said: UniSession.AddJS('var context=fMain.cMain._cc_; '+ '{ '+ ' context.moveTo('+IntToStr(Round(CanvasUpClk.X))+', '+IntToStr(Round(CanvasUpClk.Y))+'); '+ ' context.arc('+IntToStr(Round(CanvasUpClk.X))+', '+IntToStr(Round(CanvasUpClk.Y))+', 2, 0, 2 * Math.PI); '+ ' context.stroke(); '+ '}; '); Hello, Try this method at the beginning: context.beginPath(); context.moveTo... Quote Link to comment Share on other sites More sharing options...
andyhill Posted October 21, 2021 Author Share Posted October 21, 2021 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 21, 2021 Share Posted October 21, 2021 3 minutes ago, andyhill said: Could you please make a simple testcase to check!? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.