Class TCustomImageFormatHandler
Unit
PXL.ImageFormats
Declaration
type TCustomImageFormatHandler = class abstract(TObject)
Description
Extension class for TImageFormatManager that supports saving and loading different image formats and can be plugged to one or more image format managers.
Hierarchy
- TObject
- TCustomImageFormatHandler
Overview
Methods
Properties
Description
Methods
 |
constructor Create(const AManager: TImageFormatManager); |
|
Creates instance of image format handler and associates it with the provided manager class.
|
 |
function LoadFromStream(const Context: Pointer; const Extension: StdString; const Stream: TStream; const DestSurface: TPixelSurface; const AlphaFormatRequest: TAlphaFormatRequest): Boolean; virtual; abstract; |
|
Loads image from the stream. Context parameter will contain the same value as the one passed to RegisterExtension function during creation. The rest of parameters have the same meaning as in methods inside TCustomImageFormatManager class.
|
 |
function SaveToStream(const Context: Pointer; const Extension: StdString; const Stream: TStream; const SourceSurface: TPixelSurface; const Quality: Pointer): Boolean; virtual; abstract; |
|
Saves image to the stream. Context parameter will contain the same value as the one passed to RegisterExtension function during creation. The rest of parameters have the same meaning as in methods inside TCustomImageFormatManager class.
|
 |
function GetManager: TImageFormatManager; virtual; |
|
Returns reference to image format manager that is associated with this handler. If there is more than one manager referring to this handler, then the first one is returned.
|
 |
procedure RegisterExtension(const Extension: StdString; const Context: Pointer = nil); virtual; |
|
Registers a specific extension to be processed by this handler along with some custom Context pointer, which will be saved and later provided to LoadFromStream and SaveToStream methods.
|
 |
procedure RegisterExtensions; virtual; abstract; |
|
This method is executed during creation of TCustomImageFormatHandler class to register extensions that are supported by the handler. During this call, one or more RegisterExtension calls should be made to register supported extensions.
|
Properties
Copyright © 2000 - 2017 Yuriy Kotsarenko. Help files generated by PasDoc.
|