i wondering how determine if java.awt.rectangle contains pixel specific java.awt.color. i've been searching on cannot find information on or if it's possible.
so wondering how determine if rectangle contains a pixel specific color or if specific colored pixel inside defined rectangle.
example: left image black rectangle. lets have defined java.awt.color red. want determine if rectangle contains pixel color.
if need find out if pixel on graphics painted in color, can discover if graphics created on bufferedimage. run same code draws on screen, call component's paint(graphics) method, passing result of bufferedimage.creategraphics() call. once painting done, check pixel values in range need calling bufferedimage.getrgb(x, y).
Comments
Post a Comment