Copyright (C) 2000-2012 |
GNU Info (sawfish.info)ImagesImages ****** The image type allows arbitrary 24-bit images to be manipulated by the window manager. Images may be both loaded from files, and rendered dynamically. - Function: imagep arg Returns `t' when ARG is a member of the image type. - Function: make-image FILE-NAME Creates and returns an image object containing the image defined by the contents of the file named FILE-NAME (a string). The `image-load-path' directory provides the search path used while trying to find a directory containing the file named FILE-NAME. All common image formats will likely be able to be loaded. But PNG, JPEG and XPM should always be supported. Signals an error if file called FILE-NAME may be found, or if an image may not be constructed from the file. - Variable: image-load-path A list of directory names. This defines the search path used when loading images. - Function: make-sized-image width height &optional color Create and return a new image, of size WIDTH, HEIGHT. If COLOR is defined it specifies the color of all pixels in the image. If undefined, all pixels will be black. - Function: copy-image image Returns a newly allocated image object, an exact copy of the image object IMAGE. - Function: image-dimensions image Returns a cons-cell `(WIDTH . HEIGHT)' defining the dimensions of the image represented by IMAGE. - Function: flip-image-horizontally image Flip the contents of IMAGE about the vertical axis. - Function: flip-image-vertically image Flip the contents of IMAGE about the horizontal axis. - Function: flip-image-diagonally image Flip the contents of IMAGE about an axis running from the top-left corner to the bottom-right corner of the image. As with many of the other types, arbitrary state may be associated with image objects. - Function: image-put image property value Set the property named PROPERTY (a symbol) of IMAGE to VALUE. - Function: image-get image property Return the property named PROPERTY of IMAGE, or `nil' if no such property exists. The only predefined property is the symbol `tiled', used when an image is displayed in a window decoration. When set to a non-nil value the image is not scaled to the size of the decoration (the default), but is tiled across the decoration. When images are scaled across border decorations the pixels that are actually scaled are defined by the "border" of the image. The border defines the outer rectangle of pixels that are left as-is, and the inner rectangle which is scaled. - Function: image-border image Returns a list of integers `(LEFT RIGHT TOP BOTTOM)', the border of the image object IMAGE. The number associated with each edge of the image defines the number of pixels adjacent to that edge that _will not_ be scaled. - Function: set-image-border image left right top bottom Sets the border of IMAGE. The shape of the image may also be specified, this defines which pixels are treated as being transparent. Each image may define a single color as marking transparent pixels. - Function: image-shape-color image Return the color marking transparent pixels in IMAGE, or `nil' if no such color has been specified. - Function: set-image-shape-color image color Specify that COLOR marks transparent pixels in IMAGE. It's also possible to define "color modifiers" for each image. These define the transformation applied to the value of each pixel when it is displayed. Four different modifiers exist for each image, one for each color component, and one for the image as a whole. - Function: image-modifier image type Return the modifier defined by the symbol TYPE of IMAGE, a list of integers `(GAMMA BRIGHTNESS CONTRAST)'. Each integer has a value between zero and 255 representing the weight applied to the associated attribute when rendering the image. The four types are `red', `green', `blue' and `nil' (all colors). - Function: set-image-modifier image type gamma brightness contrast Set the image modifier of IMAGE defined by TYPE. There are also several other functions manipulating images: - Function: bevel-image image border upwards &optional bevel-percent Transform the edgemost pixels of IMAGE to give it a "bevelled" effect. BORDER is an integer defining the width of the bevel. If UPWARDS is non-nil the bevel is raised, otherwise it is lowered. If BEVEL-PERCENT is defined it specifies the height or depth of the drawn bevel. When undefined, the value of the parameter is taken from the `default-bevel-percent' variable. - Variable: default-bevel-percent Default height of drawn bevels, as a percentage. - Function: clear-image image &optional color Set all pixels in IMAGE to COLOR (or black if COLOR is undefined). - Function: tile-image dest-image source-image Tiles SOURCE-IMAGE into DEST-IMAGE, starting from the upper-left corner, working outwards. automatically generated by info2www version 1.2.2.9 |