Posted: Thu Dec 08, 2011 6:12 pm
There are no procedures for unregistering. Everything is cleaned up when the application exits.
Support forums for TRichView, ScaleRichView, Report Workshop and RVMedia components
https://textally.com/forums/
Code: Select all
uses
PngImage, RVGrHandler, RVThumbMaker;
...
type
TMyGraphicHandler = class (TRVGraphicHandler)
public
function IsTransparent(Graphic: TGraphic): Boolean; override;
end;
function TMyGraphicHandler.IsTransparent(Graphic: TGraphic): Boolean;
begin
if Graphic is TPNGObject then
Result := Graphic.Transparent
else
Result := inherited IsTransparent(Graphic);
end;
procedure InitPngObject;
begin
RVGraphicHandler.Free;
RVGraphicHandler := TMyGraphicHandler.Create;
RegisterClass(TPngObject);
RVGraphicHandler.RegisterHTMLGraphicFormat(TPngObject);
RVGraphicHandler.RegisterPngGraphic(TPngObject);
RVThumbnailMaker.AllowThumbnailsFor(TPNGObject);
end;
initialization
InitPngObject;
end;