graphics/ | |
License | Copyright © 2007-2011, FreeBASIC Extended Library Development Group |
ext.gfx | |
Image | Provides a New-able FB.IMAGE replacement with built-in memory management and convenience functions while maintaining compatibility with current fbgfx functions including ImageInfo. |
Functions | |
constructor | Constructs a blank image with the dimensions and color requested. |
constructor | Constructs an Image with an external FB.IMAGE. |
copy constructor | Takes over responsibility for an FB.IMAGE from the passed Image. |
default constructor | Constructs an invalid Image. |
setImage | Sets the image to handle, freeing the current image if necessary. |
height | Returns the height of the image. |
width | Returns the width of the image. |
pitch | Returns the pitch of the image. |
bpp | Returns the bits per pixel of the image. |
Display | Copies the image data to a buffer. |
Display | Copies the image data to a buffer. |
Display | Copies the image data to the screen. |
Display | Copies the image data to the screen. |
Pixels | Used to access the raw pixels of the underlying image. |
Copyright © 2007-2011, FreeBASIC Extended Library Development Group
Distributed under the FreeBASIC Extended Library Group license. See accompanying file LICENSE.txt or copy at http://code.google.com
Provides a New-able FB.IMAGE replacement with built-in memory management and convenience functions while maintaining compatibility with current fbgfx functions including ImageInfo.
Functions | |
constructor | Constructs a blank image with the dimensions and color requested. |
constructor | Constructs an Image with an external FB.IMAGE. |
copy constructor | Takes over responsibility for an FB.IMAGE from the passed Image. |
default constructor | Constructs an invalid Image. |
setImage | Sets the image to handle, freeing the current image if necessary. |
height | Returns the height of the image. |
width | Returns the width of the image. |
pitch | Returns the pitch of the image. |
bpp | Returns the bits per pixel of the image. |
Display | Copies the image data to a buffer. |
Display | Copies the image data to a buffer. |
Display | Copies the image data to the screen. |
Display | Copies the image data to the screen. |
Pixels | Used to access the raw pixels of the underlying image. |
declare constructor( byval w_ as uinteger, byval h_ as uinteger, byval def_color as uinteger = RGBA(255,0,255,255) )
Constructs a blank image with the dimensions and color requested.
w_ | the desired width of the image. |
h_ | the desired height of the image. |
def_color | the desired default color of the image. Defaults to RGBA(255,0,255,255) |
declare sub Display overload( byval _dest_ as FB. IMAGE ptr, byval _x_ as integer, byval _y_ as integer, byval _method_ as ext.gfx.DrawMethods = XOR_, byval _al as integer = 0 )
Copies the image data to a buffer. Equivalent to fbgfx’s put command.
_dest_ | FB.IMAGE ptr to destination buffer. |
_x_ | The X position to draw image at. |
_y_ | The Y position to draw image at. |
_method_ | The method to use to draw the image, one of DrawMethods. |
_al | Optional value to use with the Alpha_ draw method, defaults to 0. |
declare sub Display( byval _dest_ as FB. IMAGE ptr, byref _pos as const ext.math.vec2i, byval _method_ as ext.gfx.DrawMethods = XOR_, byval _al as integer = 0 )
Copies the image data to a buffer. Equivalent to fbgfx’s put command.
_dest_ | FB.IMAGE ptr to destination buffer. |
_pos | position to draw image at. |
_method_ | The method to use to draw the image, one of DrawMethods. |
_al | Optional value to use with the Alpha_ draw method, defaults to 0. |
declare sub Display( byval _x_ as integer, byval _y_ as integer, byval _method_ as ext.gfx.DrawMethods = XOR_, byval _al as integer = 0 )
Copies the image data to the screen. Equivalent to fbgfx’s put command.
_x_ | The X position to draw image at. |
_y_ | The Y position to draw image at. |
_method_ | The method to use to draw the image, one of DrawMethods. |
_al | Optional value to use with the Alpha_ draw method, defaults to 0. |
declare sub Display( byref _pos as const ext.math.vec2i, byval _method_ as ext.gfx.DrawMethods = XOR_, byval _al as integer = 0 )
Copies the image data to the screen. Equivalent to fbgfx’s put command.
_pos | position to draw image at. |
_method_ | The method to use to draw the image, one of DrawMethods. |
_al | Optional value to use with the Alpha_ draw method, defaults to 0. |
Constructs a blank image with the dimensions and color requested.
declare constructor( byval w_ as uinteger, byval h_ as uinteger, byval def_color as uinteger = RGBA(255,0,255,255) )
Sets the image to handle, freeing the current image if necessary.
declare sub setImage( byval _x_ as FB. IMAGE ptr )
Returns the height of the image.
declare function height( ) as ext.SizeType
Returns the width of the image.
declare function width( ) as ext.SizeType
Returns the pitch of the image.
declare function pitch( ) as ext.SizeType
Returns the bits per pixel of the image.
declare function bpp( ) as ext.SizeType
Copies the image data to a buffer.
declare sub Display overload( byval _dest_ as FB. IMAGE ptr, byval _x_ as integer, byval _y_ as integer, byval _method_ as ext.gfx.DrawMethods = XOR_, byval _al as integer = 0 )
Used to access the raw pixels of the underlying image.
declare function Pixels( byref num_pixels as uinteger = 0 ) as uinteger ptr