Blending rasterized images
You can blend the stroke and fill values of rasterized objects or bitmap images with the stroke and fill values of background objects that are located on the same layer. The BlackBerry® Composer calculates the fill and stroke values of the parts of the objects that overlap the background objects based on the blending method that you choose. To apply a blending method, you must rasterize an object.
The BlackBerry Composer calculates the blended color values by combining the values of the RGB color channels for each pixel where the rasterized image and one or more background objects overlap. For example, suppose you create and rasterize a rectangle with a fill value of RGB 127, 0, 0 (dark red) that overlaps another rectangle with a fill value of RGB 127, 127, 0 (olive green), and apply the Subtract blending method to the dark red rectangle, the RGB values of the overlapping section change to RGB 0, 0, 0 (black). If you apply the Add method, the RGB values of the overlapping section are RGB 255, 127, 0 (orange).
The BlackBerry Composer calculates RGB values using the range 0 through 1 rather than 0 through 255. The only method that this calculation affects is the Multiply method. For example, a dark red rectangle has RGB values of 0.5, 0, 0, and an olive green rectangle has RGB values of 0.5, 0.5, 0. When you multiply the three sets of values with each other the result is 0.25, 0, 0, which is equivalent to 63, 0, 0 (darker red).
Blending methods for rasterized objects and bitmap images
|
Blending method |
Effect |
|---|---|
|
Normal |
This blending method has no effect (no blending method is applied). |
|
Multiply |
This blending method multiplies the RGB values of the object and the RGB values of the underlying object with each other for each of the three channels. |
|
Screen |
The object burns through underlying objects. This action does not effect the background color. |
|
Erase |
This blending method removes the object from the canvas. If an object is underneath a bitmap object, the shape of the bitmap object might create the effect of a cut-out on the underlying object. |
|
Add |
This blending method adds the RGB values of the object and the RGB values of the underlying object to one another for each of the three channels. |
|
Subtract |
This blending method subtracts the RGB values of the underlying object from the RGB values of the object for each of the three channels. |
|
Darkest |
This blending method uses the lower of the two RGB values for each of the three channels. |
|
Lightest |
This blending method uses the higher of the two RGB values for each of the three channels. |
|
Difference |
This blending method uses the difference between RGB values for the object and the RGB values for underlying objects for each of the three channels. |
|
Average |
This blending method uses the average of the RGB values for the object and the RGB values of underlying objects for each of the three channels. |
|
Invert |
This blending method uses the object's alpha level to invert the underlying objects. |
|
Dissolve |
This blending method creates a random pattern based on the opacity of each pixel. If you use the Dissolve blending method, you must configure the opacity level of the object to view the effect. |
|
Replace Hue |
This blending method uses the hue of the object on underlying objects. |
|
Replace Saturation |
This blending method uses the saturation of the object on underlying objects. |
|
Replace Luminosity |
This blending method uses the luminosity of the object on underlying objects. |
|
Replace Color |
This blending method uses the hue and saturation of the object on underlying objects. |
|
XOR Mask |
This blending method computes the difference in object opacities, determines the absolute value, and displays the dominant color. |
|
Alpha Mask |
This blending method is the inverse of an erase. This method uses a composite of the object shape to mask out all lower objects. |