[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
Abstract FreePascal base class for all image classes.
Source position: fpimage.pp line 93
type TFPCustomImage = class(TPersistent) |
||
protected |
||
procedure SetInternalColor(); virtual; |
|
Set RGBA pixel color. |
function GetInternalColor(); virtual; |
|
Get RGBA pixel color. |
procedure SetInternalPixel(); virtual; abstract; |
|
Set the color of a pixel, in its internal encoding. |
function GetInternalPixel(); virtual; abstract; |
|
Returns the internal (encoded) color value of the specified pixel. |
procedure SetUsePalette(); virtual; |
|
Specifies whether a color palette is to be used. |
procedure Progress(); virtual; |
|
Notifies an OnProgress handler. |
public |
||
constructor create(); virtual; |
|
Initializes for an image of the given size in pixels. |
destructor destroy; override; |
|
Frees the palette. |
procedure Assign(); override; |
||
procedure LoadFromStream(); |
|
Loads an image from a stream, optionally using an specific reader. |
procedure LoadFromFile(); |
|
Loads an image from an file, optionally using an specific reader. |
procedure SaveToStream(); |
|
Saves the image in an stream, using the specified writer. |
procedure SaveToFile(); |
|
Saves the image in an file, optionally using the specified writer. |
procedure SetSize(); virtual; |
|
Set the size of the image in pixels. |
|
Height of the image in pixels. |
|
|
Width of the image in pixels. |
|
|
The RGBA color of the specified pixel. |
|
property UsePalette: Boolean; [rw] |
|
Usage of a color palette (read/write). |
property Palette: TFPPalette; [r] |
|
The color palette in use; Nil if no palette is used. |
|
The internal color value of a pixel. |
|
property Extra: String; [rw] |
|
Additional information, not related to the internal image representation. |
property ExtraValue: String; [rw] |
|
Image attribute values (strings) by index. |
property ExtraKey: String; [rw] |
|
Image attribute names by index. |
procedure RemoveExtra(); |
|
Removes the named image attribute. |
function ExtraCount; |
|
Returns the number of additional image attributes. |
property OnProgress: TFPImgProgressEvent; [rw] |
|
Handler for Progress events. |
end; |
|
Abstract FreePascal base class for all image classes. |
|
| | ||
| | ||
TLazIntfImage is an LCL implementation of this class. TFPCustomImage only provides an image size and a palette, and methods to load, store and Assign images. The data storage and handling must be added in derived classes, by overriding the virtual (abstract) methods. It also provides Extra image attributes (a TStringList). [entire review 2010-14-01 DoDi]
TLazIntfImage |
lazarus-ccr.sourceforge.net |