Пример #1
0
 def get_at(self, pos):
     """
     Return color of a surface pixel.
     The pos argument represents x,y position of pixel.
     """
     x,y = pos       #*tuple unpack error in jython applet
     try:
         color = Color(self.getRGB(x,y))
     except:     #ArrayOutOfBoundsException
         raise IndexError
     return color.getRed(), color.getGreen(), color.getBlue(), color.getAlpha()  #0.23
Пример #2
0
 def get_at(self, pos):
     """
     Return color of a surface pixel.
     The pos argument represents x,y position of pixel.
     """
     x, y = pos  #*tuple unpack error in jython applet
     try:
         color = Color(self.getRGB(x, y))
     except:  #ArrayOutOfBoundsException
         raise IndexError
     return color.getRed(), color.getGreen(), color.getBlue(
     ), color.getAlpha()  #0.23