public: |
public: |
int getWidth() const { return width; } |
int getWidth() const { return width; } |
int getHeight() const { return height; } |
int getHeight() const { return height; } |
|
int getSize() const { return width*height; } |
|
int getPixelSize() const { return pixels.size(); } |
BitmapFont(){} |
BitmapFont(){} |
BitmapFont(const BitmapFont& b){ |
BitmapFont(const BitmapFont& b){ |
width=b.width; |
width=b.width; |
} |
} |
return bitmap[y*width+x]; |
return bitmap[y*width+x]; |
} |
} |
int getIndex(const pixel &px){ |
int getIndex(const pixel &px) const{ |
vector<pixel>::iterator it=find(pixels.begin(),pixels.end(),px); |
vector<pixel>::const_iterator it=find(pixels.begin(),pixels.end(),px); |
if(it!=pixels.end()){ |
if(it!=pixels.end()){ |
return it-pixels.begin(); |
return it-pixels.begin(); |
} |
} |