Functions | |
void | Edit_Image (HC_KEY key, int xoffset, int yoffset, int xcount, int ycount, const void *data) |
void | Edit_Image_Options (HC_KEY image_key, char const *options) |
void Edit_Image | ( | HC_KEY | key, | |
int | xoffset, | |||
int | yoffset, | |||
int | xcount, | |||
int | ycount, | |||
const void * | data | |||
) |
Modifies one, some, or all the pixel values in a previously-inserted image.
key | - The numeric identifier returned by a previous call to Insert_Image() or Insert_Image_By_Ref() . | |
xoffset | - X offset, in pixels, from the upper-left corner of the original image at which to begin editing. The upper-left-most original pixel is numbered (0, 0). Values increase going right and going down. | |
yoffset | - Y offset, in pixels, from the upper-left corner of the original image at which to begin editing. The upper-left-most original pixel is numbered (0, 0). Values increase going right and going down. | |
xcount | - The number of columns of pixels to be changed, going down. The count, together with the offset, represents a rectangular change region within the original image. | |
ycount | - The number of number of rows of pixels to be changed, going to the right. The count, together with the offset, represent a rectangular change region within the original image. | |
data | - The new pixel values to be used, encoded in the same format as when the image was created. The first group of values in data is the upper-left-most of the change region; the next group is just to its right, etc. Passed by reference always. |
Edit_Image() operates on a rectangular sub-region of the original image, and replaces all the pixel values in that region with new ones. If the original image was specified "by reference", and the system did not copy it, Edit_Image() modifies the actual original user memory locations.
void Edit_Image_Options | ( | HC_KEY | image_key, | |
char const * | options | |||
) |
Modifies the the options associated with a specific image.
image_key | - The numeric identifier of an image, returned by a previous call to Insert_Image() or Insert_Image_By_Ref(). | |
options | - Comma separated list of new options. |
name = <string>
This name will be used to create a texture with the options specified in 'texture options'. Providing no texture option string will mean that a texture is then created with default texture options.
[no] down-sample [= on | off]
If this is set, images will have a bilinear filter applied to them. This typically makes images look smoother, especially if zoomed upon. However, if there are hard edges (e.g. a checker board) it can make the image look unnecessarily blurry. Default = "down-sample"
size = ((float) width units, (float) height units) size = <float> units
Scale for an image where units is either "oru", "sru" or "pixels". "size = <float> units" will preserve aspect ratio.
[no] local [= on | off]
If set, the implicit texture created will be local to the currently open segment. Default = "no local".
texture options = (...)
Options for the implicit texture created for the image. See Define_Texture() for the list of recognized options. The texture options will merge with any existing texture options.