pygame :: PixelArray :: Class PixelArray
[hide private]
[frames] | no frames]

Class PixelArray

source code

object --+
         |
        PixelArray

pygame.PixelArray(Surface): return PixelArray pygame object for direct pixel access of surfaces

Instance Methods [hide private]
 
__contains__(x, y)
y in x
source code
 
__delitem__(x, y)
del x[y]
source code
 
__delslice__(x, i, j)
del x[i:j]
source code
 
__getitem__(x, y)
x[y]
source code
 
__getslice__(x, i, j)
x[i:j]
source code
 
__iter__(x)
iter(x)
source code
 
__len__(x)
len(x)
source code
a new object with type S, a subtype of T
__new__(T, S, ...) source code
 
__repr__(x)
repr(x)
source code
 
__setitem__(x, i, y)
x[i]=y
source code
 
__setslice__(x, i, j, y)
x[i:j]=y
source code
 
compare(...)
PixelArray.compare (array, distance=0, weights=(0.299, 0.587, 0.114)): Return PixelArray Compares the PixelArray with another one.
source code
 
extract(...)
PixelArray.extract (color, distance=0, weights=(0.299, 0.587, 0.114)): Return PixelArray Extracts the passed color from the PixelArray.
source code
 
make_surface(...)
PixelArray.make_surface (): Return Surface Creates a new Surface from the current PixelArray.
source code
 
replace(...)
PixelArray.replace (color, repcolor, distance=0, weights=(0.299, 0.587, 0.114)): Return None Replaces the passed color in the PixelArray with another one.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]
  surface
PixelArray.surface: Return Surface Gets the Surface the PixelArray uses.

Inherited from object: __class__

Method Details [hide private]

__delslice__(x, i, j)
(Slice deletion operator)

source code 

del x[i:j]

Use of negative indices is not supported.

__getslice__(x, i, j)
(Slicling operator)

source code 

x[i:j]

Use of negative indices is not supported.

__new__(T, S, ...)

source code 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

__repr__(x)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__

__setslice__(x, i, j, y)
(Slice assignment operator)

source code 

x[i:j]=y

Use of negative indices is not supported.