IScreenFX. More...
IScreenFX.
Screen FX interface system.
Public Member Functions | |
| int | Blur (SDL_Surface *surface, int blur_pct) |
| Add blur to given surface. | |
| int | FadeToColor (unsigned char r, unsigned char g, unsigned char b, unsigned int ms, SDL_Rect *rdst=NULL) |
| Fade current CRM32Pro.screen surface to given color using alpha channel in the given time. | |
| int | FadeToImage (SDL_Surface *surface, unsigned int ms, SDL_Rect *rdst=NULL, SDL_Rect *rsrc=NULL) |
| Fade to given surface from CRM32Pro.screen surface using alpha channel in the given time. | |
| SDL_Surface * | Flip (SDL_Surface *src, SDL_Rect *src_rect=NULL, SDL_Surface *dst=NULL, SDL_Rect *dst_rect=NULL) |
| Surface flip. | |
| int | GammaCorrect (SDL_Surface *surface, int r, int g, int b) |
| Set gamma to given surface using RGB. | |
| SDL_Surface * | Mirror (SDL_Surface *src, SDL_Rect *src_rect=NULL, SDL_Surface *dst=NULL, SDL_Rect *dst_rect=NULL) |
| Surface mirror. | |
| int | Noise (SDL_Surface *surface, int noise_pct) |
| Add noise to given surface. | |
| SDL_Surface * | Resize (SDL_Surface *src, SDL_Rect *src_rect, int smooth, int sx, int sy, SDL_Surface *dst=NULL, SDL_Rect *dst_rect=NULL) |
| Resize a surface. | |
| SDL_Surface * | Resize (SDL_Surface *src, SDL_Rect *src_rect, int smooth, double fx, double fy, SDL_Surface *dst=NULL, SDL_Rect *dst_rect=NULL) |
| Resize a surface. | |
| SDL_Surface * | Rotate (SDL_Surface *src, SDL_Rect *src_rect, int smooth, double angle, SDL_Surface *dst=NULL, SDL_Rect *dst_rect=NULL) |
| Rotate a surface. | |
| SDL_Surface * | RotateResize (SDL_Surface *src, SDL_Rect *src_rect, int smooth, double angle, double zoom, SDL_Surface *dst=NULL, SDL_Rect *dst_rect=NULL) |
| Rotate and resize a surface. | |
| int CRM32Pro_IScreenFX::Blur | ( | SDL_Surface * | surface, | |
| int | blur_pct | |||
| ) |
Add blur to given surface.
Not supported on OpenGL modes.
| surface | surface to apply blur effect | |
| blur_pct | value of noise to add (0-100) |
| int CRM32Pro_IScreenFX::FadeToColor | ( | unsigned char | r, | |
| unsigned char | g, | |||
| unsigned char | b, | |||
| unsigned int | ms, | |||
| SDL_Rect * | rdst = NULL | |||
| ) |
Fade current CRM32Pro.screen surface to given color using alpha channel in the given time.
| r | red component(0-255) of the desired color to fade. | |
| g | green component(0-255) of the desired color to fade. | |
| b | blue component(0-255) of the desired color to fade. | |
| ms | duration in milliseconds to perform the fade. | |
| rdst | optional pointer to SDL_Rect with the area of CRM32Pro.screen where to perform the fade.By default, the whole surface. |
| int CRM32Pro_IScreenFX::FadeToImage | ( | SDL_Surface * | surface, | |
| unsigned int | ms, | |||
| SDL_Rect * | rdst = NULL, |
|||
| SDL_Rect * | rsrc = NULL | |||
| ) |
Fade to given surface from CRM32Pro.screen surface using alpha channel in the given time.
| surface | surface to blend with screen. You can not use CRM32Pro.screen in this parameter. This surface can not have alpha per-pixel. | |
| ms | duration in milliseconds to perform the fade. | |
| rdst | optional pointer to SDL_Rect with the area of CRM32Pro.screen where to perform the fade.By default, the whole surface. | |
| rsrc | optional pointer to SDL_Rect with the area of given surface to be used to perform the fade.By default, the whole surface. |
| SDL_Surface * CRM32Pro_IScreenFX::Flip | ( | SDL_Surface * | src, | |
| SDL_Rect * | src_rect = NULL, |
|||
| SDL_Surface * | dst = NULL, |
|||
| SDL_Rect * | dst_rect = NULL | |||
| ) |
Surface flip.
All color depth are very fast.
If dst is used, it has to match the color depth of src surface. Otherwise, it will not render anything.
With OpenGL modes it never uses dst surface, it always blits the flipped surface using dst_rect to CRM32Pro.screen.
| src | source surface | |
| src_rect | Rect to flip on the source surface. NULL to flip the whole surface. | |
| dst | Destination surface used to render the result on it without create a new surface. By default is NULL to create a new surface, however with OpenGL modes, itīs useless as always blits to CRM32Pro.screen. | |
| dst_rect | Rect on the destination surface(only x and y are used) to render the result. Only has sense used together with dst or OpenGL modes. |
| int CRM32Pro_IScreenFX::GammaCorrect | ( | SDL_Surface * | surface, | |
| int | r, | |||
| int | g, | |||
| int | b | |||
| ) |
Set gamma to given surface using RGB.
Not supported on OpenGL modes.
| surface | surface to apply gamma filter | |
| r | red component | |
| g | green component | |
| b | blue component |
| SDL_Surface * CRM32Pro_IScreenFX::Mirror | ( | SDL_Surface * | src, | |
| SDL_Rect * | src_rect = NULL, |
|||
| SDL_Surface * | dst = NULL, |
|||
| SDL_Rect * | dst_rect = NULL | |||
| ) |
Surface mirror.
All color depth are fast.
If dst is used, it has to match the color depth of src surface. Otherwise, it will not render anything.
With OpenGL modes it never uses dst surface, it always blits the mirrored surface using dst_rect to CRM32Pro.screen.
| src | source surface | |
| src_rect | Rect to mirror on the source surface. NULL to mirror the whole surface. | |
| dst | Destination surface used to render the result on it without create a new surface. By default is NULL to create a new surface, however with OpenGL modes, itīs useless as always blits to CRM32Pro.screen. | |
| dst_rect | Rect on the destination surface(only x and y are used) to render the result. Only has sense used together with dst or OpenGL modes. |
| int CRM32Pro_IScreenFX::Noise | ( | SDL_Surface * | surface, | |
| int | noise_pct | |||
| ) |
Add noise to given surface.
Not supported on OpenGL modes
| surface | surface to apply noise effect | |
| noise_pct | value of noise to add (0-100) |
| SDL_Surface * CRM32Pro_IScreenFX::Resize | ( | SDL_Surface * | src, | |
| SDL_Rect * | src_rect, | |||
| int | smooth, | |||
| int | sx, | |||
| int | sy, | |||
| SDL_Surface * | dst = NULL, |
|||
| SDL_Rect * | dst_rect = NULL | |||
| ) |
Resize a surface.
8bits and 32bits surfaces are very fast. 16bits surfaces are fast and 24bits are slower.
If dst is used, it has to match the color depth of src surface. Otherwise, it will not render anything.
With OpenGL modes it never uses dst surface, it always blits the resized surface using dst_rect to CRM32Pro.screen.
| src | source surface | |
| src_rect | Resize rect in the source surface. NULL to resize the whole surface. | |
| smooth | 0 to do nothing. 1 to perform anti-aliasing filter(best quality and slower). It has no sense on 8bits surfaces. | |
| sx | Desired width in pixels for the resized surface. Negative value to flip this axis(does not work with smooth filter). | |
| sy | Desired height in pixels for the resized surface. Negative value to flip this axis(does not work with smooth filter). | |
| dst | Destination surface used to render the result on it without create a new surface. By default is NULL to create a new surface, however with OpenGL modes, itīs useless as always blits to CRM32Pro.screen. | |
| dst_rect | Rect on the destination surface(only x and y are used) to render the result. Only has sense used together with dst or OpenGL modes. |
| SDL_Surface * CRM32Pro_IScreenFX::Resize | ( | SDL_Surface * | src, | |
| SDL_Rect * | src_rect, | |||
| int | smooth, | |||
| double | fx, | |||
| double | fy, | |||
| SDL_Surface * | dst = NULL, |
|||
| SDL_Rect * | dst_rect = NULL | |||
| ) |
Resize a surface.
8bits and 32bits surfaces are very fast. 16bits surfaces are fast and 24bits are slower.
If dst is used, it has to match the color depth of src surface. Otherwise, it will not render anything.
With OpenGL modes it never uses dst surface, it always blits the resized surface using dst_rect to CRM32Pro.screen.
| src | source surface | |
| src_rect | Resize rect in the source surface. NULL to resize the whole surface. | |
| smooth | 0 to do nothing. 1 to perform anti-aliasing filter(best quality and slower). It has no sense on 8bits surfaces. | |
| fx | Resize factor in X axis. Example: 1.0 means to do nothing. Negative value to flip this axis(does not work with smooth filter). | |
| fy | Resize factor in Y axis. Example: 2.0 means to duplicate this coordinate. Negative value to flip this axis(does not work with smooth filter). | |
| dst | Destination surface used to render the result on it without create a new surface. By default is NULL to create a new surface, however with OpenGL modes, itīs useless as always blits to CRM32Pro.screen. | |
| dst_rect | Rect on the destination surface(only x and y are used) to render the result. Only has sense used together with dst or OpenGL modes. |
| SDL_Surface * CRM32Pro_IScreenFX::Rotate | ( | SDL_Surface * | src, | |
| SDL_Rect * | src_rect, | |||
| int | smooth, | |||
| double | angle, | |||
| SDL_Surface * | dst = NULL, |
|||
| SDL_Rect * | dst_rect = NULL | |||
| ) |
Rotate a surface.
8bits and 32bits surfaces are fast. 16bits surfaces are normal speed and 24bits are slower.
If dst is used, it has to match the color depth of src surface. Otherwise, it will not render anything.
With OpenGL modes it never uses dst surface, it always blits the resized surface using dst_rect to CRM32Pro.screen.
| src | source surface | |
| src_rect | Rect to rotate on the source surface. NULL to rotate the whole surface. | |
| smooth | 0 to do nothing. 1 to perform anti-aliasing filter(best quality and slower). It has no sense on 8bits surfaces. | |
| angle | Desired rotation on degrees | |
| dst | Destination surface used to render the result on it without create a new surface. By default is NULL to create a new surface, however with OpenGL modes, itīs useless as always blits to CRM32Pro.screen. | |
| dst_rect | Rect on the destination surface(only x and y are used) to render the result. Only has sense used together dst or OpenGL modes. |
| SDL_Surface * CRM32Pro_IScreenFX::RotateResize | ( | SDL_Surface * | src, | |
| SDL_Rect * | src_rect, | |||
| int | smooth, | |||
| double | angle, | |||
| double | zoom, | |||
| SDL_Surface * | dst = NULL, |
|||
| SDL_Rect * | dst_rect = NULL | |||
| ) |
Rotate and resize a surface.
8bits and 32bits surfaces are fast. 16bits surfaces are normal speed and 24bits are slower.
If dst is used, it has to match the color depth of src surface. Otherwise, it will not render anything.
With OpenGL modes it never uses dst surface, it always blits the resized surface using dst_rect to CRM32Pro.screen.
| src | source surface | |
| src_rect | Rect to rotate/resize on the source surface. NULL to rotate/resize the whole surface. | |
| smooth | 0 to do nothing. 1 to perform anti-aliasing filter(best quality and slower). It has no sense on 8bits surfaces. | |
| angle | Desired rotation in degrees | |
| zoom | Resize factor in X and Y axes. Examples: 1.0 means to do nothing. 2.0 means to duplicate both axes. | |
| dst | Destination surface used to render the result on it without create a new surface. By default is NULL to create a new surface, , however with OpenGL modes, itīs useless as always blits to CRM32Pro.screen. | |
| dst_rect | Rect on the destination surface(only x and y are used) to render the result. Only has sense used together dst or OpenGL modes. |
1.6.1