← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #236006]: getRegionFromPSRM()

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
--- screen.getRegionFromPSRM()

Since I never understood the value behind this method, I set it to
private and renamed it to

Are you able to tell me, what it is worth for?

This is the source code:
  private <PSRM> Region getRegionFromTarget(PSRM target) throws FindFailed {
    if (target instanceof Pattern || target instanceof String) {
      Match m = find(target);
      if (m != null) {
        return m;
      }
      return null;
    }
    if (target instanceof Region) {
      return (Region) target;
    }
    return null;
  }

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