CTor
CTor
Make a new Surface of the given width, height and depth.
Make an new Surface of the given memory, width, height and depth.
DTor
Postblit is allowed and increases the internal ref count
Supported BlendModes
Use this function to adapt the format of another Surface to this surface.
Use this function to adapt the format of another Surface depth to this surface.
Use this function to perform a fast blit from the source surface to the this surface. src is the a pointer to a Rect structure which represents the rectangle to be copied, or null to copy the entire surface. dst is a pointer to a Rect structure which represents the rectangle that is copied into. null means, that the whole srfc is copied to (0|0).
Use this function to perform a fast, low quality, stretch blit between two surfaces of the same pixel format. src is the a pointer to a Rect structure which represents the rectangle to be copied, or null to copy the entire surface. dst is a pointer to a Rect structure which represents the rectangle that is copied into. null means, that the whole srfc is copied to (0|0).
Fills a specific area of the surface with the given color. The second parameter is a pointer to the area. If it's null, the whole Surface is filled.
Returns the current Alpha mod.
Returns the current Blendmode.
Returns the clip rect of this surface. The clip rect is the area of the surface which is drawn.
Returns the color on the given position, or Color4b.Black if the position is out of range.
Returns the color on the given position.
Returns the current colorkey, or Color4b.Black, if the Surface is invalid
Returns the Surface color Masks
Returns the pixel at the given coordinates.
Returns the pixel at the given coordinates.
Returns whether this Surface is locked or not.
Returns if the Surface is valid. Which means that the Surface has valid data.
Load from filename. If any data is already stored, the data will be freed.
Load from memory.
Use this function to set up a surface for directly accessing the pixels.
Use this function to determine whether a surface must be locked for access.
Use this function to set the RLE acceleration hint for a surface. RLE (Run-Length-Encoding) is a way of compressing data. If RLE is enabled, color key and alpha blending blits are much faster, but the surface must be locked before directly accessing the pixels.
Put a new pixel at the given coordinates.
Save the current pixel data to the file.
Set the Alpha mod.
Set the Blendmode.
Set the clip rect.
Set the colorkey.
Returns a subsurface from this surface. rect represents the viewport. The subsurface is a separate Surface object.
Use this function to release a surface after directly accessing the pixels.
Count the bits of this surface. Could be 32, 24, 16, 8, 0.
Count the bytes of this surface. Could be 4, 3, 2, 1, 0. (countBits / 8)
Returns the height.
Returns the Surface pitch or 0.
Returns the pixel data of this surface.
Returns the current ref count / usage
Returns the width.
Surface is a wrapper for a SDL_Surface and can load and save images.