X-1.0rc2 Pattern.similar resets targetOffset to (0,0) --- workaround

Bug #768971 reported by RaiMan on 2011-04-22
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Sikuli
Undecided
Unassigned

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)

Related branches

RaiMan (raimund-hocke) on 2011-04-22
description: updated
Changed in sikuli:
milestone: none → x1.0-rc3
Changed in sikuli:
status: New → Fix Committed
RaiMan (raimund-hocke) on 2011-09-27
Changed in sikuli:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers