Global Variables and Constants

sge.IMPLEMENTATION

A string indicating the name of the SGE implementation.

sge.ALIGN_LEFT

Flag indicating horizontal alignment to the left.

sge.ALIGN_CENTER

Flag indicating horizontal alignment to the center.

sge.ALIGN_RIGHT

Flag indicating horizontal alignment to the right.

sge.ALIGN_TOP

Flag indicating vertical alignment to the top

sge.ALIGN_MIDDLE

Flag indicating vertical alignment to the middle.

sge.ALIGN_BOTTOM

Flag indicating vertical alignment to the bottom.

sge.BLEND_NORMAL

Flag indicating normal blending.

sge.BLEND_RGBA_ADD

Flag indicating RGBA Addition blending: the red, green, blue, and alpha color values of the source are added to the respective color values of the destination, to a maximum of 255.

sge.BLEND_RGBA_SUBTRACT

Flag indicating RGBA Subtract blending: the red, green, blue, and alpha color values of the source are subtracted from the respective color values of the destination, to a minimum of 0.

sge.BLEND_RGBA_MULTIPLY

Flag indicating RGBA Multiply blending: the red, green, blue, and alpha color values of the source and destination are converted to values between 0 and 1 (divided by 255), the resulting destination color values are multiplied by the respective resulting source color values, and these results are converted back into values between 0 and 255 (multiplied by 255).

sge.BLEND_RGBA_SCREEN

Flag indicating RGBA Screen blending: the red, green, blue, and alpha color values of the source and destination are inverted (subtracted from 255) and converted to values between 0 and 1 (divided by 255), the resulting destination color values are multiplied by the respective resulting source color values, and these results are converted back into values between 0 and 255 (multiplied by 255) and inverted again (subtracted from 255).

sge.BLEND_RGBA_MINIMUM

Flag indicating RGBA Minimum (Darken Only) blending: the smallest respective red, green, blue, and alpha color values out of the source and destination are used.

sge.BLEND_RGBA_MAXIMUM

Flag indicating RGBA Maximum (Lighten Only) blending: the largest respective red, green, blue, and alpha color values out of the source and destination are used.

sge.BLEND_RGB_ADD

Flag indicating RGB Addition blending: the same thing as RGBA Addition blending (see sge.BLEND_RGBA_ADD) except the destination’s alpha values are not changed.

sge.BLEND_RGB_SUBTRACT

Flag indicating RGB Subtract blending: the same thing as RGBA Subtract blending (see sge.BLEND_RGBA_SUBTRACT) except the destination’s alpha values are not changed.

sge.BLEND_RGB_MULTIPLY

Flag indicating RGB Multiply blending: the same thing as RGBA Multiply blending (see sge.BLEND_RGBA_MULTIPLY) except the destination’s alpha values are not changed.

sge.BLEND_RGB_SCREEN

Flag indicating RGB Screen blending: the same thing as RGBA Screen blending (see sge.BLEND_RGBA_SCREEN) except the destination’s alpha values are not changed.

sge.BLEND_RGB_MINIMUM

Flag indicating RGB Minimum (Darken Only) blending: the same thing as RGBA Minimum blending (see sge.BLEND_RGBA_MINIMUM) except the destination’s alpha values are not changed.

sge.BLEND_RGB_MAXIMUM

Flag indicating RGB Maximum (Lighten Only) blending: the same thing as RGBA Maximum blending (see sge.BLEND_RGBA_MAXIMUM) except the destination’s alpha values are not changed.

sge.game

Stores the current sge.Game object. If there is no sge.Game object currently, this variable is set to None.

sge.image_directories

A list of directories where images can be found. Default is ./data/images, ./data/sprites, or ./data/backgrounds, where . is the program directory.

sge.font_directories

A list of directories where font files can be found. Default is ./data/fonts, where . is the program directory.

sge.sound_directories

A list of directories where sounds can be found. Default is ./data/sounds, where . is the program directory.

sge.music_directories

A list of directories where music files can be found. Default is ./data/music, where . is the program directory.

Previous topic

Second Example: Pong

Next topic

Classes

This Page