.CHART SET TRANS TYPE
This subroutine sets the transparency type for the "current" chart spec.
Usage:
PASS <trans_type> FIELD SHARE? N
GOSUB 0CD .CHART SET TRANS TYPE
* Check for error
IF 0CD .CHART SET TRANS TYPE NE
Description:
This subroutine sets transparency type of the "current" chart.
The parameter is optional, if blank or not passed it will be reset to Single. If passed, the value must be one of: Alpha, Alpha Channel, Single, or Single Color. Alpha and Alpha Channel are equivilent, as are Single and Single Color. If you use Single or Single Color, you should call
.CHART SET TRANS COLOR to indicate which color is the transparent color.
There are two types of transparency:
- Alpha transparency: In addition to red, green and blue levels, there is a transparency level associated with each pixel, which can range from completely transparent to completely opaque. The data associated with the transparency information is called the alpha channel.
- Single color transparency: The image itself has no alpha channel, but a certain color is used to mean completely transparent.
For internal drawing, Chart Director always uses alpha transparency. However, when outputting the image as an image file, Chart Director by default will remove the alpha channel to reduce image size. This is because many image displaying programs do not support alpha transparency. For example, Internet Explorer supports single color transparency but not alpha transparency.
One important thing to note is that IE (and possibly other image displaying programs) only support single color transparency for palette based images with up to 256 colors, but not for true color images. For this reason, if single color transparency is used, Chart Director will automatically reduce the image to 256 colors if it has more than 256 colors. This may result in loss of image quality, especially if the image contains gradient colors.
Due to these limitations for highest image quality it may be beneficial to not use transparency in image output, but to set the image background color to the same color as the container background.
Comments:
Read what other users have said about this page or add your own comments.
--
JeanNeron - 2011-09-23