Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

XFcGLSurfaceToolkit Class Reference

Surface toolkit. Contains various static functions for manipulating surfaces. More...

List of all members.

Static Public Member Functions

XFCIMPORT XFcGLSurfaceresampleSurface (XFcGLSurface *aSurface, REAL aXScale, REAL aYScale)
 Resamples a surface to new size, takes scale for x and y as parameters.

XFCIMPORT XFcGLSurfaceresampleSurface (XFcGLSurface *aSurface, INT32 aWidth, INT32 aHeight)
 Resamples a surface to new size, takes width and height as parameters.

XFCIMPORT XFcGLSurfaceskewSurface (XFcGLSurface *aSurface, REAL aXSkew, REAL aYSkew)
 Skews a surface in horizontal and/or vertical direction.

XFCIMPORT XFcGLSurfacerotateSurface (XFcGLSurface *aSurface, REAL aRotation)
 Rotates a surface by an angle.

XFCIMPORT XFcGLSurfacetransformSurface (XFcGLSurface *aSurface, XFcMatrix3 &aTransform, XFcVector2 &aTranslationResult)
 Transforms a surface with an affine transformation matrix.

XFCIMPORT void ditherSurface (XFcGLSurface *aSurface, UINT32 aRanges, INT32 aDitherMode)
 Dithers a surface.


Detailed Description

Surface toolkit. Contains various static functions for manipulating surfaces.


Member Function Documentation

XFCIMPORT void XFcGLSurfaceToolkit::ditherSurface XFcGLSurface   aSurface,
UINT32    aRanges,
INT32    aDitherMode
[static]
 

Dithers a surface.

The surface will be dithered using method defined by aDitherMode. Valid modes are XFC_DITHER_NONE, XFC_DITHER_RANDOM, XFC_DITHER_ORDERED and XFC_DITHER_DIFFUSION. The aRanges variable defines a color in 32-bit ARGB format, where each color component defines a range of values to which the component will be posterized. For instance value 0x010f0f0f will convert the alpha to 1-bit value and each color component to a 4-bit value.

Parameters:
aSurface the surface to dither.
aRanges a colour value in 32-bit ARBG format that defines the colour ranges.
aDitherMode the dithering method to use.

XFCIMPORT XFcGLSurface* XFcGLSurfaceToolkit::resampleSurface XFcGLSurface   aSurface,
INT32    aWidth,
INT32    aHeight
[static]
 

Resamples a surface to new size, takes width and height as parameters.

Parameters:
aSurface the surface to resample.
aWidth the new width.
aHeight the new height.

XFCIMPORT XFcGLSurface* XFcGLSurfaceToolkit::resampleSurface XFcGLSurface   aSurface,
REAL    aXScale,
REAL    aYScale
[static]
 

Resamples a surface to new size, takes scale for x and y as parameters.

Parameters:
aSurface the surface to resample.
aXScale the amount of scale in horizontal direction.
aYScale the amount of scale in vertical direction.

XFCIMPORT XFcGLSurface* XFcGLSurfaceToolkit::rotateSurface XFcGLSurface   aSurface,
REAL    aRotation
[static]
 

Rotates a surface by an angle.

Parameters:
aSurface the surface to rotate.
aAngle the amount of rotation in radians in clockwise direction.

XFCIMPORT XFcGLSurface* XFcGLSurfaceToolkit::skewSurface XFcGLSurface   aSurface,
REAL    aXSkew,
REAL    aYSkew
[static]
 

Skews a surface in horizontal and/or vertical direction.

The amount of skew in horizontal and vertical direction is defined as a difference between two rows or columns of pixels. To calculate this value from a skewing angle, use XFcMath::tan(angle). The method performs first the horizontal skew, then the vertical skew.

Parameters:
aSurface the surface to skew.
aXSkew the amount of skew in horizontal direction.
aYSkew the amount of skew in vertical direction.

XFCIMPORT XFcGLSurface* XFcGLSurfaceToolkit::transformSurface XFcGLSurface   aSurface,
XFcMatrix3   aTransform,
XFcVector2   aTranslationResult
[static]
 

Transforms a surface with an affine transformation matrix.

The transformation is performed so that the size of the translated image is defined by the new extents that result from the translation. In addition, a 2D vector aTranslationResult is assigned a value that defines the translation in whole pixels. The transformation matrix aTransformation should be an affine matrix. /param aSurface the surface to transform. /param aMatrix the transformation matrix. /param aTranslationResult the integer part of the translation result.


   
X-Forge Documentation
Confidential
Copyright © 2002-2003 Fathammer
   
Documentation generated
with doxygen
by Dimitri van Heesch