Smooth Image Scaling in TRichView

<< Click to display table of contents >>

Smooth Image Scaling in TRichView

Scaling [VCL and LCL]

TRichView can display scaled images using an advanced method producing smooth scaled images.

The following images are affected:

TCustomRichView.BackgroundBitmap (if BackgroundStyle=bsStretched);

pictures and hot-pictures (when stretched);

table.BackgroundImage (if BackgroundStyle=rvbsStretched);

table cells' BackgroundImage (if BackgroundStyle=rvbsStretched).

The settings for scaling can be changed using RVThumbnailMaker object.

Smooth scaling is applied when displaying pictures on the screen. It is not used when printing.

Sometimes, smooth scaling is undesirable (for example, for scaling pixel art or bar codes). You can turn off/on smooth scaling for the specific graphic item using rvepSmoothScaling property.

srv_icon ScaleRichView note: in TSRichViewEdit, smooth scaling is applied to the same images, but they do not need to be stretched: they can be scaled when the whole page is scaled.

FireMonkey note: in FireMonkey, TRichView uses the standard TBitmap scaling method that usually produces good results.

Caching

Smooth scaling is not a very fast operation, so resulting images are stored for reusing in future. Each TRichView component can store up to RichViewMaxThumbnailCount scaled images (+ a scaled version TCustomRichView.BackgroundBitmap, which is always stored).