Cut-image concept ================= A so-called cut-image is a rectangular image consisting of 9 cells (3x3): 4 corner images, 2 vertical (left and right) images, 2 horizontal (top and bottom) images, and one center image which may be either an image or a solid color. Each component image is a regular AAI with Alpha channel. A cut-image, defined once, can be drawn in any size greater than the minimum designed size using the following algorithm: corner images are drawn "as is", vertical and horizontal images are scaled respectively vertically and horizontally, and the center image is scaled in both directions, or the specified solid color is used to fill the center cell. Thus, cut-images allow to scale GUI elements without distorting their edges and corners. There are three types of cut-images: bi-dimensional, horizontal (able to scale only horizontally, e.g. buttons) and vertical (able to scale only vertically, e.g. scroll-bars). The latter 2 types consist of only 3 images. In this description the bi-dimensional cut-images will be explained, others are much similar. Technically, a bi-directional cut-image is a set of 8 or 9 AAI files accompanied with a text file containing some property values. Among these values there are the dimensions of non-scaled parts (corners) - left, right, top and bottom. Also there are so-called extents (left, right, top and bottom): when a cut-image is drawn, the physical image rectangle position and size differs by the extent values from the so-called client rectangle which is supplied to the drawing code. So, the extents allow a physical image spread outside of the designated rectangle (e.g. for shadows or extra margins). ImageCutter tool ================ The ImageCutter tool allows to cut an AAI image into pieces, generating the properties file as well. The source image may be dropped to a tool window, or File - Open menu may be used. After opening, the tool tries to automatically detect left, top, right and bottom properties of an image searching for identical pixel rows and columns. The auto-detected values may be manually corrected, and the proper cut-image type (vertical, horizontal or bi-dimensional) may be selected; after that the Save Results button generates the target files. ATTENTION: The tool always writes zero extents to the properties, so when using the tool to generate a new cut-icon instead of an existing one, these values should be manually copied from the old file, adjusted if necessary.