sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #02380
[Bug 768971] [NEW] X-1.0rc2 Pattern.similar resets targetOffset to (0, 0) --- workaround
Public bug reported:
********* 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)
** Affects: sikuli
Importance: Undecided
Status: New
** Description changed:
+ ********* 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)
+ 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 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)
Follow ups
-
[Bug 768971] Re: X-1.0rc2 Pattern.similar resets targetOffset to (0, 0) --- workaround
From: RaiMan, 2011-09-27
-
[Bug 768971] Re: X-1.0rc2 Pattern.similar resets targetOffset to (0, 0) --- workaround
From: Tsung-Hsiang Chang, 2011-05-05
-
[Bug 768971] Re: X-1.0rc2 Pattern.similar resets targetOffset to (0, 0) --- workaround
From: Launchpad Bug Tracker, 2011-05-05
-
[Bug 768971] Re: X-1.0rc2 Pattern.similar resets targetOffset to (0, 0) --- workaround
From: Tsung-Hsiang Chang, 2011-05-05
-
[Bug 768971] [NEW] X-1.0rc2 Pattern.similar resets targetOffset to (0, 0) --- workaround
From: RaiMan, 2011-04-22
References