Sack Library Documentation
ContentsIndexReferenceHome
PreviousUpNext
sack::image Namespace

Deals with images and image processing. 

 

Image is the primary type of this. 

Font is a secondary type for putting text on images. 

 

render namespace is contained in image, because without image, there could be no render. see PRENDERER. 

Name 
Description 
This is namespace sack::image::interface. 
This is namespace sack::image::render. 
Name 
Description 
The following table lists functions in this documentation. 
Global information kept by the specific font subsystem. This was seperated from the guts of Image Global, because PSI Font Picker dialog wants to get information from here (to browse the font cache for instance). 
The following table lists types in this documentation. 
The following table lists variables in this documentation. 
The following table lists macros 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. 
Name 
Description 
Build a color with alpha specified. 
Get the alpha value of a color. This is a 0-255 unsigned byte. 
This is a macro to cure a 64bit warning in visual studio. 
common color definitions.... 
An opaque normal blue. 
An opaque BROWN. Brown is dark yellow... so this might be more like a gold sort of color instead. 
An opaque cyan - kind of a light sky like blue. 
An opaque darker grey (gray?). 
An opaque Green. 
An opaque a bight or light color blue. 
This is macro sack::image::BASE_COLOR_LIGHTBROWN. 
An opaque a lighter, more bight cyan color. 
An opaque lighter, brighter green color. 
An opaque normal grey (gray?). 
An opaque Lighter pink sort of red-blue color. 
An opaque bright red. 
An opaque normal Magenta - a lighter, more red purple. 
This is macro sack::image::BASE_COLOR_NICE_ORANGE. 
An opaque normal orange. 
An opaque normal purple (magenta). 
An opaque red. 
An opaque White. 
An opaque bright yellow. 
Copy one image to another. Copies the source from 0,0 to the destination 0,0 of the minimum width and height of the smaller of the source or destination. 
Copy one image to another at the specified coordinate in the destination. 
Copy one image to another at the specified coordinate in the destination. Scale RGB channels to specified colors. 
Copy one image to another at the specified coordinate in the destination. Scale RGB channels to specified colors. 
Copy one image to another at the specified coordinate in the destination. Shade the image on copy with a color. 
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 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 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 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. 
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. 
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. 
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. 
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. 
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. 
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. 
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. 
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. 
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. 
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. 
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. 
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. 
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. 
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. 
Get the blue value of a color. This is a 0-255 unsigned byte. 
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. 
 
 
A macro to create a solid color from R G B coordinates. 
now why would we need an inverse line? I don't get it.... anyhow this would draw from the end to the start... basically this accounts for rounding errors on the orward way. 
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 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. 
 
 
Return a CDATA that is meant for output to OpenGL. 
Get the green value of a color. This is a 0-255 unsigned byte. 
A macro for accessing vertical (Y) information of an IMAGE_POINT
A macro for accessing vertical (Y) information of an IMAGE_POINT
the image at exactly this position and size is the one being referenced, the actual size and position may vary depending on use (a sub-image outside the boundry of its parent). 
A macro to compute the address of a pixel in the color buffer by x, y. 
This is a macro is used when image data is inverted on a platform. (Windows images, the first row of data is the bottom of the image, all Image operations are specified from the top-left as 0,0) 
This is macro sack::image::INVERTY_INVERTED. 
This is macro sack::image::INVERTY_NON_INVERTED. 
Load an image file. Today we support PNG, JPG, GIF, BMP. Tomorrow consider tapping into that FreeImage project on sourceforge, that combines all readers into one. 
Load an image file. Today we support PNG, JPG, GIF, BMP. Tomorrow consider tapping into that FreeImage project on sourceforge, that combines all readers into one. 
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. 
 
 
 
 
Passes default font if not specified. 
 
 
 
 
 
The non Ex Version doesn't pass the string length. 
 
 
 
 
 
 
Get the red value of a color. This is a 0-255 unsigned byte. 
Create or recreate an image using the specified color buffer, and size. All sub-images have their color data reference updated. 
Recreates a Font based on saved FontData. The resulting font may be scaled from its original size. 
 
This is macro sack::image::RenderScaledFont. 
Create or recreate an image using the specified color buffer, and size. All sub-images have their color data reference updated. 
Sets the alpha part of a color. (0-255 value, 0 being transparent, and 255 solid(opaque)) 
Sets the blue channel of a color. Expects a value 0-255. 
Sets the green channel of a color. Expects a value 0-255. 
Sets the red channel of a color. Expects a value 0-255. 
Releases an image, has extra debug parameters. 
 
Name 
Description 
 
Transparency parameter definition
0 : no transparency - completely opaque
1 (TRUE): 0 colors (absolute transparency) only
2-255 : 0 color transparent, plus transparency factor applied to all 2 - mostly almost completely transparent 255 not transparent (opaque)
257-511 : alpha transparency in pixel plus transparency value - 256 0 pixels will be transparent 257 - slightly more opaquen than the original 511 - image totally opaque - alpha will be totally overriden no addition 511 nearly completely transparent 512-767 ; the low byte of this is subtracted from the alpha of the image ; this allows images... more 
 
Describes an alternate file location for this font. During the building of the cache, the same fonts may exist on a system multiple times.
 
 
Definitions of symbols to pass to SetBlotMethod to specify optimization method. 
 
specify the method that pixels are copied from one image to another 
 
Defines the coordinates of a rectangle. Pointer to an image rectangle. 
 
byte index values for colors on the video buffer... 
 
A definition of a block structure to transport font and image data across message queues. Type of buffer used to transfer data across message queues. 
 
 
This is the internal structure used to define the font cache, and data structures used to track renderings of fonts. Structures include desired size of the font in pixels. This data structure can be requested from the image library and can be used to recreate the font again in the future. This font came from a font choice dialog and includes all the IDs of the options selected. 
 

 
 
Global information kept by the specific font subsystem. This was seperated from the guts of Image Global, because PSI Font Picker dialog wants to get information from here (to browse the font cache for instance). 
 
describes a style of a font family.

 
 
These are symbols used for 'magic' in PFONTDATA and PRENDER_FONTDATA.
Magic values to determine if a structure is a PFONTDATA or a PRENDER_FONTDATA
 
These flags are used in SetImageRotation and RotateImageAbout functions - these are part of the 3D driver interface extension. They allow for controlling how the rotation is performed. 
 
define _DRAWPOINT_X 0 define _DRAWPOINT_Y 1 
 
Flags which may be combined in Image.flags 
 
This is used to define the data usable to recreate a font being rendered right now. This is the data that would result from calling
RenderFontFile, and would be used in future uses of RenderScaledFontData
 
#endif at some point, it may be VERY useful to have this structure also have a public member. 
 
Describes size information about a font family, style, and the file instance specified.

 
 
A simple wrapper to add dynamic changing position and orientation to an image. Sprites can be output at any angle. 
 
 
 
Describes an alternate file location for this font. During the building of the cache, the same fonts may exist on a system multiple times.
 
 
A definition of a block structure to transport font and image data across message queues. Type of buffer used to transfer data across message queues. 
 

 
 
Global information kept by the specific font subsystem. This was seperated from the guts of Image Global, because PSI Font Picker dialog wants to get information from here (to browse the font cache for instance). 
 
describes a style of a font family.

 
 
#endif at some point, it may be VERY useful to have this structure also have a public member. 
 
Defines the coordinates of a rectangle. Pointer to an image rectangle. 
 
Defines the coordinates of a rectangle. Pointer to an image rectangle. 
 
Describes an alternate file location for this font. During the building of the cache, the same fonts may exist on a system multiple times.
 
 

 
 
describes a style of a font family.

 
 
 
Describes size information about a font family, style, and the file instance specified.

 
 
This is used to define the data usable to recreate a font being rendered right now. This is the data that would result from calling
RenderFontFile, and would be used in future uses of RenderScaledFontData
 
 
Describes size information about a font family, style, and the file instance specified.

 
Name 
Description 
color data raw... 
a 4 byte array of color (not really used, we mostly went with CDATA and PCDATA instead of COLOR and PCOLOR 
IMAGE_LIBRARY_SOURCE a definition for a single color channel - for function replacements for ___Val macros 
A fixed point decimal number (for freetype font rendering) 
Font 
Contains information about a font for drawing and rendering from a font file. 
defines FONTDATA for internal usage. 
One of the two primary types that the image library works with. 
#ifndef IMAGE_STRUCTURE_DEFINED #define IMAGE_STRUCTURE_DEFINED consider minimal size - +/- 32000 should be enough for display purposes. print... well that's another matter. 
An unsigned value coordinate pair to track the size of images. 
An array of 2 IMAGE_COORDINATES - [0] = x, [1] = y 
Represents the width and height of an image (unsigned values) 
The basic structure. This is referenced by applications as 'Image' This is the primary type that the image library works with.
This is the internal definition.
This is a actual data content, Image is (ImageFile *). 
Pointer to a IMAGE_EXTENT 
Pointer to an IMAGE_POINT 
pointer to an array of 32 bit colors 
A Pointer to COLOR. Probably an array of color (a block of pixels for instance) 
types of data which may result... 
Information to render a font from a file to memory
pointer to a sprite type. 
pointer to a structure defining a sprite draw method this should be defined in render namespace... 
A Sprite type. Adds position and rotation and motion factors to an image. Hooks into the render system to get an update to draw on a temporary layer after the base rendering is done. 
Name 
Description 
This routine can be used to generically scale to any point between two colors. 
This is a function pointer that references a function to do optimized horizontal lines. The function pointer is updated when SetBlotMethod() is called. 
This is a function pointer that references a function to do optimized horizontal lines with alpha blending. The function pointer is updated when SetBlotMethod() is called. 
d is color data... 
d is color data... 
routine which iterates through the points along a lone from x,y to xto,yto, calling a user function at each point. 
This is a function pointer that references a function to do optimized vertical lines. The function pointer is updated when SetBlotMethod() is called. 
This is a function pointer that references a function to do optimized vertical lines with alpha blending. The function pointer is updated when SetBlotMethod() is called. 
A function pointer to the function which gets a pixel from an image at a specified x, y coordinate. 
plot 
Your basic PLOT functions (Image.C, plotasm.asm)
A function pointer to the function which sets a pixel in an image at a specified x, y coordinate. 
A function pointer to the function which sets a pixel in an image at a specified x, y coordinate. 
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!