|
BurgerLib
|
Integer 2D coordinate. More...
#include <lrrect.h>
Public Member Functions | |
| BURGER_INLINE int | GetX (void) const |
| Retrieve the X coordinate. | |
| BURGER_INLINE int | GetY (void) const |
| Retrieve the Y coordinate. | |
| BURGER_INLINE int * | GetXPtr (void) |
| Retrieve the pointer to the X coordinate. | |
| BURGER_INLINE int * | GetYPtr (void) |
| Retrieve the pointer to the Y coordinate. | |
| BURGER_INLINE void | SetX (int iX) |
| Set the X coordinate. | |
| BURGER_INLINE void | SetY (int iY) |
| Set the Y coordinate. | |
| BURGER_INLINE void | Set (int iX, int iY) |
| Set the X and Y coordinates. | |
| BURGER_INLINE void | Clear (void) |
| Set the X and Y coordinates to zero. | |
| Word | Read (FILE *fp) |
| Read a point from a file. | |
| Word | Write (FILE *fp) |
| Write a point to a file. | |
| void | Get (struct Point *pOutput) |
| Convert a Burger::Point2D_t into a MacOS Point structure. | |
| void | Set (const struct Point *pInput) |
| Convert a MacOS Point structure into a Burger::Point2D_t. | |
Public Attributes | |
| int | m_iX |
| X coordinate of the point. | |
| int | m_iY |
| Y coordinate of the point. | |
Integer 2D coordinate.
Simple container structure that holds an X and a Y coordinate with integer precision.
| Burger::Point2D_t::Clear | ( | void | ) | [inline] |
Set the X and Y coordinates to zero.
This inline function sets the X and Y coordinates for the point to zero, effectively initializing the structure
| void Burger::Point2D_t::Get | ( | struct Point * | pOutput | ) |
Convert a Burger::Point2D_t into a MacOS Point structure.
Converts the contents of a Burger::Point2D_t into a MacOS/Quicktime for Windows Point structure. Since it's converting an int into a short, data loss could occur if the values exceed 32767 or are less than -32768.
| pOutput | Pointer to an uninitialized MacOS Point structure. |
| Burger::Point2D_t::GetX | ( | void | ) | const [inline] |
Retrieve the X coordinate.
| Burger::Point2D_t::GetXPtr | ( | void | ) | [inline] |
Retrieve the pointer to the X coordinate.
| Burger::Point2D_t::GetY | ( | void | ) | const [inline] |
Retrieve the Y coordinate.
| Burger::Point2D_t::GetYPtr | ( | void | ) | [inline] |
Retrieve the pointer to the Y coordinate.
| Word Burger::Point2D_t::Read | ( | FILE * | fp | ) |
Read a point from a file.
Read two sixteen bit integers in Little Endian format from an open binary file and store the values as the new X and Y coordinates.
| Burger::Point2D_t::Set | ( | int | iX, |
| int | iY | ||
| ) | [inline] |
Set the X and Y coordinates.
This inline function sets the X and Y coordinates for the point, effectively initializing the structure
| iX | The new X coordinate for the point |
| iY | The new Y coordinate for the point |
| void Burger::Point2D_t::Set | ( | const struct Point * | pInput | ) |
Convert a MacOS Point structure into a Burger::Point2D_t.
Converts the contents of a MacOS/Quicktime for Windows Point structure into a Burger::Point2D_t. Since it's converting a short to an int, no data loss will occur.
| pInput | Pointer to a valid MacOS Point structure. |
| Burger::Point2D_t::SetX | ( | int | iX | ) | [inline] |
Set the X coordinate.
This inline function sets the X coordinate for the point
| iX | The new X coordinate for the point |
| Burger::Point2D_t::SetY | ( | int | iY | ) | [inline] |
Set the Y coordinate.
This inline function sets the Y coordinate for the point
| iY | The new Y coordinate for the point |
| Word Burger::Point2D_t::Write | ( | FILE * | fp | ) |
Write a point to a file.
Write the X and Y coordinates to a FILE stream as two sixteen bit little endian integers.
X coordinate of the point.
Y coordinate of the point.
1.8.0