| xors2d.minib2d: | Constants | Globals | Functions | Types | Source |
| ALPHABLEND , COLLIDEDIMAGE , FILTEREDIMAGE , LIGHTBLEND , MIPMAPEDIMAGE |
| AutoImageFlags , AutoMidHandle |
| Cls | Clear graphics buffer. |
| DrawCapsule | Draw an oval. |
| DrawEmitter | Load a multi-frame image. |
| DrawImage | Отрисовать изображение в задний буффер |
| DrawImageRect | Draw an image to a rectangular area of the back buffer. |
| DrawLine | Draw a line. |
| DrawOval | Draw an oval. |
| DrawPoly | Draw a polygon. |
| DrawRect | Draw a rectangle. |
| DrawRectRound | Draw an oval. |
| DrawText | Отрисовать текст |
| GetBlend | Get current blend mode. |
| GetClsColor | Get red, green, blue and alpha component of current cls color. |
| GetColor | Get red, green, blue and alpha component of current color. |
| GetLineWidth | Get line width. |
| GetViewport | Get dimensions of current Viewport. |
| ImageHeight | Получить высоту изображения |
| ImageWidth | Получить ширину изображения |
| LoadAnimEmitter | Load a multi-frame image. |
| LoadAnimImage | Загрузить многокадровое изображение |
| LoadEmitter | Load a multi-frame image. |
| LoadFont | Загрузить графический шрифт |
| LoadImage | Загрузить изображение |
| LoadMatrix | Сбросить матрицу. |
| MidHandleImage | Set an image's handle to its center. |
| Plot | Plot a pixel. |
| PopMatrix | Восстановит ранее сохраненную матрицу. |
| PositionTexture | Установить позицию текстуры изображения |
| PushMatrix | Сохранить текщую матрицу. |
| Rotate | Повернуть матрицу. |
| Scale | Масштабировать матрицу. |
| ScaleTexture | Установить масштаб текстуры изображения |
| SetBlend | Set current blend mode. |
| SetClsColor | Set current Cls color. |
| SetColor | Set current color. |
| SetFont | Set current image font. |
| SetImageHandle | Установить точку центра |
| SetLineWidth | Sets pixel width of lines drawn with the DrawLine command. |
| SetViewport | Set drawing viewport. |
| TextHeight | Получить высоту текста |
| TextWidth | Получить ширину текста |
| TileImage | Draw an image in a tiled pattern. |
| Translate | Перенести матрицу. |
| UpdateEmitter | Load a multi-frame image. |
| TEmitter | Источник частиц |
| TFont | Графический шрифт |
| TFontLoader | Загрузчик графического шрифта |
| TImage | Класс изображений |
| Const ALPHABLEND:Int | |
| Description | Класс изображений |
| Const COLLIDEDIMAGE:Int | |
| Description | Флаг чуствительности изображения |
| Const FILTEREDIMAGE:Int | |
| Description | Флаг фильтрации изображения при увеличении масштаба |
| Const LIGHTBLEND:Int | |
| Description | Класс изображений |
| Const MIPMAPEDIMAGE:Int | |
| Description | Флаг фильтрации изображения при уменьшении масштаба |
| Global AutoImageFlags:Int | |
| Description | Установить автоматический флаг изображений |
| Information | Автоматический флаг используется функциями загрузки изображений в случае отсутствия параметра flags, по умолчанию флаг установлен в режим FILTEREDIMAGE ( смтри LoadImage, LoadAnimImage, LoadFont, LoadEmitter, LoadAnimEmitter ) |
| Global AutoMidHandle:Int | |
| Description | Включить или выключить автоматическое центирирование изображений |
| Information | Во время включенного режима автоцентрирования, все вновь созданные изображения автоматически центрируются ( смотри MidHandleImage ). При выключеном режиме изображения центрируются по локальному верхнему левому углу. |
| Function Cls() | |
| Description | Clear graphics buffer. |
| Information | Clears the graphics buffer to the current cls color as determined by SetClsColor. |
| Function DrawCapsule(width:Float, height:Float) | |
| Description | Draw an oval. |
| Information | DrawOval draws an oval that fits in the rectangular area defined by x, y, width
and height parameters.
BlitzMax commands that affect the drawing of ovals include SetColor, SetHandle, SetScale, SetRotation, SetOrigin, SetViewPort, SetBlend and SetAlpha. |
| Function DrawEmitter(emitter:TEmitter, frame:Int = 0) | |
| Returns | An image object. |
| Description | Load a multi-frame image. |
| Information | LoadAnimImage extracts multiple image frames from a single, larger image. url can be either a string or an
existing pixmap.
See LoadImage for valid flags values. |
| Function DrawImage:Byte(image:TImage, frame:Int = 0) | |
| Description | Отрисовать изображение в задний буффер |
| Information | Drawing is affected by the current blend mode, color, scale and rotation.
If the blend mode is ALPHABLEND the image is affected by the current alpha value and images with alpha channels are blended correctly with the background. |
| Function DrawImageRect(image:TImage, x:Float, y:Float, w:Float, h:Float, frame:Int = 0) | |
| Description | Draw an image to a rectangular area of the back buffer. |
| Information | x, y, w and h specify the destination rectangle to draw to.
frame is the image frame to draw. Drawing is affected by the current blend mode, color, scale and rotation. If the blend mode is ALPHABLEND, then the image is also affected by the current alpha value. |
| Function DrawLine(x:Float, y:Float) | |
| Description | Draw a line. |
| Information | DrawLine draws a line from x, y to x2, y2 with the current drawing color.
BlitzMax commands that affect the drawing of lines include SetLineWidth, SetColor, SetHandle, SetScale, SetRotation, SetOrigin, SetViewPort, SetBlend and SetAlpha. The optional draw_last_pixel parameter can be used to control whether the last pixel of the line is drawn or not. Not drawing the last pixel can be useful if you are using certain blending modes. |
| Function DrawOval(width:Float, height:Float) | |
| Description | Draw an oval. |
| Information | DrawOval draws an oval that fits in the rectangular area defined by x, y, width
and height parameters.
BlitzMax commands that affect the drawing of ovals include SetColor, SetHandle, SetScale, SetRotation, SetOrigin, SetViewPort, SetBlend and SetAlpha. |
| Function DrawPoly(xy:Float[]) | |
| Description | Draw a polygon. |
| Information | DrawPoly draws a polygon with corners defined by an array of x#,y# coordinate pairs.
BlitzMax commands that affect the drawing of polygons include #SetColor, #SetHandle, #SetScale, #SetRotation, #SetOrigin, #SetViewPort, #SetBlend and #SetAlpha. |
| Function DrawRect(width:Float, height:Float) | |
| Description | Draw a rectangle. |
| Information | Sets the color of a rectangular area of pixels using the current drawing color
defined with the SetColor command.
Other commands that affect the operation of DrawRect include SetHandle, SetScale, SetRotation, SetOrigin, SetViewPort, SetBlend and SetAlpha. |
| Function DrawRectRound(width:Float, height:Float, radius:Float) | |
| Description | Draw an oval. |
| Information | DrawOval draws an oval that fits in the rectangular area defined by x, y, width
and height parameters.
BlitzMax commands that affect the drawing of ovals include SetColor, SetHandle, SetScale, SetRotation, SetOrigin, SetViewPort, SetBlend and SetAlpha. |
| Function DrawText(txt:String) | |
| Description | Отрисовать текст |
| Information | DrawText prints strings at position x,@y of the graphics display using
the current image font specified by the SetImageFont command.
Other commands that affect DrawText include SetColor, SetHandle, SetScale, SetRotation, SetOrigin, SetViewPort, SetBlend and SetAlpha. It is recomended that the blend mode be set to ALPHABLEND using the SetBlend command for non jagged antialiased text. Text that will be drawn at a smaller size using the SetScale command should use fonts loaded with the SMOOTHFONT style to benefit from mip-mapped filtering, see LoadImageFont for more information. |
| Function GetBlend:Int() | |
| Returns | The current blend mode. |
| Description | Get current blend mode. |
| Function GetClsColor(r:Float Var, g:Float Var, b:Float Var, a:Float Var) | |
| Returns | Red, green and blue values in the range 0..1 in the variables supplied. |
| Description | Get red, green, blue and alpha component of current cls color. |
| Function GetColor(r:Float Var, g:Float Var, b:Float Var, a:Float Var) | |
| Returns | Red, green and blue values in the range 0..1 in the variables supplied. |
| Description | Get red, green, blue and alpha component of current color. |
| Function GetLineWidth:Float() | |
| Returns | Current line width, in pixels. |
| Description | Get line width. |
| Function GetViewport(x:Int Var, y:Int Var, width:Int Var, height:Int Var) | |
| Returns | The horizontal, vertical, width and height values of the current Viewport in the variables supplied. |
| Description | Get dimensions of current Viewport. |
| Function ImageHeight:Int(image:TImage) | |
| Returns | Ширина в пикселях |
| Description | Получить высоту изображения |
| Function ImageWidth:Int(image:TImage) | |
| Returns | Ширина в пикселях |
| Description | Получить ширину изображения |
| Function LoadAnimEmitter:TEmitter(url:Object, cell_width:Int, cell_height:Int, first_cell:Int, cell_count:Int, flags:Int = -1) | |
| Returns | An image object. |
| Description | Load a multi-frame image. |
| Information | LoadAnimImage extracts multiple image frames from a single, larger image. url can be either a string or an
existing pixmap.
Параметр url может принимать строку или карту пикселей. Параметр flags : смотри LoadImage. |
| Function LoadAnimImage:TImage(url:Object, cell_width:Int, cell_height:Int, first_cell:Int, cell_count:Int, flags:Int = -1) | |
| Returns | Обьект изображения |
| Description | Загрузить многокадровое изображение |
| Information | LoadAnimImage extracts multiple image frames from a single, larger image. url can be either a string or an
existing pixmap.
Параметр url может принимать строку или карту пикселей. Параметр flags : смотри LoadImage. |
| Function LoadEmitter:TEmitter(url:Object, flags:Int = -1) | |
| Returns | An image object. |
| Description | Load a multi-frame image. |
| Information | Параметр url может принимать строку или карту пикселей.
Параметр flags : смотри LoadImage. |
| Function LoadFont:TFont(pix_url:Object, txt_url:Object, flags:Int = -1) | |
| Returns | Обьект графического шрифта |
| Description | Загрузить графический шрифт |
| Information | Параметр url может принимать строку или карту пикселей.
Параметр flags : смотри LoadImage. |
| Function LoadImage:TImage(url:Object, flags:Int = -1) | |||||||||
| Returns | Обьект изображения | ||||||||
| Description | Загрузить изображение | ||||||||
| Information | Параметр url может принимать строку или карту пикселей.
Параметр flags может быть равен 0, -1 или любой следующей комбинации:
Флаги MIPMAPEDIMAGE и COLLIDEDIMAGE требует дополнительную выдеопамять, поэтому рекомендуется использовать только в случае реальной необходимости. Если параметр флага не установлен или установлен в значение -1, то к изображению будет приминет автоматический флаг : смотри AutoImageFlags. Для комбинирования флагов использется | ( логический оператор ИЛИ ). | ||||||||
| Function LoadMatrix() | |
| Description | Сбросить матрицу. |
| Function MidHandleImage(image:TImage) | |
| Description | Set an image's handle to its center. |
| Function Plot(image:TImage, size:Float = 1.0) | |
| Description | Plot a pixel. |
| Information | Sets the color of a single pixel on the back buffer to the current drawing color defined with the SetColor command. Other commands that affect the operation of Plot include SetOrigin, SetViewPort, SetBlend and SetAlpha. |
| Function PopMatrix() | |
| Description | Восстановит ранее сохраненную матрицу. |
| Function PositionTexture(image:TImage, u:Float = 0.0, v:Float = 0.0) | |
| Description | Установить позицию текстуры изображения |
| Function PushMatrix() | |
| Description | Сохранить текщую матрицу. |
| Function Rotate(angle:Float) | |
| Description | Повернуть матрицу. |
| Function Scale(x:Float, y:Float) | |
| Description | Масштабировать матрицу. |
| Function ScaleTexture(image:TImage, u:Float = 1.0, v:Float = 1.0) | |
| Description | Установить масштаб текстуры изображения |
| Function SetBlend(blend:Int) | |||||||
| Description | Set current blend mode. | ||||||
| Information | SetBlend controls how pixels are combined with existing pixels in the back buffer when drawing
commands are used in BlitzMax.
blend should be one of:
| ||||||
| Function SetClsColor(r:Float, g:Float, b:Float, a:Float = 1.0) | |
| Description | Set current Cls color. |
| Information | The red, green, blue and alpha parameters should be in the range of 0 to 1.
The default cls color is black. |
| Function SetColor(r:Float, g:Float, b:Float, a:Float) | |
| Description | Set current color. |
| Information | The SetColor command affects the color of Plot, DrawRect, DrawLine, DrawText,
DrawImage and DrawPoly.
The red, green, blue and alpha parameters should be in the range of 0 to 1. |
| Function SetFont(font:TFont = Null) | |
| Description | Set current image font. |
| Information | 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.
Use SetImageFont Nullto select the default, built-in font. |
| Function SetImageHandle(image:TImage, x:Float, y:Float) | |
| Description | Установить точку центра |
| Information | Точка цента отнимается от координат отрисавки изображения DrawImage перед вращением и мастабированием. |
| Function SetLineWidth(width:Float) | |
| Description | Sets pixel width of lines drawn with the DrawLine command. |
| Function SetViewport(x:Int, y:Int, width:Int, height:Int) | |
| Description | Set drawing viewport. |
| Information | The current ViewPort defines an area within the back buffer that all drawing is clipped to. Any regions of a DrawCommand that fall outside the current ViewPort are not drawn. |
| Function TextHeight:Int(txt:String) | |
| Returns | the height, in pixels, of text based on the current image font. |
| Description | Получить высоту текста |
| Information | This command is useful for calculating vertical alignment of text when using the DrawText command. |
| Function TextWidth:Int(txt:String) | |
| Returns | the width, in pixels, of text based on the current image font. |
| Description | Получить ширину текста |
| Information | This command is useful for calculating horizontal alignment of text when using the DrawText command. |
| Function TileImage(image:TImage, width:Float, height:Float, frame:Int = 0) | |
| Description | Draw an image in a tiled pattern. |
| Information | TileImage draws an image in a repeating, tiled pattern, filling the current viewport. |
| Function Translate(x:Float, y:Float) | |
| Description | Перенести матрицу. |
| Function UpdateEmitter(emitter:TEmitter, dt:Float = 1.0) | |
| Returns | An image object. |
| Description | Load a multi-frame image. |
| Information | LoadAnimImage extracts multiple image frames from a single, larger image. url can be either a string or an
existing pixmap.
See LoadImage for valid flags values. |
| Type TEmitter Extends TImage Abstract | |
| Description | Источник частиц |
| Methods Summary | |
|---|---|
| SetEmission | Источник частиц |
| SetIndepend | Источник частиц |
| SetLifeTime | Источник частиц |
| Method SetEmission(emission:Int) Abstract ' parts/sec | |
| Description | Источник частиц |
| Method SetIndepend(enable:Int = True) Abstract | |
| Description | Источник частиц |
| Method SetLifeTime(time:Float, spread:Float = 0.0) Abstract ' particle lifetime +\- spread | |
| Description | Источник частиц |
| Type TFont Extends TImage Abstract | |
| Description | Графический шрифт |
| Methods Summary | |
|---|---|
| SetCharKerning | Установить растояние между символами |
| SetCharRect | Установить координаты на текстуре для символа |
| SetLineKerning | Установить растояние между строками |
| Method SetCharKerning(kerning:Float) Abstract | |
| Description | Установить растояние между символами |
| Method SetCharRect(char:Byte, x:Int, y:Int, w:Int, h:Int) Abstract | |
| Description | Установить координаты на текстуре для символа |
| Method SetLineKerning(kerning:Float) Abstract | |
| Description | Установить растояние между строками |
| Type TFontLoader Abstract | |
| Description | Загрузчик графического шрифта |
| Methods Summary | |
|---|---|
| Load | Функция загрузки графического шрифта |
| Method Load:Byte(font:TFont, stream:TStream) Abstract | |
| Description | Функция загрузки графического шрифта |
| Information | Если загрузка шрифта прошла успешно, функция должна вернуть True. |
| Type TImage Abstract | |
| Description | Класс изображений |
| Methods Summary | |
|---|---|
| Height | Получить высоту изображения |
| PositionTexture | Установить позицию текстуры изображения |
| ScaleTexture | Установить масштаб текстуры изображения |
| SetHandle | Установить точку центра |
| Width | Получить ширину изображения |
| Method Height:Int() Abstract | |
| Returns | Ширина в пикселях |
| Description | Получить высоту изображения |
| Method PositionTexture(u:Float = 0.0, v:Float = 0.0) Abstract | |
| Description | Установить позицию текстуры изображения |
| Method ScaleTexture(u:Float = 1.0, v:Float = 1.0) Abstract | |
| Description | Установить масштаб текстуры изображения |
| Method SetHandle(x:Float, y:Float) Abstract | |
| Description | Установить точку центра |
| Information | Точка цента отнимается от координат отрисавки изображения DrawImage перед вращением и мастабированием. |
| Method Width:Int() Abstract | |
| Returns | Ширина в пикселях |
| Description | Получить ширину изображения |