@DATABASE BitMap V1.10
$VER: PureBasic - BitMap library V1.10 (16.01.2000) © Fantaisie Software
@NODE MAIN "BitMap V1.10"

  @{b}PureBasic - BitMap library V1.10@{ub}

    'BitMap' are memory area used to store and later to display
    pictures or graphical objects. The 'BitMap' is so called a
    planar display as its a superposition of single 'BitPlanes'.
    Each 'BitPlanes' contain only 0 and 1 and more there is
    BitPlanes superposed and more you can have differents colours.
    It's the 'Depth' of the BitMap. For example, a BitMap of Depth
    '8' (8 bitplanes superposed) can have up to 2^8 colours or 256
    colours. Planar is the native Amiga display format.


  @{b}Commands summary:@{ub}

    @{" AllocateBitMap        " LINK AllocateBitMap}
    @{" AllocateLinearBitMap  " LINK AllocateLinearBitMap}
    @{" BitMapID              " LINK BitMapID}
    @{" BitMapRastPort        " LINK BitMapRastPort}
    @{" FreeBitMap            " LINK FreeBitMap}
    @{" InitBitMap            " LINK InitBitMap}
    @{" UseBitMap             " LINK UseBitMap}
    @{" ShowBitMap            " LINK ShowBitMap}

  @{b}Example:@{ub}

    @{"Double buffering " LINK "PureBasic:Examples/Sources/BitMap&Drawing.pb/Main"}

@ENDNODE


@NODE AllocateBitMap

    @{b}SYNTAX@{ub}
  BitMapID.l = AllocateBitMap(#BitMap, Width, Height, Depth)

    @{b}FUNCTION@{ub}
  Create a new BitMap object with given parameters. If the
  result is NULL, then there is not enough memory, so STOP
  your bitmap manipulations !

@ENDNODE


@NODE AllocateLinearBitMap

    @{b}SYNTAX@{ub}
  BitMapID.l = AllocateLinearBitMap(#BitMap, Width, Height, Depth)

    @{b}FUNCTION@{ub}
  Create a new BitMap object with given parameters. This bitmap is
  bit special, as all the planes are grouped into a single block
  of memory. This kind of BitMaps should be used only for
  ChunkyToPlanar conversion. It's not compatiable with graphic
  cards, so please use AllocateBitMap for standard programs.

  If the result is NULL, then there is not enough memory, so don't
  use it !

@ENDNODE


@NODE FreeBitMap

    @{b}SYNTAX@{ub}
  FreeBitMap(#BitMap)

    @{b}STATEMENT@{ub}
  Free the given BitMap object and release the previously allocated
  memory.

@ENDNODE


@NODE InitBitMap

    @{b}SYNTAX@{ub}
  result.l = InitBitMap(#NumBitMapMax)

    @{b}FUNCTION@{ub}
  Init all the BitMap environments for later  use.  You  must  put  this
  function at the top of  your  source code if you want to use the BitMap
  commands. 

  #NumBitMapMax : Maximum number of BitMaps to handle.

@ENDNODE


@NODE BitMapID

    @{b}SYNTAX@{ub}
  BitMapID.l = BitMapID()

    @{b}FUNCTION@{ub}
  Returns the BitMap pointer.

@ENDNODE


@NODE BitMapRastPort

    @{b}SYNTAX@{ub}
  RastPort.l = BitMapRastPort()

    @{b}FUNCTION@{ub}
  Returns the current BitMap's rastport. Needed to use the 2D Drawing
  functions available in the 2D Drawing library.

@ENDNODE


@NODE UseBitMap

    @{b}SYNTAX@{ub}
  UseBitMap(#BitMap)

    @{b}STATEMENT@{ub}
  Change the currently used BitMap to #BitMap.

@ENDNODE


@NODE ShowBitMap

    @{b}SYNTAX@{ub}
  ShowBitMap(#BitMap, ScreenID, x, y)

    @{b}STATEMENT@{ub}
  Display the given bitmap on the screen at position x, y. This function
  is 100% OS friendly and allows fast double-buffering. This function
  automatically handles a VWAIT, so there is no need to put one in your main
  loop.

  If you do a multitask game, don't forget to use the ProgramPriority() function
  to have a high priority, gaining much more cpu time.

@ENDNODE
