|
OldSchool Library
|
Macros | |
| #define | oslDrawImageXY(img, px, py) ({ (img)->x=(px), (img)->y=(py); oslDrawImage(img); }) |
| Draws an image at the specified position. | |
| #define | oslDrawImageSimpleXY(img, px, py) ({ (img)->x=(px), (img)->y=(py); oslDrawImageSimple(img); }) |
| Draws an image at the specified position (backward compatibility). | |
Functions | |
| void | oslDrawImage (OSL_IMAGE *img) |
| Draws an image at its current position. | |
| void | oslDrawImageSimple (OSL_IMAGE *img) |
| Draws an image at its current position (deprecated). | |
| void | oslDrawImageBig (OSL_IMAGE *img) |
| Draws a very large image. | |
Image support in OSLib.
| #define oslDrawImageXY | ( | img, | |
| px, | |||
| py | |||
| ) | ({ (img)->x=(px), (img)->y=(py); oslDrawImage(img); }) |
Draws an image at the specified position.
This macro sets the position of the image img to the coordinates (px, py) and then draws it using the oslDrawImage function.
| img | Pointer to the image to be drawn. |
| px | The x-coordinate where the image should be drawn. |
| py | The y-coordinate where the image should be drawn. |
oslDrawImage to render the image. | #define oslDrawImageSimpleXY | ( | img, | |
| px, | |||
| py | |||
| ) | ({ (img)->x=(px), (img)->y=(py); oslDrawImageSimple(img); }) |
Draws an image at the specified position (backward compatibility).
This macro is similar to oslDrawImageXY, but uses the oslDrawImageSimple function for drawing. It is kept for backward compatibility and is not recommended for new code.
| img | Pointer to the image to be drawn. |
| px | The x-coordinate where the image should be drawn. |
| py | The y-coordinate where the image should be drawn. |
oslDrawImageSimple, which is kept for compatibility but should be avoided in new code.
|
extern |
Draws an image at its current position.
This function renders the image specified by the img parameter at the position stored in the image's x and y attributes. The image must be properly initialized and loaded before calling this function.
| img | Pointer to the OSL_IMAGE structure representing the image to be drawn. |
x and y attributes, which should be set before drawing.
|
extern |
Draws an image at its current position (deprecated).
This function renders the image specified by the img parameter at the position stored in the image's x and y attributes. It is provided for backward compatibility with older code but should not be used in new code.
| img | Pointer to the OSL_IMAGE structure representing the image to be drawn. |
oslDrawImage instead. Ensure the image is properly initialized and its position is correctly set before calling this function.
|
extern |
Draws a very large image.
This function is designed to draw images larger than the standard 512x512 pixel limit. It provides a way to render images up to 1024 pixels in width, but comes with additional complexity and potentially significant performance drawbacks.
Texture wrapping (oslSetTextureWrap) is not supported. Make sure that offset coordinates are within the bounds of the image to avoid unpredictable results.
| img | Pointer to the OSL_IMAGE structure representing the image to be drawn. |
oslDrawImage for standard image drawing needs.