#include <charLayout.h>
Public Types | |
typedef pvector< CharPlacement > | Placements |
Public Member Functions | |
void | reset (int working_xsize, int working_ysize, int working_buffer_pixels) |
Removes all the characters already placed on the layout, and resets the parameters for a new attempt. | |
bool | place_character (const CharBitmap *bm) |
Given a character bitmap and font metrics extracted from the pk file, find a place for it on the layout. | |
Public Attributes | |
Placements | _placements |
int | _working_xsize |
int | _working_ysize |
int | _working_buffer_pixels |
int | _cx |
int | _cy |
int | _nexty |
Private Member Functions | |
bool | find_hole (int &x, int &y, int x_size, int y_size) const |
Searches for a hole of at least x_size by y_size pixels somewhere within the layout. | |
const CharPlacement * | find_overlap (int x, int y, int x_size, int y_size) const |
If the rectangle whose top left corner is x, y and whose size is x_size, y_size describes an empty hole that does not overlap any placed chars, returns NULL; otherwise, returns the first placed texture that the image does overlap. |
Either all characters fit or they don't.
Definition at line 44 of file charLayout.h.
|
Definition at line 51 of file charLayout.h. |
|
Searches for a hole of at least x_size by y_size pixels somewhere within the layout. If a suitable hole is found, sets x and y to the top left corner and returns true; otherwise, returns false. Definition at line 93 of file charLayout.cxx. References x. |
|
If the rectangle whose top left corner is x, y and whose size is x_size, y_size describes an empty hole that does not overlap any placed chars, returns NULL; otherwise, returns the first placed texture that the image does overlap. It is assumed the rectangle lies completely within the boundaries of the image itself. Definition at line 145 of file charLayout.cxx. Referenced by place_character(). |
|
Given a character bitmap and font metrics extracted from the pk file, find a place for it on the layout. Returns true if the character was placed, false if we ran out of room. Definition at line 65 of file charLayout.cxx. References CharPlacement::_height, CharPlacement::_width, _working_buffer_pixels, _working_xsize, _working_ysize, CharPlacement::_x, CharPlacement::_y, find_overlap(), NULL, x, and y. |
|
Removes all the characters already placed on the layout, and resets the parameters for a new attempt.
Definition at line 38 of file charLayout.cxx. |
|
Definition at line 56 of file charLayout.h. |
|
Definition at line 56 of file charLayout.h. |
|
Definition at line 56 of file charLayout.h. |
|
Definition at line 52 of file charLayout.h. |
|
Definition at line 55 of file charLayout.h. Referenced by place_character(). |
|
Definition at line 54 of file charLayout.h. Referenced by place_character(). |
|
Definition at line 54 of file charLayout.h. Referenced by place_character(). |