Package org.sikuli.api.visual

Examples of org.sikuli.api.visual.Canvas.addLabel()


      ScreenRegion innerRegion = Relative.to(screenRegion).shorter(100).narrower(100).getScreenRegion();

      // create a canvas to draw visualization on the screen
      Canvas c = new ScreenRegionCanvas(screenRegion);
      c.addBox(innerRegion);
      c.addLabel(innerRegion.getCenter(), "Screen " + screenId).withFontSize(30);
      c.addImage(Relative.to(innerRegion).center().above(200).getScreenLocation(), ImageIO.read(Images.Dog));
      c.show();
     
      // hover the mouse cursor to each corner of the inner circle
      mouse.hover(Relative.to(innerRegion).topLeft().getScreenLocation());
View Full Code Here


    // to the region occupied by this target
    ScreenRegion r = s.wait(imageTarget,5000);
       
    // Display "Hello World" next to the found target for 3 seconds
    Canvas canvas = new DesktopCanvas();
    canvas.addLabel(r, "Hello World").display(3);
   
    // Click the center of the found target
    Mouse mouse = new DesktopMouse();
    mouse.click(r.getCenter());
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.