Package net.hearthstats.util

Examples of net.hearthstats.util.Coordinate.x()


      return false;
    }

    for (Pixel pixel : screen.primary) {
      Coordinate coordinate = pixelMap.get(pixel.pixelLocation);
      int x = coordinate.x();
      int y = coordinate.y();

      int rgb = image.getRGB(x, y);
      int red = (rgb >> 16) & 0xFF;
      int green = (rgb >> 8) & 0xFF;
View Full Code Here


    // Boost the unmatched count on the Starting Hand screen because it doesn't have sufficient pixels for a reliable partial match
    int unmatchedCount = screen == Screen.MATCH_STARTINGHAND ? 1 : 0;

    for (Pixel pixel : screen.primaryAndSecondary) {
      Coordinate coordinate = pixelMap.get(pixel.pixelLocation);
      int x = coordinate.x();
      int y = coordinate.y();

      int rgb = image.getRGB(x, y);
      int red = (rgb >> 16) & 0xFF;
      int green = (rgb >> 8) & 0xFF;
View Full Code Here

      return false;
    }

    for (Pixel pixel : screen.secondary) {
      Coordinate coordinate = pixelMap.get(pixel.pixelLocation);
      int x = coordinate.x();
      int y = coordinate.y();

      int rgb = image.getRGB(x, y);
      int red = (rgb >> 16) & 0xFF;
      int green = (rgb >> 8) & 0xFF;
View Full Code Here

      UniquePixelIdentifier upi = new UniquePixelIdentifier(uniquePixel.x(), uniquePixel.y(),
          image.getWidth(), image.getHeight());

      Coordinate coordinate = getCachedCoordinate(upi);

      int x = coordinate.x();
      int y = coordinate.y();

      int rgb = image.getRGB(x, y);
      int red = (rgb >> 16) & 0xFF;
      int green = (rgb >> 8) & 0xFF;
View Full Code Here

      UniquePixelIdentifier upi = new UniquePixelIdentifier(uniquePixel.x(), uniquePixel.y(),
          image.getWidth(), image.getHeight());

      Coordinate coordinate = getCachedCoordinate(upi);

      int x = coordinate.x();
      int y = coordinate.y();

      int rgb = image.getRGB(x, y);
      int red = (rgb >> 16) & 0xFF;
      int green = (rgb >> 8) & 0xFF;
View Full Code Here

        boundingBoxBottomRight.y(), image.getWidth(), image.getHeight());

    Coordinate coordinateTopLeft = getCachedCoordinate(upiTopLeft);
    Coordinate coordinateBottomRight = getCachedCoordinate(upiBottomRight);

    float xStepSize = (float) (coordinateBottomRight.x() - coordinateTopLeft.x())
        / (float) (xSamples - 1);
    float yStepSize = (float) (coordinateBottomRight.y() - coordinateTopLeft.y())
        / (float) (ySamples - 1);

    debugLog.debug("relative pixel bounding box: topLeft={},{} bottomRight={},{} stepSize={},{}",
View Full Code Here

        / (float) (xSamples - 1);
    float yStepSize = (float) (coordinateBottomRight.y() - coordinateTopLeft.y())
        / (float) (ySamples - 1);

    debugLog.debug("relative pixel bounding box: topLeft={},{} bottomRight={},{} stepSize={},{}",
        coordinateTopLeft.x(), coordinateTopLeft.y(), coordinateBottomRight.x(),
        coordinateBottomRight.y(), xStepSize, yStepSize);

    for (int yCount = 0; yCount < ySamples; yCount++) {
      int y = coordinateTopLeft.y() + (int) (yCount * xStepSize);
      for (int xCount = 0; xCount < xSamples; xCount++) {
View Full Code Here

                            output.write("matchone");
                        }
                        output.write("\">");
                        if (coordinate != null) {
                            output.write("<div>Reference Pixel = ");
              output.write(String.valueOf(coordinate.x()));
                            output.write(", ");
              output.write(String.valueOf(coordinate.y()));
                            output.write("</div>");

                            int victory1Matches = relativePixelAnalyser.countMatchingRelativePixels(bufferedImage, coordinate, new UniquePixel[] {
View Full Code Here

                "window.addEventListener(\"DOMContentLoaded\", function()\n" +
                "{\n");
        for (int i = 0; i < coordinates.size(); i++) {
            Coordinate coordinate = coordinates.get(i);
            if (coordinate != null) {
        output.write("drawPixel(\"" + i + "\", " + coordinate.x()
            + ", " + coordinate.y() + ");\n");
            }
        }
        output.write("});\n" +
                "</script>");
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.