geBitmap

From GriffinEngine
Jump to: navigation, search

Usage

Store an image as a bitmap in memory.

Inheritance

Base classes

Reference

Constructors

  •  geBitmap()
  •  geBitmap( string fileName )
  •  geBitmap( const geBitmap &original )
  •  geBitmap( UINT nwidth, UINT nheight, UINT nformat )
  •  geBitmap( UINT nwidth, UINT nheight, UINT nformat, const BYTE *data )

Accessors

  •  virtual int getID(){ return 0x0310; }
  •  virtual string getName() const;
  •  UINT getWidth() const
  •  UINT getHeight() const
  •  UINT getFormat() const
  •  UINT getBpp() const
  •  size_t getSize() const
  •  const BYTE* getPointer() const

Reading individual pixels

  •  color get( int x, int y ) const
  •  BYTE getR( int x, int y ) const
  •  BYTE getG( int x, int y ) const
  •  BYTE getB( int x, int y ) const
  •  BYTE getA( int x, int y ) const

Writing individual pixels

  •  void set( int x, int y, color val )
  •  void setR( int x, int y, BYTE val )
  •  void setG( int x, int y, BYTE val )
  •  void setB( int x, int y, BYTE val )
  •  void setA( int x, int y, BYTE val )
  •  void set( int x, int y, BYTE r, BYTE g, BYTE b )
  •  void set( int x, int y, BYTE r, BYTE g, BYTE b, BYTE a )

Methods

  •  bool isLoaded() const
  •  static UINT WhatFormat( UINT bpp )
  •  static UINT WhatBpp( UINT format )
  •  static list<geBoundingBox*>* getWalls(geBitmap* heightmap);
Method for generating maze from bitmap
  •  static list<geBoundingBox*>* getWalls(geBitmap* heightmap,float size);
This one lets you pick the length and width of each bitmap
  •  void Dump() const