Tags:
create new tag
view all tags

.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

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2012-02-19 - JeanNeron
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback