Search:

Type: Posts; User: KevinWorkman

Search: Search took 0.17 seconds.

  1. Thread: Get Pixel

    by KevinWorkman
    Replies
    7
    Views
    2,729

    Re: Get Pixel

    Yep, that's another reason not to use the pixel value.

    You could try painting the game window to an image first, then using the image to get the pixel value, but I would predict that simply doing...
  2. Thread: Get Pixel

    by KevinWorkman
    Replies
    7
    Views
    2,729

    Re: Get Pixel

    If what you're testing for collisions is indeed only one pixel, then I suppose that's fine. But for most games, you're going to be checking the collision of quite a few pixels- or of paths, or walls,...
  3. Thread: Get Pixel

    by KevinWorkman
    Replies
    7
    Views
    2,729

    Re: Get Pixel

    Well if you're trying to do collision testing, you almost definitely don't want to be testing for collisions in your paint method.

    But if you know where the objects are to be painted, then you...
  4. Thread: Get Pixel

    by KevinWorkman
    Replies
    7
    Views
    2,729

    Re: Get Pixel

    Where were you told that? Graphics doesn't have a getRGB() method, so that doesn't make much sense.

    You might be looking for the getPixelColor() in the Robot class. The API is your friend.

    But...
Results 1 to 4 of 4