diff --git a/docs/xml/fcl/fpimage.xml b/docs/xml/fcl/fpimage.xml index 02c9f658c0..57c5ee8928 100644 --- a/docs/xml/fcl/fpimage.xml +++ b/docs/xml/fcl/fpimage.xml @@ -11,8 +11,15 @@ TFPPalette - FreePascal Palette definition: base for LCL TPalette etc - - TFPCustomImage - FreePascal base definition for all Image classes + 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 Assigne store images. +The data storage and handling must be added in derived classes, by overriding the virtual (abstract) methods. + + TLazIntfImage + @@ -65,14 +72,18 @@ - Create - constructor for TFPPalette: calls inherited Create then finds how much memory to allocate for the specified number of colours + Create - constructor for + TFPPalette: calls inherited + Create then finds how much memory to allocate for the specified number of colours TObject.Create - Destroy - destructor for TFPPalette: frees memory then calls inherited Destroy + Destroy - destructor for + TFPPalette: frees memory then calls inherited + Destroy TObject.Destroy @@ -84,11 +95,13 @@ - Copy from the source (APalette) to the current Palette + Copy from the source ( + APalette) to the current Palette - Merge the contents of another palette (pal) with the current palette + Merge the contents of another palette ( + pal) with the current palette @@ -110,16 +123,20 @@ Count - the total number of entries for colours in the palette - - SetInternalColor - specify the internal colour (using TFPColor format) + Set RGBA pixel color. + This is a virtual method, that translates the RGBA color into an palette index, which then is stored in the pixel data. + +Storage of true RGBA colors (not using a palette) has to be implemented in derived classes. - - GetInternalColor - finds the internal colour from local store + Get RGBA pixel color. + This is a virtual method, reading the RGBA color from the palette. + +When true RGBA colors are stored, this must be reflected in a derived class. - - SetInternalPixel - specifies the integer Color of a pixel located at the given coordinates + Set the internal color representation of a pixel. + This is an abstract method, expecting color information as an palette index by default, or RGBA data encoded as an Integer value. @@ -146,20 +163,24 @@ - Create - constructor for TFPCustomImage: calls inherited Create then initialises position and size, makes a stringlist + Create - constructor for + TFPCustomImage: calls inherited + Create then initialises position and size, makes a stringlist TObject.Create - Destroy - destructor for TFPCustomImage: frees the Palette then calls inherited Destroy + Destroy - destructor for + TFPCustomImage: frees the Palette then calls inherited + Destroy TPersistent.Destroy - + LoadFromStream loads data from the specified stream, optionally using the specified reader @@ -204,8 +225,7 @@ Extra - Info unrelated with the image representation - - ExtraValue - additional information stored with the image + Additional information stored with the image @@ -225,7 +245,8 @@ - TFPCustomImageClass - class of TFPCustomImage + TFPCustomImageClass - class of + TFPCustomImage @@ -236,11 +257,11 @@ TFPIntegerArray - definition of integer array for use in images - - - - - + + + + + Progress - method for displaying the progress of a drawing or painting action @@ -264,7 +285,7 @@ TheImage which is being read or written - + OnProgress event handler for showing progress of drawing or painting @@ -277,7 +298,7 @@ InternalCheck - performs check on validity of stream, returns True if OK - + ImageRead read specified image from nominated stream; returns the image @@ -292,7 +313,8 @@ - TFPCustomImageReaderClass - class of TFPCustomImageReader + TFPCustomImageReaderClass - class of + TFPCustomImageReader @@ -305,7 +327,8 @@ - TFPCustomImageWriterClass - class of TFPCustomImageWriter + TFPCustomImageWriterClass - class of + TFPCustomImageWriter @@ -318,14 +341,18 @@ - Create - constructor fro TImageHandlersManager: calls inherited Create then constructs list of handlers + Create - constructor fro + TImageHandlersManager: calls inherited + Create then constructs list of handlers TObject.Create - Destroy - destructor for TImageHandlersManager: frees the list of handlers then calls inherited Destroy + Destroy - destructor for + TImageHandlersManager: frees the list of handlers then calls inherited + Destroy TObject.Destroy @@ -364,11 +391,13 @@ - TFPColor - record type used as an internal representation for a colour: a TColor has been decomposed into its component Red, Green, Blue and Alpha parts, to allow easy manipulation of each + TFPColor - record type used as an internal representation for a colour: a + TColor has been decomposed into its component Red, Green, Blue and Alpha parts, to allow easy manipulation of each - PFPColor - pointer to a TFPColor + PFPColor - pointer to a + TFPColor diff --git a/docs/xml/lcl/graphtype.xml b/docs/xml/lcl/graphtype.xml index 9098181119..4f69a50326 100644 --- a/docs/xml/lcl/graphtype.xml +++ b/docs/xml/lcl/graphtype.xml @@ -336,7 +336,9 @@ xxxBitsPerPixel and xxxPrecisionMask applies to color data. For masked images, t An uncompressed graphics image (bitmap) - This object hold the pixels, mask and color palette of the image, as well as a detailed description of the storage format of these parts. + This object hold the pixels, mask and color palette of the image, as well as a detailed description of the storage format of these parts. + +This object currently is subject to refactoring, don't use it in application code. @@ -922,12 +924,10 @@ A Mask value of 1 means that the pixel is masked (transparent); a value of 0 mea The number of bits per Mask scanline. - - AsString - returns the image as a string + The image descriptor as a string. - - IsEqual - compares th ecurrent descriptor with another, and returns True if they are equal + Compares with the given description, returns True if it's equal. @@ -938,8 +938,7 @@ A Mask value of 1 means that the pixel is masked (transparent); a value of 0 mea CreateData - method to create the data for the record - - FreeData - releases data that had previously been locked or made unavailable + Destroys the allocated Data, Mask and Palette arrays. @@ -958,16 +957,14 @@ A Mask value of 1 means that the pixel is masked (transparent); a value of 0 mea ReadBits - reads the bit values for the raw image data at a given position - - ReadChannels - reads the (R, G, B, Alpha) channel values at a given position in the raw data + Reads the R, G, B and Alpha channel values at a given position in pixel data. - - ReadMask - reads the Mask data at the given position in the raw image + Read the Mask value at the given position in the image data. Returns AMask=True if the pixel is transparent. + The position in the Mask data typically differs from the position in the color data. - - WriteBits - writes the specified bit values at the nominated position in the data + Writes ABits into Data at the given position. @@ -1021,6 +1018,25 @@ A Mask value of 1 means that the pixel is masked (transparent); a value of 0 mea Image formats supported by a device, or present in image data[?] + + Read color bits. + AData is the pointer to the pixel data. +APosition is the position of a pixel within AData. +ABitsPerPixel is the size of a stored pixel. +APrec and AShift select the field (color channel or palette index). + +The bits are extracted into the low order bits of the result (ABits). + + + + + + Write color or mask data, from the high bits of ABits. + ReadBits returns the value in the low order bits + + + + diff --git a/docs/xml/lcl/imglist.xml b/docs/xml/lcl/imglist.xml index 3bd407bf10..4b6c244ae6 100644 --- a/docs/xml/lcl/imglist.xml +++ b/docs/xml/lcl/imglist.xml @@ -180,8 +180,7 @@ - - TCustomImageList - base class for TImageList (not the same as a TBitmap collection) + Base class for TImageList (not the same as a TBitmap collection) An ImageList contains images (bitmaps or icons) of the same Width and Height, accessible by index. The images are stored in one big (wide) bitmap, whose width is Width*Count. When an image of a different Width or Height is inserted, the previous contents of the list are discarded! It's okay, however, to insert an imagelist-like bitmap, that contains multiple bitmaps of the same Width and Height as used by the ImageList. This allows to insert e.g. other (compatible) ImageLists, or bitmaps for multiple states of essentially the same image (button pressed, released and disabled). diff --git a/docs/xml/lcl/intfgraphics.xml b/docs/xml/lcl/intfgraphics.xml index 8c9993e608..64e9da7bf8 100644 --- a/docs/xml/lcl/intfgraphics.xml +++ b/docs/xml/lcl/intfgraphics.xml @@ -165,11 +165,10 @@ - - TLazIntfImage - This descendant of TFPCustomImage stores its image data as raw images and is therefore able to interchange images directly with the LCL interfaces. + Represents a graphical image. -

- TLazIntfImage - This descendant of TFPCustomImage stores its image data as raw images and is therefore able to interchange images directly with the LCL interfaces.

+

This descendant of TFPCustomImage stores the image data as TRawImage, and is therefore able to interchange images directly with the LCL interfaces.

+

A large number of the protected methods (GetColorxxxxxx and SetColorxxxxxx) deal with direct interface to the operating system at the pixel level

Usage examples:
 
     1. Loading a .xpm file into a TBitmap:
@@ -227,7 +226,6 @@
       end;
     }
  
-

A large number of the protected methods (GetColorxxxxxx and SetColorxxxxxx) deal with direct interface to the operating system at the pixel level

@@ -2213,6 +2211,9 @@ TLazReaderIconDIB - this is a FPImage reader for a single DIB from an icon file
+ + Returns an pointer to the scanline raw data. + diff --git a/docs/xml/lcl/lclclasses.xml b/docs/xml/lcl/lclclasses.xml index bac47ad036..7b5dd045f6 100644 --- a/docs/xml/lcl/lclclasses.xml +++ b/docs/xml/lcl/lclclasses.xml @@ -95,20 +95,23 @@
- - TLCLReferenceComponent - A base class for all components having a handle + Base class for all components having a handle. + Apart from the OS/window manager specific window Handle, LCL components can include a Reference to an widgetset specific object. + +Application use is restricted to sending messages to a windowed control, using its window Handle. + - - Destroy the reference, then perform inherited Destroy - + Destroys the Reference, prior to calling the inherited destructor. TLCLComponent.Destroy - - Handle a handle (sort of pointer or reference) allocated by the operating system to this component + Get the Handle of this component. + The Handle is sort of pointer or reference, allocated by the operating system or widgetset to this component. + +A window handle can be used for sending messages to the component.[?]