Max2D features a multilayered pixel perfect collision system. The red , green and blue parameters should be in the range of 0 to The id specifies an object to be returned to future CollideImage calls when collisions occur. Policies and guidelines Contact us. DrawOval draws an oval that fits in the rectangular area defined by x , y , width and height parameters.

Uploader: Douzuru
Date Added: 13 February 2006
File Size: 61.87 Mb
Operating Systems: Windows NT/2000/XP/2003/2003/7/8/10 MacOS 10/X
Downloads: 12998
Price: Free* [*Free Regsitration Required]

If sync is -1 and the current graphics object was created with the Graphics command, then flips will occur at the graphics object’s refresh rate regardless of whether or not the graphics hardware supports such a refresh rate.

The Graphics command can be used to achieve a fixed refresh rate.

BlitzMax/Modules/Graphics/OpenGL Graphics – Wikibooks, open books for an open world

When using Flip to present such graphics, BlitzMax will guarantee the desired refresh rate is honored regardless of the available hardware’s capabilities.

This value can be 0, 16, 24 or 32 depending on the graphics modes available. The DrawPixmap and GrabPixmap commands allow you to move pixels to and from the current graphic display’s backbuffer. The id specifies an object to be returned to future CollideImage calls when collisions occur.

BlitzMax/Modules/Graphics/Max2D – Wikibooks, open books for an open world

The current ViewPort defines an area within the back buffer that all drawing is clipped to. Please refer to LoadImage for valid flags values.


The writemask specifies which if any collision layers the image is added to in its currently transformed state. The Max2D module provides a set of commands for drawing 2D graphics.

In other languages Add links. To set the mask color, use the SetMaskColor command. This allows you to provide a local ‘center’ for drawing. TileImage grphics an image in a repeating, tiled pattern, filling the current viewport.

The drawing handle is a 2D offset subtracted from the x,y location of all drawing commands except DrawImage as Images have their own unique handles. In other languages Add links. Flags can be combined with the or operator.

Note that creating graphics with an unsupported refresh rate will not fail – instead, a default refresh rate will be used. Views Read Edit View history. This command is useful for calculating vertical alignment of text when using the DrawText command. Graphics also enables polled input mode, providing a simple way to monitor the keyboard and grapics.

Pitch refers to the difference, in bytes, between the start of one row of pixels and the start grapihcs the next row. In order to DrawText in fonts other than the default system font use the SetImageFont command with a font handle returned by the LoadImageFont command.



If sync is 0, then the flip occurs as soon as possible. Set current Cls color. AutoMidHandle defaults to False after calling Graphics.

LoadAnimImage extracts multiple image frames from a single, larger image. EndGraphics closes the graphics object sft by Graphics. To disable this effect, you should set the current color to white. Locked images must eventually be unlocked with UnlockImage before they can be drawn.


You can retrieve the format of a pixmap using the PixmapFormat command, and convert pixmaps from one format to another using ConvertPixmap. Max2D features a multilayered pixel perfect collision system.

Flip swap the front and back graphixs of the current graphics objects. Unlike SetOrigin the drawing handle is subtracted before rotation and scale are applied providing a ‘local’ origin.

This page was last edited on 11 Novemberat ResetCollisions is used to clear any or all of the 32 collision layers provided.