Package org.sikuli.api

Examples of org.sikuli.api.ColorImageTarget


    canvas.clear().addBox(personIcon).display(1);
   
    ScreenRegion statusIcon = Relative.to(personIcon).right(30).getScreenRegion();
    canvas.clear().addBox(personIcon).display(1);   

    statusIcon.addState(new ColorImageTarget(Images.GreenBullet), "GREEN");
    statusIcon.addState(new ColorImageTarget(Images.RedBullet), "RED");
    statusIcon.addState(new ColorImageTarget(Images.SilverBullet), "SILVER");
    statusIcon.addStateChangeEventListener(l);

  }
View Full Code Here


        canvas.display(1);
      }         
    };


    left.addState(new ColorImageTarget(Images.HollowGreenStar), "GREEN");
    left.addState(new ColorImageTarget(Images.HollowRedStar), "RED");
    left.addState(new ColorImageTarget(Images.HollowBlueStar), "BLUE");
    left.addStateChangeEventListener(l);

    right.addState(new ColorImageTarget(Images.HollowGreenStar), "GREEN");
    right.addState(new ColorImageTarget(Images.HollowRedStar), "RED");
    right.addState(new ColorImageTarget(Images.HollowBlueStar), "BLUE");
    right.addStateChangeEventListener(l);

  }
View Full Code Here

    final DesktopScreenRegion s = new DesktopScreenRegion(b.x, b.y, b.width, b.height);


    // Finding color stars

    Target blueTarget = new ColorImageTarget(Images.BlueStar);
    Target redTarget = new ColorImageTarget(Images.RedStar);
    Target greenTarget = new ColorImageTarget(Images.GreenStar);

    List<ScreenRegion> blueTargetRegions = s.findAll(blueTarget);
    List<ScreenRegion> greenTargetRegions = s.findAll(greenTarget);
    List<ScreenRegion> redTargetRegions = s.findAll(redTarget);
   
    for (ScreenRegion r : blueTargetRegions){
      canvas.addBox(r);
      canvas.addLabel(r, "blue");     
    }

    for (ScreenRegion r : redTargetRegions){
      canvas.addBox(r);
      canvas.addLabel(r, "red");     
    }

    for (ScreenRegion r : greenTargetRegions){
      canvas.addBox(r);
      canvas.addLabel(r, "green");     
    }
    canvas.display(3);
   
    simulator.resume();
   
    canvas.clear();
   
    // Finding color bullets
    ScreenRegion greenBullet = s.wait(new ColorImageTarget(Images.GreenBullet),10000);
    ScreenRegion redBullet = s.find(new ColorImageTarget(Images.RedBullet));
    ScreenRegion silverBullet = s.find(new ColorImageTarget(Images.SilverBullet));
   
    canvas.addBox(greenBullet);   
    canvas.addLabel(Relative.to(greenBullet).topLeft().above(20).getScreenLocation(), "green");
   
    canvas.addBox(redBullet);
View Full Code Here

TOP

Related Classes of org.sikuli.api.ColorImageTarget

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.