<< Click to display table of contents >> Smooth Image Scaling in TRichView |
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.
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.
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).
VCL version of TRichView can draw inserted TMetafile images using GDI+ functions. GDI+ provides higher quality of drawing, including anti-aliased lines.
To use this feature, add RVGDIPlusGrIn unit in your project (or include it in "uses" of the main form's unit).