#include <Bitmap.h>
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) |
BitmapUpdate * | operator- (const Bitmap &bitmap) const |
bool | updateBitmap (BitmapUpdate *update, bool takeData) |
BitmapUpdate * | runLengthEncode () const |
BitmapUpdate * | runLengthDestructiveEncode () const |
Object * | clone () 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) |
Bitmap * | getCopy (const Box &box) |
bool | canBeResizedTo (int width, int height) |
Bitmap * | getResizedCopy (int w, int h, bool proportional) |
Bitmap * | getResizedCopy (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) |
BitmapUpdate * | getCompressedUpdate (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) |
HTMLPage * | toHTMLBitmap () |
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) |
Definition at line 128 of file Bitmap.h.
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.
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] |
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.
Definition at line 643 of file Bitmap.cpp.
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.
Definition at line 731 of file Bitmap.cpp.
Definition at line 1178 of file Bitmap.cpp.
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.
Definition at line 1395 of file Bitmap.cpp.
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.
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 | ) |
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] |
char * cmlabs::Bitmap::toBitmapFileFormat | ( | int & | len | ) |
Definition at line 1893 of file Bitmap.cpp.
JString cmlabs::Bitmap::toHTML | ( | ) | [virtual] |
JString cmlabs::Bitmap::toXML | ( | ) | [virtual] |
bool cmlabs::Bitmap::fromXML | ( | XMLNode * | node | ) | [virtual] |