The overlay location of the image is specified as an offset from an anchor point rather than as an absolute co-ordinate. This allows the image to be placed intelligently without necessarily knowing the dimensions of the image it will eventually be overlaid upon. A particularly useful use of this class is to overlay a color scale image onto an image of a rendered 3D model.
An image overlay also has an opacity parameter. An opacity of 0 will result in the image being hidden altogether, whereas an opacity of 1.0 will make the image fully opaque (transparent regions of the image will still be transparent though). Values in between will result in the image being blended with the base image. You can think of the opacity as a multiplier on the image's own alpha channel.
Specifies how the image location X and Y co-ordinates are interpretted and where the (0,0) location of the image corresponds to. For example, an image anchored at BottomCenter will have the (0,0) locate at the mid-point along the bottom the image. If y is zero, the image will sit flush with the bottom of whatever it is overlaid onto. As y is increased, the image will move up. The x offset is ignored for this particular example because it must be centered and the x offset would de-center it.
The reason for the various different interpretations of the offset is so that the anchor point can be changed but the offset left the same and the image location will essentially self-adjust in a consistent way.
Enumerator |
---|
TopLeft | (0,0) at top-left of image, translated by x (positive right) and y (positive down).
|
TopCenter | (0,0) at top-center of image, translated by y only (positive down). X offset is ignored.
|
TopRight | (0,0) at top-right of image, translated by x (positive left) and y (positive down).
|
CenterLeft | (0,0) at center-left of image, translated by x only (positive right). Y offset is ignored.
|
Center | (0,0) at center of image. Both x and y offsets are ignored.
|
CenterRight | (0,0) at center-right of image, translated by x only (positive left). Y offset is ignored.
|
BottomLeft | (0,0) at bottom-left of image, translated by x (positive right) and y (positive up).
|
BottomCenter | (0,0) at bottom-center of image, translated by y only (positive up). X offset is ignored.
|
BottomRight | (0,0) at bottom-right of image, translated by x (positive left) and y (positive up).
|
Tiled | Like TopLeft except the image is repeated in x and y as needed to cover the base image.
|