cmlabs::Bitmap Class Reference

#include <Bitmap.h>

Inheritance diagram for cmlabs::Bitmap:

Inheritance graph
[legend]
Collaboration diagram for cmlabs::Bitmap:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Bitmap ()
 Bitmap (int w, int h)
 Bitmap (char *imgData, int w, int h, bool takeData=false)
 Bitmap (const JString &filename)
 Bitmap (BitmapUpdate *update)
virtual ~Bitmap ()
bool init (int w, int h)
BitmapUpdateoperator- (const Bitmap &bitmap) const
bool updateBitmap (BitmapUpdate *update, bool takeData)
BitmapUpdaterunLengthEncode () const
BitmapUpdaterunLengthDestructiveEncode () const
Objectclone () const
bool reset ()
bool setPixel (int x, int y, int red, int green, int blue, int alpha=0)
bool setPixel (long pos, int red, int green, int blue, int alpha=0)
bool setPixelXOR (int x, int y, int red, int green, int blue, int alpha=0)
bool setPixelXOR (long pos, int red, int green, int blue, int alpha=0)
Pixel getPixel (int x, int y)
bool getPixel (Pixel *pixel)
long getPos (int x, int y)
double getDPos (double x, double y)
Pixel getXY (long pos)
Color getPixelColor (int x, int y)
bool eraseBitmap ()
bool eraseBitmap (int r, int g, int b, int a=0)
bool eraseBitmap (const Color &color)
bool replaceColor (const Color &oldColor, const Color &newColor)
bool fillBox (const Box &box, const Color &color)
bool fillBox (int x, int y, int w, int h, const Color &color)
bool putTransPixel (int x, int y, const Color &color, double weight)
bool drawLine (const Line &line, const Color &color)
bool drawLine (const PolyLine &polyline, const Color &color)
bool drawBox (const Box &box, const Color &color)
bool drawCircle (int xCenter, int yCenter, int radius, const Color &color, double weight, double lineWidth, bool filled=false)
bool putQuadPixel (int xCenter, int yCenter, int x, int y, const Color &color, double weight)
bool drawBitmap (Bitmap *bitmap, int x, int y)
bool drawBitmap (Bitmap *bitmap, int x, int y, int w, int h)
bool drawBitmap (Bitmap *bitmap, const Point &p)
bool drawBitmap (Bitmap *bitmap, const Box &box)
bool drawBitmap (Bitmap *bitmap, int srcx, int srcy, int dstx, int dsty, int w, int h)
BitmapgetCopy (const Box &box)
bool canBeResizedTo (int width, int height)
BitmapgetResizedCopy (int w, int h, bool proportional)
BitmapgetResizedCopy (double scale)
bool resizeTo (int w, int h, bool proportional)
bool copyDataFromBitmap (Bitmap *bitmap, bool shouldResize=false)
bool takeDataFromBitmap (Bitmap *bitmap)
double getBestResizeFactor (double factor)
double getBestResizeFactors (double factor, int &scaleUp, int &scaleDown, int &scale66)
char * createResizedData (int newWidth, int newHeight, int scaleUp, int scaleDown, int scale66)
bool shape (int x1, int y1, int x2, int y2, int x3, int y3)
bool shapeSlow (int x1, int y1, int x2, int y2, int x3, int y3)
bool rotate (double angle)
bool rotateSlow (double angle)
bool readFromFile (const JString &filename)
bool saveToFile (const JString &filename)
BitmapUpdategetCompressedUpdate (bool destructive) const
char * getGrayScaleDataCopy (int &len)
bool copyGrayScaleData (char *src, int len)
int getMaxUpdates ()
bool setMaxUpdates (int max)
bool resetBitmapUpdates ()
bool setBitmapUpdated ()
bool addBitmapUpdateRegion (const Box &updateBox)
bool addBitmapUpdateRegion (Box *box)
bool hasBitmapBeenUpdated ()
bool hasBitmapBeenTotallyChanged ()
int round (double d)
HTMLPagetoHTMLBitmap ()
char * toBitmapFileFormat (int &len)
JString toHTML ()
JString toXML ()
bool fromXML (XMLNode *node)

Static Public Member Functions

static bool convertBitmapFileData (char *src, int width, int height, int depth, char *dst, long dstlen)
static char * convertBitmapFileDataRunLength (char *src, int width, int height, int depth, long &dstlen)
static char * differenceBitmapFileData (char *orig, char *src, int width, int height, int depth, long &dstlen)
static char * differenceBitmapFileDataRunLength (char *orig, char *src, int width, int height, int depth, long &dstlen)


Detailed Description

Definition at line 128 of file Bitmap.h.


Constructor & Destructor Documentation

cmlabs::Bitmap::Bitmap (  ) 

Definition at line 40 of file Bitmap.cpp.

cmlabs::Bitmap::Bitmap ( int  w,
int  h 
)

Definition at line 51 of file Bitmap.cpp.

cmlabs::Bitmap::Bitmap ( char *  imgData,
int  w,
int  h,
bool  takeData = false 
)

Definition at line 55 of file Bitmap.cpp.

cmlabs::Bitmap::Bitmap ( const JString filename  ) 

Definition at line 44 of file Bitmap.cpp.

cmlabs::Bitmap::Bitmap ( BitmapUpdate update  ) 

Definition at line 88 of file Bitmap.cpp.

cmlabs::Bitmap::~Bitmap (  )  [virtual]

Definition at line 84 of file Bitmap.cpp.


Member Function Documentation

bool cmlabs::Bitmap::init ( int  w,
int  h 
)

Definition at line 116 of file Bitmap.cpp.

BitmapUpdate * cmlabs::Bitmap::operator- ( const Bitmap bitmap  )  const

Definition at line 2470 of file Bitmap.cpp.

bool cmlabs::Bitmap::updateBitmap ( BitmapUpdate update,
bool  takeData 
)

Definition at line 275 of file Bitmap.cpp.

BitmapUpdate * cmlabs::Bitmap::runLengthEncode (  )  const

Definition at line 2603 of file Bitmap.cpp.

BitmapUpdate * cmlabs::Bitmap::runLengthDestructiveEncode (  )  const

Definition at line 2683 of file Bitmap.cpp.

Object * cmlabs::Bitmap::clone (  )  const [virtual]

Reimplemented from cmlabs::DataSample.

Definition at line 70 of file Bitmap.cpp.

bool cmlabs::Bitmap::reset (  ) 

Definition at line 217 of file Bitmap.cpp.

bool cmlabs::Bitmap::setPixel ( int  x,
int  y,
int  red,
int  green,
int  blue,
int  alpha = 0 
)

Definition at line 503 of file Bitmap.cpp.

bool cmlabs::Bitmap::setPixel ( long  pos,
int  red,
int  green,
int  blue,
int  alpha = 0 
)

Definition at line 515 of file Bitmap.cpp.

bool cmlabs::Bitmap::setPixelXOR ( int  x,
int  y,
int  red,
int  green,
int  blue,
int  alpha = 0 
)

Definition at line 528 of file Bitmap.cpp.

bool cmlabs::Bitmap::setPixelXOR ( long  pos,
int  red,
int  green,
int  blue,
int  alpha = 0 
)

Definition at line 540 of file Bitmap.cpp.

Pixel cmlabs::Bitmap::getPixel ( int  x,
int  y 
)

Definition at line 553 of file Bitmap.cpp.

bool cmlabs::Bitmap::getPixel ( Pixel pixel  ) 

Definition at line 562 of file Bitmap.cpp.

long cmlabs::Bitmap::getPos ( int  x,
int  y 
)

Definition at line 572 of file Bitmap.cpp.

double cmlabs::Bitmap::getDPos ( double  x,
double  y 
)

Definition at line 578 of file Bitmap.cpp.

Pixel cmlabs::Bitmap::getXY ( long  pos  ) 

Definition at line 584 of file Bitmap.cpp.

Color cmlabs::Bitmap::getPixelColor ( int  x,
int  y 
)

Definition at line 707 of file Bitmap.cpp.

bool cmlabs::Bitmap::eraseBitmap (  ) 

Definition at line 604 of file Bitmap.cpp.

bool cmlabs::Bitmap::eraseBitmap ( int  r,
int  g,
int  b,
int  a = 0 
)

Definition at line 608 of file Bitmap.cpp.

bool cmlabs::Bitmap::eraseBitmap ( const Color color  ) 

Definition at line 639 of file Bitmap.cpp.

bool cmlabs::Bitmap::replaceColor ( const Color oldColor,
const Color newColor 
)

Definition at line 643 of file Bitmap.cpp.

bool cmlabs::Bitmap::fillBox ( const Box box,
const Color color 
)

Definition at line 662 of file Bitmap.cpp.

bool cmlabs::Bitmap::fillBox ( int  x,
int  y,
int  w,
int  h,
const Color color 
)

Definition at line 666 of file Bitmap.cpp.

bool cmlabs::Bitmap::putTransPixel ( int  x,
int  y,
const Color color,
double  weight 
)

Definition at line 721 of file Bitmap.cpp.

bool cmlabs::Bitmap::drawLine ( const Line line,
const Color color 
)

Definition at line 731 of file Bitmap.cpp.

bool cmlabs::Bitmap::drawLine ( const PolyLine polyline,
const Color color 
)

Definition at line 1178 of file Bitmap.cpp.

bool cmlabs::Bitmap::drawBox ( const Box box,
const Color color 
)

Definition at line 1186 of file Bitmap.cpp.

bool cmlabs::Bitmap::drawCircle ( int  xCenter,
int  yCenter,
int  radius,
const Color color,
double  weight,
double  lineWidth,
bool  filled = false 
)

Definition at line 1214 of file Bitmap.cpp.

bool cmlabs::Bitmap::putQuadPixel ( int  xCenter,
int  yCenter,
int  x,
int  y,
const Color color,
double  weight 
)

Definition at line 1201 of file Bitmap.cpp.

bool cmlabs::Bitmap::drawBitmap ( Bitmap bitmap,
int  x,
int  y 
)

Definition at line 1343 of file Bitmap.cpp.

bool cmlabs::Bitmap::drawBitmap ( Bitmap bitmap,
int  x,
int  y,
int  w,
int  h 
)

Definition at line 1350 of file Bitmap.cpp.

bool cmlabs::Bitmap::drawBitmap ( Bitmap bitmap,
const Point p 
)

Definition at line 1395 of file Bitmap.cpp.

bool cmlabs::Bitmap::drawBitmap ( Bitmap bitmap,
const Box box 
)

Definition at line 1399 of file Bitmap.cpp.

bool cmlabs::Bitmap::drawBitmap ( Bitmap bitmap,
int  srcx,
int  srcy,
int  dstx,
int  dsty,
int  w,
int  h 
)

Definition at line 1290 of file Bitmap.cpp.

Bitmap * cmlabs::Bitmap::getCopy ( const Box box  ) 

Definition at line 226 of file Bitmap.cpp.

bool cmlabs::Bitmap::canBeResizedTo ( int  width,
int  height 
)

Definition at line 825 of file Bitmap.cpp.

Bitmap * cmlabs::Bitmap::getResizedCopy ( int  w,
int  h,
bool  proportional 
)

Definition at line 894 of file Bitmap.cpp.

Bitmap * cmlabs::Bitmap::getResizedCopy ( double  scale  ) 

Definition at line 865 of file Bitmap.cpp.

bool cmlabs::Bitmap::resizeTo ( int  w,
int  h,
bool  proportional 
)

Definition at line 906 of file Bitmap.cpp.

bool cmlabs::Bitmap::copyDataFromBitmap ( Bitmap bitmap,
bool  shouldResize = false 
)

Definition at line 1034 of file Bitmap.cpp.

bool cmlabs::Bitmap::takeDataFromBitmap ( Bitmap bitmap  ) 

Definition at line 1066 of file Bitmap.cpp.

double cmlabs::Bitmap::getBestResizeFactor ( double  factor  ) 

Definition at line 967 of file Bitmap.cpp.

double cmlabs::Bitmap::getBestResizeFactors ( double  factor,
int &  scaleUp,
int &  scaleDown,
int &  scale66 
)

Definition at line 915 of file Bitmap.cpp.

char * cmlabs::Bitmap::createResizedData ( int  newWidth,
int  newHeight,
int  scaleUp,
int  scaleDown,
int  scale66 
)

Definition at line 978 of file Bitmap.cpp.

bool cmlabs::Bitmap::shape ( int  x1,
int  y1,
int  x2,
int  y2,
int  x3,
int  y3 
)

bool cmlabs::Bitmap::shapeSlow ( int  x1,
int  y1,
int  x2,
int  y2,
int  x3,
int  y3 
)

bool cmlabs::Bitmap::rotate ( double  angle  ) 

bool cmlabs::Bitmap::rotateSlow ( double  angle  ) 

bool cmlabs::Bitmap::readFromFile ( const JString filename  ) 

Reimplemented from cmlabs::DataSample.

Definition at line 1691 of file Bitmap.cpp.

bool cmlabs::Bitmap::saveToFile ( const JString filename  ) 

Definition at line 1784 of file Bitmap.cpp.

bool cmlabs::Bitmap::convertBitmapFileData ( char *  src,
int  width,
int  height,
int  depth,
char *  dst,
long  dstlen 
) [static]

Definition at line 2041 of file Bitmap.cpp.

char * cmlabs::Bitmap::convertBitmapFileDataRunLength ( char *  src,
int  width,
int  height,
int  depth,
long &  dstlen 
) [static]

Definition at line 2065 of file Bitmap.cpp.

char * cmlabs::Bitmap::differenceBitmapFileData ( char *  orig,
char *  src,
int  width,
int  height,
int  depth,
long &  dstlen 
) [static]

Definition at line 2213 of file Bitmap.cpp.

char * cmlabs::Bitmap::differenceBitmapFileDataRunLength ( char *  orig,
char *  src,
int  width,
int  height,
int  depth,
long &  dstlen 
) [static]

Definition at line 2344 of file Bitmap.cpp.

BitmapUpdate * cmlabs::Bitmap::getCompressedUpdate ( bool  destructive  )  const

Definition at line 2462 of file Bitmap.cpp.

char * cmlabs::Bitmap::getGrayScaleDataCopy ( int &  len  ) 

Definition at line 248 of file Bitmap.cpp.

bool cmlabs::Bitmap::copyGrayScaleData ( char *  src,
int  len 
)

Definition at line 263 of file Bitmap.cpp.

int cmlabs::Bitmap::getMaxUpdates (  ) 

Definition at line 135 of file Bitmap.cpp.

bool cmlabs::Bitmap::setMaxUpdates ( int  max  ) 

Definition at line 139 of file Bitmap.cpp.

bool cmlabs::Bitmap::resetBitmapUpdates (  ) 

Definition at line 193 of file Bitmap.cpp.

bool cmlabs::Bitmap::setBitmapUpdated (  ) 

Definition at line 200 of file Bitmap.cpp.

bool cmlabs::Bitmap::addBitmapUpdateRegion ( const Box updateBox  ) 

Definition at line 150 of file Bitmap.cpp.

bool cmlabs::Bitmap::addBitmapUpdateRegion ( Box box  ) 

Definition at line 157 of file Bitmap.cpp.

bool cmlabs::Bitmap::hasBitmapBeenUpdated (  ) 

Definition at line 206 of file Bitmap.cpp.

bool cmlabs::Bitmap::hasBitmapBeenTotallyChanged (  ) 

Definition at line 210 of file Bitmap.cpp.

int cmlabs::Bitmap::round ( double  d  ) 

Definition at line 1966 of file Bitmap.cpp.

HTMLPage * cmlabs::Bitmap::toHTMLBitmap (  )  [virtual]

Reimplemented from cmlabs::DataSample.

Definition at line 1998 of file Bitmap.cpp.

char * cmlabs::Bitmap::toBitmapFileFormat ( int &  len  ) 

Definition at line 1893 of file Bitmap.cpp.

JString cmlabs::Bitmap::toHTML (  )  [virtual]

Reimplemented from cmlabs::DataSample.

Definition at line 2002 of file Bitmap.cpp.

JString cmlabs::Bitmap::toXML (  )  [virtual]

Reimplemented from cmlabs::DataSample.

Definition at line 2007 of file Bitmap.cpp.

bool cmlabs::Bitmap::fromXML ( XMLNode node  )  [virtual]

Reimplemented from cmlabs::DataSample.

Definition at line 2011 of file Bitmap.cpp.


The documentation for this class was generated from the following files:

Generated on Tue Jul 7 16:22:33 2009 for CoreLibrary by  doxygen 1.5.6