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

XFcGLSurface Class Reference

Texture/sprite surface class. More...

Inheritance diagram for XFcGLSurface:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual XFCIMPORT ~XFcGLSurface ()
 Virtual destructor.

virtual XFCIMPORT INT32 lock (void **aBuffer, INT32 aMode=XFCGF_DEFAULT, INT32 aFlags=XFCGFX_DISCARDCONTENTS)
 Locks the surface with specific mode.

virtual XFCIMPORT void unlock ()
 Unlocks the framebuffer.

XFCIMPORT INT32 getColorKey ()
 Returns the current color key.

XFCIMPORT void setColorKey (INT32 aColorKey)
 Sets the color key (in 8:8:8:8 ARGB format).

XFCIMPORT void enableColorKey (INT aFlag)
 Enables or disables color keying.

XFCIMPORT void drawImage (XFcGLSurface *aImage)
 Draws an image onto this surface to top-left corner.

XFCIMPORT void drawImage (XFcGLSurface *aImage, INT32 aX, INT32 aY)
 Draws an image onto this surface to a given position.

XFCIMPORT void drawImage (XFcGLSurface *aImage, INT32 aX, INT32 aY, INT32 aWidth)
 Draws an image, scaling to given width and keeping aspect ratio.

XFCIMPORT void drawImage (XFcGLSurface *aImage, INT32 aX, INT32 aY, INT32 aWidth, INT32 aHeight)
 Draws an image, scaling to given width and height.

XFCIMPORT void drawImage (XFcGLSurface *aImage, const XFcRectangle &aSrcRect)
 Draws an image onto this surface to top-left corner.

XFCIMPORT void drawImage (XFcGLSurface *aImage, INT32 aX, INT32 aY, const XFcRectangle &aSrcRect)
 Draws an image onto this surface to a given position.

XFCIMPORT void drawImage (XFcGLSurface *aImage, INT32 aX, INT32 aY, const XFcRectangle &aSrcRect, INT32 aWidth)
 Draws an image, scaling to given width and keeping aspect ratio.

XFCIMPORT void drawImage (XFcGLSurface *aImage, INT32 aX, INT32 aY, const XFcRectangle &aSrcRect, INT32 aWidth, INT32 aHeight)
 Draws an image, scaling to given width and height.

XFCIMPORT void drawImageBlend (XFcGLSurface *aImage, INT32 aBlendType, INT32 aBlendValue)
 Draws an image onto this surface to top-left corner, using blending.

XFCIMPORT void drawImageBlend (XFcGLSurface *aImage, INT32 aX, INT32 aY, INT32 aBlendType, INT32 aBlendValue)
 Draws an image onto this surface to a given position, using blending.

XFCIMPORT void drawImageBlend (XFcGLSurface *aImage, INT32 aX, INT32 aY, INT32 aWidth, INT32 aBlendType, INT32 aBlendValue)
 Draws an image, scaling to given width and keeping aspect ratio, using blending.

XFCIMPORT void drawImageBlend (XFcGLSurface *aImage, INT32 aX, INT32 aY, INT32 aWidth, INT32 aHeight, INT32 aBlendType, INT32 aBlendValue)
 Draws an image, scaling to given width and height, using blending.

XFCIMPORT void drawImageBlend (XFcGLSurface *aImage, const XFcRectangle &aSrcRect, INT32 aBlendType, INT32 aBlendValue)
 Draws an image onto this surface to top-left corner, using blending.

XFCIMPORT void drawImageBlend (XFcGLSurface *aImage, INT32 aX, INT32 aY, const XFcRectangle &aSrcRect, INT32 aBlendType, INT32 aBlendValue)
 Draws an image onto this surface to a given position, using blending.

XFCIMPORT void drawImageBlend (XFcGLSurface *aImage, INT32 aX, INT32 aY, const XFcRectangle &aSrcRect, INT32 aWidth, INT32 aBlendType, INT32 aBlendValue)
 Draws an image, scaling to given width and keeping aspect ratio, using blending.

XFCIMPORT void drawImageBlend (XFcGLSurface *aImage, INT32 aX, INT32 aY, const XFcRectangle &aSrcRect, INT32 aWidth, INT32 aHeight, INT32 aBlendType, INT32 aBlendValue)
 Draws an image, scaling to given width and height, using blending.

XFCIMPORT void drawImageTransform (XFcGLSurface *aImage, UINT32 aFlags)
 Draws a 2D transformed image onto this surface to a given position.

XFCIMPORT void drawImageTransform (XFcGLSurface *aImage, INT32 aX, INT32 aY, UINT32 aFlags)
 Draws a 2D transformed image onto this surface to a given position.

XFCIMPORT void drawImageTransform (XFcGLSurface *aImage, INT32 aX, INT32 aY, INT32 aWidth, UINT32 aFlags)
 Draws a 2D transformed image, scaling to given width and keeping aspect ratio.

XFCIMPORT void drawImageTransform (XFcGLSurface *aImage, INT32 aX, INT32 aY, INT32 aWidth, INT32 aHeight, UINT32 aFlags)
 Draws a 2D transformed image, scaling to given width and height.

XFCIMPORT void drawImageTransform (XFcGLSurface *aImage, const XFcRectangle &aSrcRect, UINT32 aFlags)
 Draws a 2D transformed image onto this surface to top-left corner.

XFCIMPORT void drawImageTransform (XFcGLSurface *aImage, INT32 aX, INT32 aY, const XFcRectangle &aSrcRect, UINT32 aFlags)
 Draws a 2D transformed image onto this surface to a given position.

XFCIMPORT void drawImageTransform (XFcGLSurface *aImage, INT32 aX, INT32 aY, const XFcRectangle &aSrcRect, INT32 aWidth, UINT32 aFlags)
 Draws a 2D transformed image, scaling to given width and keeping aspect ratio.

XFCIMPORT void drawImageTransform (XFcGLSurface *aImage, INT32 aX, INT32 aY, const XFcRectangle &aSrcRect, INT32 aWidth, INT32 aHeight, UINT32 aFlags)
 Draws a 2D transformed image, scaling to given width and height.

XFCIMPORT void drawImageTransformBlend (XFcGLSurface *aImage, INT32 aBlendType, INT32 aBlendValue, UINT32 aFlags)
 Draws a 2D transformed image onto this surface to top-left corner, using blending.

XFCIMPORT void drawImageTransformBlend (XFcGLSurface *aImage, INT32 aX, INT32 aY, INT32 aBlendType, INT32 aBlendValue, UINT32 aFlags)
 Draws a 2D transformed image onto this surface to a given position, using blending.

XFCIMPORT void drawImageTransformBlend (XFcGLSurface *aImage, INT32 aX, INT32 aY, INT32 aWidth, INT32 aBlendType, INT32 aBlendValue, UINT32 aFlags)
 Draws a 2D transformed image, scaling to given width and keeping aspect ratio, using blending.

XFCIMPORT void drawImageTransformBlend (XFcGLSurface *aImage, INT32 aX, INT32 aY, INT32 aWidth, INT32 aHeight, INT32 aBlendType, INT32 aBlendValue, UINT32 aFlags)
 Draws a 2D transformed image, scaling to given width and height, using blending.

XFCIMPORT void drawImageTransformBlend (XFcGLSurface *aImage, const XFcRectangle &aSrcRect, INT32 aBlendType, INT32 aBlendValue, UINT32 aFlags)
 Draws a 2D transformed image onto this surface to top-left corner, using blending.

XFCIMPORT void drawImageTransformBlend (XFcGLSurface *aImage, INT32 aX, INT32 aY, const XFcRectangle &aSrcRect, INT32 aBlendType, INT32 aBlendValue, UINT32 aFlags)
 Draws a 2D transformed image onto this surface to a given position, using blending.

XFCIMPORT void drawImageTransformBlend (XFcGLSurface *aImage, INT32 aX, INT32 aY, const XFcRectangle &aSrcRect, INT32 aWidth, INT32 aBlendType, INT32 aBlendValue, UINT32 aFlags)
 Draws a 2D transformed image, scaling to given width and keeping aspect ratio, using blending.

XFCIMPORT void drawImageTransformBlend (XFcGLSurface *aImage, INT32 aX, INT32 aY, const XFcRectangle &aSrcRect, INT32 aWidth, INT32 aHeight, INT32 aBlendType, INT32 aBlendValue, UINT32 aFlags)
 Draws an image, scaling to given width and height, using blending.

XFCIMPORT void drawFilledRect (INT32 aX, INT32 aY, INT32 aWidth, INT32 aHeight, UINT32 aColor)
 Draws a filled rectangle with single color (in 8:8:8:8 ARGB format).

XFCIMPORT void clear (UINT32 aColor)
 Clears the surface.

XFCIMPORT void drawAALine (XFcFixed aX1, XFcFixed aY1, XFcFixed aX2, XFcFixed aY2, UINT32 aColor)
 Draws an anti-aliased line (with color in 8:8:8:8 ARGB format).

XFCIMPORT void drawLine (XFcFixed aX1, XFcFixed aY1, XFcFixed aX2, XFcFixed aY2, UINT32 aColor)
 Draws a line (with color in 8:8:8:8 ARGB format).

XFCIMPORT INT32 getFormat ()
 Returns the surface format.

XFCIMPORT INT32 getWidth ()
 Returns surface width in pixels.

XFCIMPORT INT32 getHeight ()
 Returns surface height in pixels.


Static Public Member Functions

XFCIMPORT XFcGLSurface * create (INT32 aWidth=256, INT32 aHeight=256, INT32 aFormat=XFCGF_DEFAULT)
 Creates a surface with dimensions and format.


Protected Member Functions

 XFcGLSurface ()
 Protected empty constructor.

XFCIMPORT INT lockForBlit (XFcGLSurface *aImage)
 Locks both surfaces for blitting.

XFCIMPORT void unlockForBlit (XFcGLSurface *aImage)
 Unlocks both surfaces after blitting.

XFCIMPORT INT lockForDraw ()
 Locks surface for drawing.

XFCIMPORT void unlockForDraw ()
 Unlocks surface after drawing.


Protected Attributes

void * mData
 Pointer to the actual surface data.


Friends

class XFcGLCoreSurface

Detailed Description

Texture/sprite surface class.

The XFcGLSurface is the main building block of all 2D graphics in X-Forge. Graphics surfaces can be locked for direct memory access, and they can be blitted to other surfaces in different ways. Surfaces can be created for direct 2d graphics use, or you can acquire surfaces from XFcTexture objects, or you can ask the XFcGL object for the back buffer with the getSecondary() call.

See also:
XFcGLTexture

XFcGL


Constructor & Destructor Documentation

virtual XFCIMPORT XFcGLSurface::~XFcGLSurface   [virtual]
 

Virtual destructor.

XFcGLSurface::XFcGLSurface   [protected]
 

Protected empty constructor.


Member Function Documentation

XFCIMPORT void XFcGLSurface::clear UINT32    aColor
 

Clears the surface.

Whole bitmap is initialized to aColor.

Parameters:
aColor color in 8:8:8:8 ARGB format.

XFCIMPORT XFcGLSurface* XFcGLSurface::create INT32    aWidth = 256,
INT32    aHeight = 256,
INT32    aFormat = XFCGF_DEFAULT
[static]
 

Creates a surface with dimensions and format.

The default dimensions are 256 by 256. The default format is chosen so as to be compatible with the target device. Currently the default format is always 16-bit 55X5 format.

Parameters:
aWidth surface width.
aHeight surface height.
aFormat surface format, see XFCGFXFORMAT.
See also:
XFCGFXFORMAT

XFCIMPORT void XFcGLSurface::drawAALine XFcFixed    aX1,
XFcFixed    aY1,
XFcFixed    aX2,
XFcFixed    aY2,
UINT32    aColor
 

Draws an anti-aliased line (with color in 8:8:8:8 ARGB format).

The line is drawn to this surface, with the given color, between the points aX1,aY1 and aX2,aY2.

Note:
Coordinates are in pixels.
Parameters:
aX1 the first point's X-coordinate.
aY1 the first point's Y-coordinate.
aX2 the second point's X-coordinate.
aY2 the second point's Y-coordinate.
aColor color in 8:8:8:8 ARGB format.

XFCIMPORT void XFcGLSurface::drawFilledRect INT32    aX,
INT32    aY,
INT32    aWidth,
INT32    aHeight,
UINT32    aColor
 

Draws a filled rectangle with single color (in 8:8:8:8 ARGB format).

If the GL device supports it, and the target surface is the back buffer, this call may be hardware accelerated.

Note:
Coordinates are in pixels.
Parameters:
aX top-left X-coordinate.
aY top-left Y-coordinate.
aWidth width in pixels.
aHeight height in pixels.
aColor color in 8:8:8:8 ARGB format.

XFCIMPORT void XFcGLSurface::drawImage XFcGLSurface *    aImage,
INT32    aX,
INT32    aY,
const XFcRectangle   aSrcRect,
INT32    aWidth,
INT32    aHeight
 

Draws an image, scaling to given width and height.

The image is stretched to fit the aWidth and aHeight parameters.

Note:
Coordinates are in pixels.
Parameters:
aImage image to draw.
aX top-left X-coordinate to start drawing from.
aY top-left Y-coordinate to start drawing from.
aSrcRect source rectangle.
aWidth width of the scaled image.
aHeight height of the scaled image.

XFCIMPORT void XFcGLSurface::drawImage XFcGLSurface *    aImage,
INT32    aX,
INT32    aY,
const XFcRectangle   aSrcRect,
INT32    aWidth
 

Draws an image, scaling to given width and keeping aspect ratio.

Height is calculated based on the original image size, keeping the aspect ratio.

Note:
Coordinates are in pixels.
Parameters:
aImage image to draw.
aX top-left X-coordinate to start drawing from.
aY top-left Y-coordinate to start drawing from.
aSrcRect source rectangle.
aWidth width of the scaled image.

XFCIMPORT void XFcGLSurface::drawImage XFcGLSurface *    aImage,
INT32    aX,
INT32    aY,
const XFcRectangle   aSrcRect
 

Draws an image onto this surface to a given position.

Note:
Coordinates are in pixels.
Parameters:
aImage image to draw.
aX top-left X-coordinate to start drawing from.
aY top-left Y-coordinate to start drawing from.
aSrcRect source rectangle.

XFCIMPORT void XFcGLSurface::drawImage XFcGLSurface *    aImage,
const XFcRectangle   aSrcRect
 

Draws an image onto this surface to top-left corner.

Parameters:
aImage image to draw.
aSrcRect source rectangle.

XFCIMPORT void XFcGLSurface::drawImage XFcGLSurface *    aImage,
INT32    aX,
INT32    aY,
INT32    aWidth,
INT32    aHeight
 

Draws an image, scaling to given width and height.

The image is stretched to fit the aWidth and aHeight parameters.

Note:
Coordinates are in pixels.
Parameters:
aImage image to draw.
aX top-left X-coordinate to start drawing from.
aY top-left Y-coordinate to start drawing from.
aWidth width of the scaled image.
aHeight height of the scaled image.

XFCIMPORT void XFcGLSurface::drawImage XFcGLSurface *    aImage,
INT32    aX,
INT32    aY,
INT32    aWidth
 

Draws an image, scaling to given width and keeping aspect ratio.

Height is calculated based on the original image size, keeping the aspect ratio.

Note:
Coordinates are in pixels.
Parameters:
aImage image to draw.
aX top-left X-coordinate to start drawing from.
aY top-left Y-coordinate to start drawing from.
aWidth width of the scaled image.

XFCIMPORT void XFcGLSurface::drawImage XFcGLSurface *    aImage,
INT32    aX,
INT32    aY
 

Draws an image onto this surface to a given position.

Note:
Coordinates are in pixels.
Parameters:
aImage image to draw.
aX top-left X-coordinate to start drawing from.
aY top-left Y-coordinate to start drawing from.

XFCIMPORT void XFcGLSurface::drawImage XFcGLSurface *    aImage
 

Draws an image onto this surface to top-left corner.

Parameters:
aImage image to draw.

XFCIMPORT void XFcGLSurface::drawImageBlend XFcGLSurface *    aImage,
INT32    aX,
INT32    aY,
const XFcRectangle   aSrcRect,
INT32    aWidth,
INT32    aHeight,
INT32    aBlendType,
INT32    aBlendValue
 

Draws an image, scaling to given width and height, using blending.

The image is stretched to fit the aWidth and aHeight parameters.

Note:
Coordinates are in pixels.
Parameters:
aImage image to draw.
aX top-left X-coordinate to start drawing from.
aY top-left Y-coordinate to start drawing from.
aSrcRect source rectangle.
aWidth width of the scaled image.
aHeight height of the scaled image.
aBlendType blending type, see XFCBLENDMODE_2D.
aBlendValue blend value in range from 0 to 0xff.
See also:
XFCBLENDMODE_2D

XFCIMPORT void XFcGLSurface::drawImageBlend XFcGLSurface *    aImage,
INT32    aX,
INT32    aY,
const XFcRectangle   aSrcRect,
INT32    aWidth,
INT32    aBlendType,
INT32    aBlendValue
 

Draws an image, scaling to given width and keeping aspect ratio, using blending.

Height is calculated based on the original image size, keeping the aspect ratio.

Note:
Coordinates are in pixels.
Parameters:
aImage image to draw.
aX top-left X-coordinate to start drawing from.
aY top-left Y-coordinate to start drawing from.
aSrcRect source rectangle.
aWidth width of the scaled image.
aBlendType blending type, see XFCBLENDMODE_2D.
aBlendValue blend value in range from 0 to 0xff.
See also:
XFCBLENDMODE_2D

XFCIMPORT void XFcGLSurface::drawImageBlend XFcGLSurface *    aImage,
INT32    aX,
INT32    aY,
const XFcRectangle   aSrcRect,
INT32    aBlendType,
INT32    aBlendValue
 

Draws an image onto this surface to a given position, using blending.

Note:
Coordinates are in pixels.
Parameters:
aImage image to draw.
aX top-left X-coordinate to start drawing from.
aY top-left Y-coordinate to start drawing from.
aSrcRect source rectangle.
aBlendType blending type, see XFCBLENDMODE_2D.
aBlendValue blend value in range from 0 to 0xff.
See also:
XFCBLENDMODE_2D

XFCIMPORT void XFcGLSurface::drawImageBlend XFcGLSurface *    aImage,
const XFcRectangle   aSrcRect,
INT32    aBlendType,
INT32    aBlendValue
 

Draws an image onto this surface to top-left corner, using blending.

Parameters:
aImage image to draw.
aSrcRect source rectangle.
aBlendType blending type, see XFCBLENDMODE_2D.
aBlendValue blend value in range from 0 to 0xff.
See also:
XFCBLENDMODE_2D

XFCIMPORT void XFcGLSurface::drawImageBlend XFcGLSurface *    aImage,
INT32    aX,
INT32    aY,
INT32    aWidth,
INT32    aHeight,
INT32    aBlendType,
INT32    aBlendValue
 

Draws an image, scaling to given width and height, using blending.

The image is stretched to fit the aWidth and aHeight parameters.

Note:
Coordinates are in pixels.
Parameters:
aImage image to draw.
aX top-left X-coordinate to start drawing from.
aY top-left Y-coordinate to start drawing from.
aWidth width of the scaled image.
aHeight height of the scaled image.
aBlendType blending type, see XFCBLENDMODE_2D.
aBlendValue blend value in range from 0 to 0xff.
See also:
XFCBLENDMODE_2D

XFCIMPORT void XFcGLSurface::drawImageBlend XFcGLSurface *    aImage,
INT32    aX,
INT32    aY,
INT32    aWidth,
INT32    aBlendType,
INT32    aBlendValue
 

Draws an image, scaling to given width and keeping aspect ratio, using blending.

Height is calculated based on the original image size, keeping the aspect ratio.

Note:
Coordinates are in pixels.
Parameters:
aImage image to draw.
aX top-left X-coordinate to start drawing from.
aY top-left Y-coordinate to start drawing from.
aWidth width of the scaled image.
aBlendType blending type, see XFCBLENDMODE_2D.
aBlendValue blend value in range from 0 to 0xff.
See also:
XFCBLENDMODE_2D

XFCIMPORT void XFcGLSurface::drawImageBlend XFcGLSurface *    aImage,
INT32    aX,
INT32    aY,
INT32    aBlendType,
INT32    aBlendValue
 

Draws an image onto this surface to a given position, using blending.

Note:
Coordinates are in pixels.
Parameters:
aImage image to draw.
aX top-left X-coordinate to start drawing from.
aY top-left Y-coordinate to start drawing from.
aBlendType blending type, see XFCBLENDMODE_2D.
aBlendValue blend value in range from 0 to 0xff.
See also:
XFCBLENDMODE_2D

XFCIMPORT void XFcGLSurface::drawImageBlend XFcGLSurface *    aImage,
INT32    aBlendType,
INT32    aBlendValue
 

Draws an image onto this surface to top-left corner, using blending.

Parameters:
aImage image to draw.
aBlendType blending type, see XFCBLENDMODE_2D.
aBlendValue blend value in range from 0 to 0xff.
See also:
XFCBLENDMODE_2D

XFCIMPORT void XFcGLSurface::drawImageTransform XFcGLSurface *    aImage,
INT32    aX,
INT32    aY,
const XFcRectangle   aSrcRect,
INT32    aWidth,
INT32    aHeight,
UINT32    aFlags
 

Draws a 2D transformed image, scaling to given width and height.

The image is stretched to fit the aWidth and aHeight parameters.

Note:
Coordinates are in pixels.
Parameters:
aImage image to draw.
aX top-left X-coordinate to start drawing from.
aY top-left Y-coordinate to start drawing from.
aSrcRect source rectangle.
aWidth width of the scaled image.
aHeight height of the scaled image.
aFlags transformation flags, see XFCSURFACETRANSFORM_2D.
See also:
XFCSURFACETRANSFORM_2D

XFCIMPORT void XFcGLSurface::drawImageTransform XFcGLSurface *    aImage,
INT32    aX,
INT32    aY,
const XFcRectangle   aSrcRect,
INT32    aWidth,
UINT32    aFlags
 

Draws a 2D transformed image, scaling to given width and keeping aspect ratio.

Height is calculated based on the original image size, keeping the aspect ratio.

Note:
Coordinates are in pixels.
Parameters:
aImage image to draw.
aX top-left X-coordinate to start drawing from.
aY top-left Y-coordinate to start drawing from.
aSrcRect source rectangle.
aWidth width of the scaled image.
aFlags transformation flags, see XFCSURFACETRANSFORM_2D.
See also:
XFCSURFACETRANSFORM_2D

XFCIMPORT void XFcGLSurface::drawImageTransform XFcGLSurface *    aImage,
INT32    aX,
INT32    aY,
const XFcRectangle   aSrcRect,
UINT32    aFlags
 

Draws a 2D transformed image onto this surface to a given position.

Note:
Coordinates are in pixels.
Parameters:
aImage image to draw.
aX top-left X-coordinate to start drawing from.
aY top-left Y-coordinate to start drawing from.
aSrcRect source rectangle.
aFlags transformation flags, see XFCSURFACETRANSFORM_2D.
See also:
XFCSURFACETRANSFORM_2D

XFCIMPORT void XFcGLSurface::drawImageTransform XFcGLSurface *    aImage,
const XFcRectangle   aSrcRect,
UINT32    aFlags
 

Draws a 2D transformed image onto this surface to top-left corner.

Parameters:
aImage image to draw.
aSrcRect source rectangle.
aFlags transformation flags, see XFCSURFACETRANSFORM_2D.
See also:
XFCSURFACETRANSFORM_2D

XFCIMPORT void XFcGLSurface::drawImageTransform XFcGLSurface *    aImage,
INT32    aX,
INT32    aY,
INT32    aWidth,
INT32    aHeight,
UINT32    aFlags
 

Draws a 2D transformed image, scaling to given width and height.

The image is stretched to fit the aWidth and aHeight parameters.

Note:
Coordinates are in pixels.
Parameters:
aImage image to draw.
aX top-left X-coordinate to start drawing from.
aY top-left Y-coordinate to start drawing from.
aWidth width of the scaled image.
aHeight height of the scaled image.
aFlags transformation flags, see XFCSURFACETRANSFORM_2D.
See also:
XFCSURFACETRANSFORM_2D

XFCIMPORT void XFcGLSurface::drawImageTransform XFcGLSurface *    aImage,
INT32    aX,
INT32    aY,
INT32    aWidth,
UINT32    aFlags
 

Draws a 2D transformed image, scaling to given width and keeping aspect ratio.

Height is calculated based on the original image size, keeping the aspect ratio.

Note:
Coordinates are in pixels.
Parameters:
aImage image to draw.
aX top-left X-coordinate to start drawing from.
aY top-left Y-coordinate to start drawing from.
aWidth width of the scaled image.
aFlags transformation flags, see XFCSURFACETRANSFORM_2D.
See also:
XFCSURFACETRANSFORM_2D

XFCIMPORT void XFcGLSurface::drawImageTransform XFcGLSurface *    aImage,
INT32    aX,
INT32    aY,
UINT32    aFlags
 

Draws a 2D transformed image onto this surface to a given position.

Note:
Coordinates are in pixels.
Parameters:
aImage image to draw.
aX top-left X-coordinate to start drawing from.
aY top-left Y-coordinate to start drawing from.
aFlags transformation flags, see XFCSURFACETRANSFORM_2D.
See also:
XFCSURFACETRANSFORM_2D

XFCIMPORT void XFcGLSurface::drawImageTransform XFcGLSurface *    aImage,
UINT32    aFlags
 

Draws a 2D transformed image onto this surface to a given position.

Parameters:
aImage image to draw.
aFlags transformation flags, see XFCSURFACETRANSFORM_2D.
See also:
XFCSURFACETRANSFORM_2D

XFCIMPORT void XFcGLSurface::drawImageTransformBlend XFcGLSurface *    aImage,
INT32    aX,
INT32    aY,
const XFcRectangle   aSrcRect,
INT32    aWidth,
INT32    aHeight,
INT32    aBlendType,
INT32    aBlendValue,
UINT32    aFlags
 

Draws an image, scaling to given width and height, using blending.

The image is stretched to fit the aWidth and aHeight parameters.

Note:
Coordinates are in pixels.
Parameters:
aImage image to draw.
aX top-left X-coordinate to start drawing from.
aY top-left Y-coordinate to start drawing from.
aSrcRect source rectangle.
aWidth width of the scaled image.
aHeight height of the scaled image.
aBlendType blending type, see XFCBLENDMODE_2D.
aBlendValue blend value in range from 0 to 0xff.
aFlags transformation flags, see XFCSURFACETRANSFORM_2D.
See also:
XFCBLENDMODE_2D

XFCSURFACETRANSFORM_2D

XFCIMPORT void XFcGLSurface::drawImageTransformBlend XFcGLSurface *    aImage,
INT32    aX,
INT32    aY,
const XFcRectangle   aSrcRect,
INT32    aWidth,
INT32    aBlendType,
INT32    aBlendValue,
UINT32    aFlags
 

Draws a 2D transformed image, scaling to given width and keeping aspect ratio, using blending.

Height is calculated based on the original image size, keeping the aspect ratio.

Note:
Coordinates are in pixels.
Parameters:
aImage image to draw.
aX top-left X-coordinate to start drawing from.
aY top-left Y-coordinate to start drawing from.
aSrcRect source rectangle.
aWidth width of the scaled image.
aBlendType blending type, see XFCBLENDMODE_2D.
aBlendValue blend value in range from 0 to 0xff.
aFlags transformation flags, see XFCSURFACETRANSFORM_2D.
See also:
XFCBLENDMODE_2D

XFCSURFACETRANSFORM_2D

XFCIMPORT void XFcGLSurface::drawImageTransformBlend XFcGLSurface *    aImage,
INT32    aX,
INT32    aY,
const XFcRectangle   aSrcRect,
INT32    aBlendType,
INT32    aBlendValue,
UINT32    aFlags
 

Draws a 2D transformed image onto this surface to a given position, using blending.

Note:
Coordinates are in pixels.
Parameters:
aImage image to draw.
aX top-left X-coordinate to start drawing from.
aY top-left Y-coordinate to start drawing from.
aSrcRect source rectangle.
aBlendType blending type, see XFCBLENDMODE_2D.
aBlendValue blend value in range from 0 to 0xff.
aFlags transformation flags, see XFCSURFACETRANSFORM_2D.
See also:
XFCBLENDMODE_2D

XFCSURFACETRANSFORM_2D

XFCIMPORT void XFcGLSurface::drawImageTransformBlend XFcGLSurface *    aImage,
const XFcRectangle   aSrcRect,
INT32    aBlendType,
INT32    aBlendValue,
UINT32    aFlags
 

Draws a 2D transformed image onto this surface to top-left corner, using blending.

Parameters:
aImage image to draw.
aSrcRect source rectangle.
aBlendType blending type, see XFCBLENDMODE_2D.
aBlendValue blend value in range from 0 to 0xff.
aFlags transformation flags, see XFCSURFACETRANSFORM_2D.
See also:
XFCBLENDMODE_2D

XFCSURFACETRANSFORM_2D

XFCIMPORT void XFcGLSurface::drawImageTransformBlend XFcGLSurface *    aImage,
INT32    aX,
INT32    aY,
INT32    aWidth,
INT32    aHeight,
INT32    aBlendType,
INT32    aBlendValue,
UINT32    aFlags
 

Draws a 2D transformed image, scaling to given width and height, using blending.

The image is stretched to fit the aWidth and aHeight parameters.

Note:
Coordinates are in pixels.
Parameters:
aImage image to draw.
aX top-left X-coordinate to start drawing from.
aY top-left Y-coordinate to start drawing from.
aWidth width of the scaled image.
aHeight height of the scaled image.
aBlendType blending type, see XFCBLENDMODE_2D.
aBlendValue blend value in range from 0 to 0xff.
aFlags transformation flags, see XFCSURFACETRANSFORM_2D.
See also:
XFCBLENDMODE_2D

XFCSURFACETRANSFORM_2D

XFCIMPORT void XFcGLSurface::drawImageTransformBlend XFcGLSurface *    aImage,
INT32    aX,
INT32    aY,
INT32    aWidth,
INT32    aBlendType,
INT32    aBlendValue,
UINT32    aFlags
 

Draws a 2D transformed image, scaling to given width and keeping aspect ratio, using blending.

Height is calculated based on the original image size, keeping the aspect ratio.

Note:
Coordinates are in pixels.
Parameters:
aImage image to draw.
aX top-left X-coordinate to start drawing from.
aY top-left Y-coordinate to start drawing from.
aWidth width of the scaled image.
aBlendType blending type, see XFCBLENDMODE_2D.
aBlendValue blend value in range from 0 to 0xff.
aFlags transformation flags, see XFCSURFACETRANSFORM_2D.
See also:
XFCBLENDMODE_2D

XFCSURFACETRANSFORM_2D

XFCIMPORT void XFcGLSurface::drawImageTransformBlend XFcGLSurface *    aImage,
INT32    aX,
INT32    aY,
INT32    aBlendType,
INT32    aBlendValue,
UINT32    aFlags
 

Draws a 2D transformed image onto this surface to a given position, using blending.

Note:
Coordinates are in pixels.
Parameters:
aImage image to draw.
aX top-left X-coordinate to start drawing from.
aY top-left Y-coordinate to start drawing from.
aBlendType blending type, see XFCBLENDMODE_2D.
aBlendValue blend value in range from 0 to 0xff.
aFlags transformation flags, see XFCSURFACETRANSFORM_2D.
See also:
XFCBLENDMODE_2D

XFCSURFACETRANSFORM_2D

XFCIMPORT void XFcGLSurface::drawImageTransformBlend XFcGLSurface *    aImage,
INT32    aBlendType,
INT32    aBlendValue,
UINT32    aFlags
 

Draws a 2D transformed image onto this surface to top-left corner, using blending.

Parameters:
aImage image to draw.
aBlendType blending type, see XFCBLENDMODE_2D.
aBlendValue blend value in range from 0 to 0xff.
aFlags transformation flags, see XFCSURFACETRANSFORM_2D.
See also:
XFCBLENDMODE_2D

XFCSURFACETRANSFORM_2D

XFCIMPORT void XFcGLSurface::drawLine XFcFixed    aX1,
XFcFixed    aY1,
XFcFixed    aX2,
XFcFixed    aY2,
UINT32    aColor
 

Draws a line (with color in 8:8:8:8 ARGB format).

The line is drawn to this surface, with the given color, between the points aX1,aY1 and aX2,aY2.

Note:
Coordinates are in pixels.
Parameters:
aX1 the first point's X-coordinate.
aY1 the first point's Y-coordinate.
aX2 the second point's X-coordinate.
aY2 the second point's Y-coordinate.
aColor color in 8:8:8:8 ARGB format.

XFCIMPORT void XFcGLSurface::enableColorKey INT    aFlag
 

Enables or disables color keying.

Parameters:
aFlag 1 to enable color keying, 0 to disable.
See also:
setColorKey

XFCIMPORT INT32 XFcGLSurface::getColorKey  
 

Returns the current color key.

See also:
setColorKey

XFCIMPORT INT32 XFcGLSurface::getFormat  
 

Returns the surface format.

See also:
XFCGFXFORMAT

XFCIMPORT INT32 XFcGLSurface::getHeight  
 

Returns surface height in pixels.

XFCIMPORT INT32 XFcGLSurface::getWidth  
 

Returns surface width in pixels.

virtual XFCIMPORT INT32 XFcGLSurface::lock void **    aBuffer,
INT32    aMode = XFCGF_DEFAULT,
INT32    aFlags = XFCGFX_DISCARDCONTENTS
[virtual]
 

Locks the surface with specific mode.

Non-preferred modes will be converted on the fly, which is slow.

If you wish to fill the whole surface you may get some speed gains by using the XFCGFX_DISCARDCONTENTS flag. Not using this flag may cause the system to convert between graphics formats on lock and unlock.
If you only wish to read from the surface, use the XFCGFX_DISCARDCHANGES flag. Not doing so may cause loss of data (if locked format has less data than the native format).
Note:
While the framebuffer is locked, you should not call any graphics library functions.
Parameters:
aBuffer returned pointer to the surface.
aFlags surface lock flags, see XFCGFXFLAGS.
aMode graphics format, see XFCGFXFORMAT. Use XFCGF_DEFAULT to lock surface in its own native format.
Returns:
Surface pitch in bytes.
See also:
XFCGFXFORMAT

XFCGFXFLAGS

Reimplemented in XFcGLResourceSurface.

XFCIMPORT INT XFcGLSurface::lockForBlit XFcGLSurface *    aImage [protected]
 

Locks both surfaces for blitting.

XFCIMPORT INT XFcGLSurface::lockForDraw   [protected]
 

Locks surface for drawing.

XFCIMPORT void XFcGLSurface::setColorKey INT32    aColorKey
 

Sets the color key (in 8:8:8:8 ARGB format).

Color keying is a method of masking parts of a 2D surface to be fully transparent.

Parameters:
aColorKey new color key in 8:8:8:8 ARGB format.
Note:
You have to enable color keying with the enableColorKey() call as well.

The color keying affects the 2D pipeline only. To make a color transparent in the 3D pipeline, you have to specify the color key at creation time.

See also:
XFcGLTextureFromFile

getColorKey

enableColorKey

virtual XFCIMPORT void XFcGLSurface::unlock   [virtual]
 

Unlocks the framebuffer.

If the surface was locked in a non-native format and the locking did not specify the GFX_DISCARDCHANGES flag, the unlock will convert the temporary buffer into the surface's native format.

See also:
lock

Reimplemented in XFcGLResourceSurface.

XFCIMPORT void XFcGLSurface::unlockForBlit XFcGLSurface *    aImage [protected]
 

Unlocks both surfaces after blitting.

XFCIMPORT void XFcGLSurface::unlockForDraw   [protected]
 

Unlocks surface after drawing.


Friends And Related Function Documentation

friend class XFcGLCoreSurface [friend]
 

Reimplemented in XFcGLResourceSurface.


Member Data Documentation

void* XFcGLSurface::mData [protected]
 

Pointer to the actual surface data.


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