← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #184255]: How to draw a circle or some shape using sikuli?

 

Question #184255 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/184255

dinev posted a new comment:
Just for fun I done the circle thing :-) 
Here it is(add this function to the above test):

----------------------------------------------------------
def drawCircle():
    mLoc=Env.getMouseLocation().offset(250,250)
    radius=100
    for i in range(37):
        degInRad = i*math.pi/18
        pointX=int(math.cos(degInRad)*radius)
        pointY=int(math.sin(degInRad)*radius)       
        mouseMove(mLoc.offset(pointX,pointY))
        if i==0: mouseDown(Button.LEFT)
    mouseUp()

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.