Sack Library Documentation
ContentsIndexReferenceHome
PreviousUpNext
Functions

The following table lists functions in this documentation.

 
Name 
Description 
 
Adds an image as a sub-image of another image. The image being added as a sub image must not already have a parent. Sub-images are like views into the parent, and share the same pixel buffer that the parent has. 
 
 
 
Blat is the sound a trumpet makes when it spews forth noise... so Blat color is just fill a rectangle with a color, quickly. Apply alpha transparency of the color specified. 
 
 
 
Copies an image from one image onto another. The copy is done directly and no scaling is applied. If a width or height larget than the image to copy is specified, only the amount of the image that is valid is copied. 
 
Copies some or all of an image to a destination image of specified width and height. This does linear interpolation scaling.

There are simple forms of this function as macros, since commonly you want to output the entire image, a macro which automatically sets (0,0),(width,height) as the source parameters to output the whole image exists. 
 
output a sprite at its current location 
 
Creates an image from user defined parts. The buffer used is from the user. This was used by the video library, but RemakeImage accomplishes this also. 
 
Decodes a block of memory into an image. This is used internally so, LoadImageFile() opens the file and reads it into a buffer, which it then passes to DecodeMemoryToImage(). Images stored in custom user structures may be passed for decoding also. 
 
Releases all resources for a Font
 
reset clip rectangle to the full image (subimage part ) Some operations (move, resize) will also reset the bound rect, this must be re-set afterwards. ALSO - one SHOULD be nice and reset the rectangle when done, otherwise other people may not have checked this. 
 
This function flips an image top to bottom. This if for building windows compatible images. Internally images are kept in platform-native direction. If an image is created from another source, this might be a method to flip the image top-to-bottom if required. 
 
Returns the alpha channel of the color 
 
Returns the blue channel of the color 
 
Returns the correct Font pointer to the default font. In all font functions, NULL may be used as the font, and this is the font that will be used. 
 
Returns the height of a font for purposes of spacing between lines. Characters may render outside of this height. 
 
This can be used to get the internal description of a font, which the user may then save, and use later to recreate the font the same way. 
 
Get the global font data structure. This is an internal structure, and it's definition may not be exported. Currently the definition is in documentation. 
 
Returns the green channel of the color 
 
User applications may use an aux rect attatched to an image. The 'Display' render library used this itself however, making this mostly an internal feature. 
 
Used as a proper accessor method to get an image's width and height. Decided to allow the image structure to be mostly public, so the first 4 members are the images x,y, width and height, and are immediately accessable by the Image pointer. 
 
Returns the pointer to the color buffer currently used internal to the image
 
This is function sack::image::GetImageTransformation. 
 
32 (*PutMenuStringFontEx) ( Image pImage, S_32 x, S_32 y, CDATA color, CDATA background, CTEXTSTR pc, _32 nLen, Font font ); 32 (*PutCStringFontEx) ( Image pImage, S_32 x, S_32 y, CDATA color, CDATA background, CTEXTSTR pc, _32 nLen, Font font ); 
 
Returns the red channel of the color 
 
 
 
Returns the approximate rectangle that would be used for a string. It only counts using the line measurement. Newlines in strings count to wrap text to subsequent lines and start recounting the width, returning the maximum length of string horizontally. 
 
direct hack for processing clipboard data... probably does some massaging of the databefore calling DecodeMemoryToImage 
 
Creates a font based on indexes from the internal font cache. This is used by the FontPicker dialog to choose a font. The data the dialog used to render the font is available to the application, and may be passed back for rendering a font without knowing specifically what the values mean. 
 
Use a font file to get a font that can be used for outputting characters and strings. 
 
intersect rectangle, results with the overlapping portion of R1 and R2 into R ... 
 
internal function to load fonts 
 
would seem silly to load fonts - but for server implementations the handle received is not the same as the font sent. 
 
Extended load image file. This allows specifying a file group to load from. (Groups were added for platforms without support of current working directory). 
 
Extended load image file. This allows specifying a file group to load from. (Groups were added for platforms without support of current working directory). 
 
Create a CDATA color from components. 
 
Makes a CDATA color from the RGB components. Sets the alpha as 100% opaque. 
 
Adds DBG_PASS parameter. Creates an Image with a specified width and height. The image's color is undefined to start. 
 
create a sprite from an Image 
 
 
 
Creates a sub image region on an image. Sub-images may be used like any other image. There are two uses for this sort of thing. OH, the sub image shares the exact data of the parent image, and is not a copy. 
 
Merges two image rectangles. The resulting rectangle is a rectangle that includes both rectangles. 
 
Moves an image within a parent image. Top level images and images which have a user color buffer do not move. 
 
This is function sack::image::OpenFontFile. 
 
Removes a sub-image (child image) from a parent image. The sub image my then be moved to another image with AdoptSubImage
 
background of color 0,0,0 is transparent - alpha component does not matter.... 
 
Outputs a string in the specified font, from the specified point, text is drawn from the point to the left, with the characters aligned with the top to the left; it goes up from the point. the point becomes the bottom left of the rectangle output. 
 
Outputs a string in the specified font, from the specified point, text is drawn from the point up, with the characters aligned with the top to the left; it goes up from the point. the point becomes the bottom left of the rectangle output. 
 
Outputs a character in the specified font, from the specified point, text is drawn from the point up, with the characters aligned with the top to the left; it goes up from the point. the point becomes the bottom left of the rectangle output. Parameters 
 
Outputs a string in the specified font, from the specified point, text is drawn right side up and godes from left to right. The point becomes the top left of the rectangle output. 
 
Outputs a string in the specified font, from the specified point, text is drawn upside down, and goes to the left from the point. the point becomes the bottom right of the rectangle output. 
 
Outputs a string in the specified font, from the specified point, text is drawn from the point up, with the characters aligned with the top to the left; it goes up from the point. the point becomes the bottom left of the rectangle output. 
 
Outputs a string in the specified font, from the specified point, text is drawn from the point down, with the characters aligned with the top to the right; it goes down from the point. the point becomes the top right of the rectangle output. 
 
Create or recreate an image using the specified color buffer, and size. All sub-images have their color data reference updated. 
 
Renders a font file and returns a Font. The font can then be used in string output functions to images. 
 
Renders a font with a FRACTION scalar for the X and Y sizes. 
 
 
 
 
 
Change the size of an image, reallocating the color buffer as necessary.
Parameters
Remarks
If the image is a sub image (located within a parent), the subimage view on the parent image is updated to the new width and height. The color buffer remains the parent's buffer.
If the image is a parent, a new buffer is allocated. If the previous buffer was specified by the user in RemakeImage, that buffer is not freed, but a new buffer is still created.

Bugs
If the image is a parent image, the child images are not updated to the... more 
 
angle is a fixed scaled integer with 0x1 0000 0000 being the full circle. 
 
output a rotated sprite to destination image, using and angle specified. The angle is represented as 0x1 0000 0000 is 360 degrees 
 
This is function sack::image::RotateImageAbout. 
 
Sets the alpha channel in a color value. 
 
Specify the optimized code to draw with. There are 3 levels, C - routines coded in C, ASM - assembly optimization (32bit NASM), MMX assembly but taking advantage of MMX features. 
 
Sets the blue channel in a color value. 
 
exported for the PSI font chooser to set the data for the font to be retreived later when only the font handle remains. 
 
Sets the green channel in a color value. 
 
User applications may use an aux rect attatched to an image. The 'Display' render library used this itself however, making this mostly an internal feature. 
 
Sets the active image rectangle to the bounding rectangle specified. This can be used to limit artificially drawing onto an image. (It is easier to track to create a subimage in the location to draw instead of masking with a bound rect, which has problems restoring back to initial conditions) 
 
This is function sack::image::SetImageRotation. 
 
Sets the red channel in a color value. 
 
provided for display rendering portion to define this method for sprites to use. deliberately out of namespace... please do not move this up. 
 
Sets the point on a sprite which is the 'hotspot' the hotspot is the point that is drawn at the specified coordinate when outputting a sprite. 
 
This function sets the current location of a sprite. When asked to render, the sprite will draw itself here. 
 
library global changes. string behavior cannot be tracked per image. string behavior should, for all strings, be the same usage for an application... so behavior is associated with the particular stream and/or image family. does not modify character handling behavior - only strings. 
 
This is a function used to synchronize image operations when the image interface is across a message server. 
 
internal function to unload fonts 
 
Destroys a font, releasing all resources associated with character data and font rendering. 
 
Releases an image, has extra debug parameters. 
 
Release a Sprite. 
Created with a commercial version of Doc-O-Matic. In order to make this message disappear you need to register this software. If you have problems registering this software please contact us at support@toolsfactory.com.
Copyright (c) 2000+. All rights reserved.
What do you think about this topic? Send feedback!