rvico TRichView Reference | Overview

Semitransparent Objects

Top  Previous  Next

Documents may contain objects having transparent and semitransparent areas, such as:

pictures (for example, Gif, Png, icons, Bitmaps with alpha-channel)

paragraph background (with specified Opacity)

table background (that may include transparent pictures and semitransparent color filling)

table cell background (that may include transparent pictures and semitransparent color filling)

sidenote and text box background (with specified Opacity), displayed only while printing in TRVPrint and in ScaleRichView.

Drawing on the screen

When drawing on the screen, the component uses the appropriate methods for semitransparent drawing. Some special code is used to draw backgrounds of animations and backgrounds of inplace editors of table cells.

Known problems: TPngObject does not support semitransparency when displayed rotated.

Printing in TRVPrint

The most of printers do not support semitransparent drawing, so TRVPrint draws semitransparent objects in the following steps:

1.it creates a bitmap,

2.it draws a background below the transparent object in this bitmap,

3.it draws this object in this bitmap,

4.it prints this bitmap.

TRVPrint has a limited support of transparency in sidenotes and text boxes (when drawing on the step 2):

you cannot see a sidenote or a text box through a transparent area

through a transparent area in a sidenote or a text box, you can see only a page background (but not any content)

TRVPrint does not support textured backgrounds in rotated objects (a plain color is used instead).

Drawing and printing in TRVReportHelper

When printing, TRVReportHelper uses the same method (using bitmaps to draw semitransparent objects) as TRVPrint.

When drawing on the screen, TRVReportHelper can draw transparently or can use bitmaps, depending on AllowTransparentDrawing property.

srv_icon Drawing and printing in ScaleRichView

In TSRichViewEdit, drawing on the screen is similar to drawing in TRichViewEdit: the component uses the appropriate methods for semitransparent drawing.

When printing, like TRVPrint, TSRichViewEdit uses a bitmap to draw semitransparent areas. However, the step 2 (drawing a background below the transparent object in a bitmap) is implemented differently. When drawing a background below the transparent object, TSRichViewEdit draws all page layers below the object. Because of this, you can see text boxes and sidenotes through the transparent areas, and you can see main document through transparent areas in text boxes and sidenotes.

TSRichViewEdit does not have a limitation on printing backgrounds of rotated objects.

Bitmaps created to draw semitransparent areas in ScaleRichView are created in resolution 96 dpi. Because of this, when printing on high resolution printers, semitransparent areas are printed more roughly than surrounding text.


TRichView © trichview.com