sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #02373
Re: [Question #153685]: targetOffset method is not properly setting the targetOffset in the java api.
Question #153685 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/153685
Status: Open => Answered
RaiMan proposed the following answer:
You are right, but this is a bug. I will report it.
(giving similar() seems to reset targetOffset to (0,0))
So currently only p3 works as expected, p4 is buggy.
[code]
Pattern p = new Pattern("image.png");
Pattern p1 = p.similar((float) 0.99);
Pattern p2 = p.targetOffset(10,0);
Pattern p3 = p.similar((float) 0.99).targetOffset(10,0);
Pattern p4 = p.targetOffset(10,0).similar((float) 0.99);
System.out.println(p);
System.out.println(p1);
System.out.println(p2);
System.out.println(p3);
System.out.println(p4);
[result]
Pattern("image.png").similar(0.7)
Pattern("image.png").similar(0.99)
Pattern("image.png").similar(0.7).targetOffset(10,0)
Pattern("image.png").similar(0.99).targetOffset(10,0)
Pattern("image.png").similar(0.99)
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.