sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #02532
[Bug 768971] Re: X-1.0rc2 Pattern.similar resets targetOffset to (0, 0) --- workaround
** Changed in: sikuli
Milestone: None => x1.0-rc3
--
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/768971
Title:
X-1.0rc2 Pattern.similar resets targetOffset to (0,0) --- workaround
Status in Sikuli:
New
Bug description:
********* workaround
only Pattern p = some-other-pattern.similar().targetOffset() works
so only if Pattern.targetOffset() is the last action in a given
Pattern, targetOffset is remembered.
----------------------------------------------------------------------------------------------------------------------------------
case p4 is the buggy situation (true for the Java level too)
try this:
p = Pattern("image.png");
p1 = p.similar(0.99);
p2 = p.targetOffset(10,0);
p3 = p.similar(0.99).targetOffset(10,0);
p4 = p.targetOffset(10,0).similar(0.99);
print p
print p1
print p2
print p3
print 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)
References