CrystalSpace

Public API Reference

2D
[Graphics]


Classes

struct  csBitmapMetrics
 Metrics for a glyph that are dependent from whether a simple or antialiased image is used. More...
struct  csGlyphMetrics
 Metrics for a glyph that are independent from whether a simple or antialiased image is used. More...
struct  csImageArea
 This structure is used for saving/restoring areas of screen. More...
struct  csImageIOFileFormatDescription
 Description for a file format supported by an image loader. More...
struct  csPixelCoord
 Simple 2D pixel coordinate. More...
struct  csPixelFormat
 Structure describing the pixel format. More...
struct  iAnimatedImage
 If an image file has animation capabilities, this interface is exhibited. More...
struct  iFont
 A font object. More...
struct  iFontDeleteNotify
 Called before a font is deleted. More...
struct  iFontServer
 A font server interface. More...
struct  iGraphics2D
 This is the interface for 2D renderer. More...
struct  iImage
 The iImage interface is used to work with image objects. More...
struct  iImageIO
 The iImageIO interface is used to save and load graphic files. More...
struct  iNativeWindow
 This interface represents a native window. More...
struct  iNativeWindowManager
 This interface represents the native window manager system. More...
struct  iOffscreenCanvasCallback
 When you create an offscreen canvas (CreateOffscreenCanvas()) then you can use this callback to get informed when the texture has been modified (FinishDraw() called) or a palette entry is modified. More...
struct  iOffscreenCanvasCallback
 When you create an offscreen canvas (CreateOffscreenCanvas()) then you can use this callback to get informed when the texture has been modified (FinishDraw() called) or a palette entry is modified. More...

Alert types

#define CS_ALERT_ERROR   1
 Display an error.
#define CS_ALERT_NOTE   3
 Display a note.
#define CS_ALERT_WARNING   2
 Display a warning.

Image format masks

We can request csImageLoader to load an image in several formats. The format we should use depends on what we want to do with the image; usually if we're going to use the image as a texture, the format we should use is determined by querying the 3D rasterizer for the preferred image format.

#define CS_IMGFMT_ALPHA   (0x00010000)
 Do we need alpha channel or not.
#define CS_IMGFMT_ANY   (CS_IMGFMT_MASK)
 Autodetect: use whatever format the file is in. Use ONLY for loading.
#define CS_IMGFMT_INVALID   (0x80000000)
 This flag indicates an invalid image format.
#define CS_IMGFMT_MASK   (0x0000ffff)
 The mask to separate the image format apart.
#define CS_IMGFMT_NONE   (0x00000000)
 We don't want the pixels at all, just (possibly) the alphamap.
#define CS_IMGFMT_PALETTED8   (0x00000002)
 8-bit indexed paletted image
#define CS_IMGFMT_TRUECOLOR   (0x00000001)
 Truecolor format (r/g/b/unused per each pixel).

Basic fonts alias names

Any font server should provide these fonts, since most programs expect they to be available. Other fonts may or may be not available but these should be always available. Default font names always start with "*" to avoid confusion with real file names.

#define CSFONT_COURIER   "*courier"
 Thin courier-like relatively large font.
#define CSFONT_ITALIC   "*italic"
 Thick italic relatively large font.
#define CSFONT_LARGE   "*large"
 Thick and relatively large font.
#define CSFONT_SMALL   "*small"
 Very small font (smallest font that is still readable).

Defines

#define CS_FONT_DEFAULT_GLYPH   0xffff
 The default char, drawn in case a glyph wasn't present in the font.
#define CS_IMAGEIO_LOAD   1
#define CS_IMAGEIO_SAVE   2

Typedefs

typedef csArray< csImageIOFileFormatDescription
const * > 
csImageIOFileFormatDescriptions
 Description for the array of file formats.
typedef enum _csMouseCursorID csMouseCursorID
 Standard mouse cursor IDs.

Enumerations

enum  { CS_WRITE_BASELINE = (1 << 0), CS_WRITE_NOANTIALIAS = (1 << 1) }
 iGraphics2D::Write() flags. More...
enum  _csMouseCursorID {
  csmcNone = -1, csmcArrow = 0, csmcLens, csmcCross,
  csmcPen, csmcMove, csmcSizeNWSE, csmcSizeNESW,
  csmcSizeNS, csmcSizeEW, csmcStop, csmcWait
}
 Standard mouse cursor IDs. More...
enum  csImageType { csimg2D = 0, csimg3D, csimgCube }
 Type of an image. More...

Define Documentation

#define CS_ALERT_ERROR   1

Display an error.

Definition at line 35 of file natwin.h.

#define CS_ALERT_NOTE   3

Display a note.

Definition at line 39 of file natwin.h.

#define CS_ALERT_WARNING   2

Display a warning.

Definition at line 37 of file natwin.h.

#define CS_FONT_DEFAULT_GLYPH   0xffff

The default char, drawn in case a glyph wasn't present in the font.

The Unicode standard says that this will never be a valid code point - so we just take as the "replacer" char.

Definition at line 56 of file fontserv.h.

Referenced by csG2DDrawText< Tpixel, Tpixmixer1, Tpixmixer2, Tpixmixer3 >::DrawText().

#define CS_IMGFMT_ALPHA   (0x00010000)

Do we need alpha channel or not.

Definition at line 54 of file image.h.

#define CS_IMGFMT_ANY   (CS_IMGFMT_MASK)

Autodetect: use whatever format the file is in. Use ONLY for loading.

Definition at line 52 of file image.h.

#define CS_IMGFMT_INVALID   (0x80000000)

This flag indicates an invalid image format.

No image may have this set, and you may not load images with this flag set.

Definition at line 59 of file image.h.

#define CS_IMGFMT_MASK   (0x0000ffff)

The mask to separate the image format apart.

Definition at line 44 of file image.h.

Referenced by csImageTools::ComputeDataSize().

#define CS_IMGFMT_NONE   (0x00000000)

We don't want the pixels at all, just (possibly) the alphamap.

Definition at line 46 of file image.h.

#define CS_IMGFMT_PALETTED8   (0x00000002)

8-bit indexed paletted image

Definition at line 50 of file image.h.

Referenced by csImageTools::ComputeDataSize().

#define CS_IMGFMT_TRUECOLOR   (0x00000001)

Truecolor format (r/g/b/unused per each pixel).

Definition at line 48 of file image.h.

#define CSFONT_COURIER   "*courier"

Thin courier-like relatively large font.

Definition at line 46 of file fontserv.h.

#define CSFONT_ITALIC   "*italic"

Thick italic relatively large font.

Definition at line 44 of file fontserv.h.

#define CSFONT_LARGE   "*large"

Thick and relatively large font.

Definition at line 42 of file fontserv.h.

#define CSFONT_SMALL   "*small"

Very small font (smallest font that is still readable).

Definition at line 48 of file fontserv.h.


Typedef Documentation

Description for the array of file formats.

Definition at line 61 of file imageio.h.

Standard mouse cursor IDs.


Enumeration Type Documentation

anonymous enum

iGraphics2D::Write() flags.

Enumerator:
CS_WRITE_BASELINE  Write by baseline, x and y are treated as the pen position on a baseline.
CS_WRITE_NOANTIALIAS  Don't use anti-aliased glyphs.

Definition at line 45 of file graph2d.h.

Standard mouse cursor IDs.

Enumerator:
csmcNone  No cursor.
csmcArrow  Arrow cursor.
csmcLens  Lens cursor.
csmcCross  Cross-hatch cursor.
csmcPen  Pen cursor.
csmcMove  Window move cursor.
csmcSizeNWSE  Diagonal (\) resizing cursor.
csmcSizeNESW  Diagonal (/) resizing cursor.
csmcSizeNS  Vertical sizing cursor.
csmcSizeEW  Horizontal sizing cursor.
csmcStop  Invalid operation cursor.
csmcWait  Wait (longplay operation) cursor.

Definition at line 40 of file cursor.h.

Type of an image.

Enumerator:
csimg2D  2D image. Nothing special.
csimg3D  3D image.

The depth slices are arranged consecutively.

csimgCube  Cube map.

The cube faces are stored as sub images, the indices are the CS_TEXTURE_CUBE_XXX values.

See also:
CS_TEXTURE_CUBE_POS_X

Definition at line 63 of file image.h.


Generated for Crystal Space by doxygen 1.4.7