diff --git a/.gitattributes b/.gitattributes index c40f2ae5fe..3778a8c6be 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6139,7 +6139,7 @@ docs/xml/lcl/arrow.xml svneol=LF#text/xml eol=lf docs/xml/lcl/asyncprocess.xml svneol=native#text/plain docs/xml/lcl/buttonpanel.xml svneol=native#text/plain docs/xml/lcl/buttons.xml svneol=native#text/xml -docs/xml/lcl/calcform.xml -text svneol=native#text/plain +docs/xml/lcl/calcform.xml svneol=native#text/plain docs/xml/lcl/calendar.xml svneol=LF#text/xml eol=lf docs/xml/lcl/calendarpopup.xml svneol=native#text/plain docs/xml/lcl/checklst.xml svneol=LF#text/xml eol=lf diff --git a/docs/xml/lazutils/lazutilities.xml b/docs/xml/lazutils/lazutilities.xml index c165f0fad0..a03579923f 100644 --- a/docs/xml/lazutils/lazutilities.xml +++ b/docs/xml/lazutils/lazutilities.xml @@ -10,6 +10,11 @@ + + + + + @@ -57,6 +62,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/xml/lcl/calcform.xml b/docs/xml/lcl/calcform.xml index 666987a107..c88d19d5db 100644 --- a/docs/xml/lcl/calcform.xml +++ b/docs/xml/lcl/calcform.xml @@ -1,642 +1,644 @@ - - - - - - Contains classes and types used in TCalculatorForm - - - - - - - - - - - - - - - - - - Defines the default number of digits of precision used for values in TCalculatorForm - - - - - - - - Specifies an event handler signalled for Key events occurring in TCalculatorForm - - - - - - Key value examined in the event handler - - - - - Specifies an event handler signalled when the display in TCalculatorForm is changed - - - - - - - - -

- TCalculatorState is an enumerated type with values that represent the status for keys/operations in the calculator. TCalculatorState is the type used to implement the Status property in TCalculatorPanel. -

-
- - - -
- - Value on the First key press - - - Value after the oepration for the key has been applied successfully - - - Value when the operation resulted in an error - - - - - -

- TCalculatorLayout is an enumerated type with values that represent the layout for keys and panels on a calculator form. TCalculatorLayout is passed as an argument to the CreateCalculatorForm routine, and to methods in TCalculatorForm and TCalculatorPanel. -

-
- - - - - - Use the content from the TCalcuatorDialog layout property -
- - The default layout with larger button sizes and more whitespace - - - The compact layout with smaller button sizes - - - - - Implements a panel used for buttons and the value display in a calculator form - - - - - - - - - - - - - - - - - - - - - - - - - Sets the value for the text property - - - - - - - New value for the property - - - - Ensures that Text is updated and displayed when Status is csFirst - - - - - - - Performs actions for a key press not handled by a button in the calculator panel - - - - - - - - - - Clears the display and operator in the calculator panel - - - - - - - Updates the calculator panel to reflect an error condition, and signals OnError - - - - - - - - Sets the Text in the calculator panel to the specified value, and signals OnDisplayChange - - - - - - Double value formatted and assigned to the Text property - - - - Gets the Double value represented in the Text property - - - - - - - - - Finds the calculator button which handles the specified key character - -

- Key contains a character value to locate in the button captions on the panel. Keys which are not represented by buttons, like Enter (#13) and Escape (#27), are translated to the value used for the target button. In addition, when ',' is used as the decimal separator on the system, it is translated into the '.' decimal notation. -

-

- FindButton iterates through the Controls on the panel to locate the button using the associated Key. The return value is Nil when a button is not located for the value in Key. -

-
- -
- - - Button which handles the Key, or Nil when no button is available for Key - - - - Key character to locate in the buttons for the calculator panel - - - - Translates a mouse click on a button to the character key used in CalcKey - - - - - Calculator button for the button click notification - - - - - - ErrorBeep is an empty implementation in the current LCL version. - - - - - - Sets the display text for the associated control and signals OnTextChange - - - - - - - Initializes and configures the calculator panel using the specified layout - - - - - - - - - - - - - Locates the button using the specified Key and perform its Click method - - CalcKey is called when a button is located using the specified Key. - - - - - Object for the KeyPress event - - - Key value captured in the panel - - - - Loads the value in Text into the Clipboard as a text value - - - - - - - Pastes text from the Clipboard into the text display for the calculator panel - - - - - - - Gets the minumum number of precision digits allowable for the panel - - - - - - - - - - Updates the Memory indicator to reflect a non-zero value in the Memory property - - - - - - - Contains the Double value representing the Text in the panel - - - - - - Contains the Double value stored in the memory fopr the calculator - - - - - - - Maximum number of digits of precision allowed for the Double value in the calculator - - - - - - - - Indicates if a beep occurs when an error condition is detected in the calculator panel - - - - - - - - Contains the status or state for the calculator panel - - - - - - - - Character representing the last operator entered in the calculator panel - - - - - - Text representation for the Double value in the calculator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Color for the calculator panel - - - - - - - Implements the form used to display a calculator in a TCalculatorDialog - - - - - - - - - - - - - - - - Performs actions needed to handle OnKeyPress events in the calculator form - - - - - - Object for the event notification - - - Key handled in the event handler - - - - Implements a copy menu item in the pop-up menu for the form - - - - - Object for the event notification - - - - Gets the value for the Value property - - - - - Value for the property - - - - Implements a paste menu item in the pop-up menu for the form - - - - - - - - - Sets the value for the Value property - - - - - New value for the property - - - - Performs actions needed when the OK button is clicked - - - - - - - - - Performs actions needed when the Cancel button is clicked - - - - - Object for the event notification - - - - Performs actions needed for a key received in the calculator form - - - - - Object for the event notification - - - Key examined in the method - - - - Performs actions needed when the calculator display is changed - - - - - Object for the event notification - - - - Initializes the calculator form using the specified layout - - - - - Layout applied to the calculator form instance - - - - Constructor for the class instance - - - - - Owner of the class instance - - - TCalculatorLayout used for the form instance - - - - Value displayed or returned from the calculator - - - - - - - - - - - - Panel with the calculator keys, operators,memory buttons, et. al. - - - - - - Panel for the display area on the calculator form - - - - - - Label used to display the value in the panel - - - - - - Event handler signalled to handle keys press on the calculator form - - - - - - Event handler signalled when the calculator display has been changed - - - - - - Creates and configures a new TCalculatorForm instance - - - - - - - - Form instance created in the method - - - Owner for the new form instance - - - Layout for the calculator panel in the form instance - - - - - - - - Color for the numeric digit buttons in a calculator - - - - - - Color for the Memory button in a calculator - - - - - - Color for the Clear button in a calculator - - - - - - Color for the OK button in a calculator - - - - - - Color for the Cancel button in a calculator - - - - - - Color for miscellaneous "other" buttons in a calculator - - - - - - Color for text on the display area for a calculator - - - - - - Color for the background of the display area in a calculator - - - - - - Font name used for buttons and displays in a calculator - - - - - - Font size used for buttons and displays in a calculator - - - - - - Font style used for buttons and displays in a calculator - - - - -
- -
-
+ + + + + + Contains classes and types used in TCalculatorForm + + + + + + + + + + + + + + + + + + + + Defines the default number of digits of precision used for values in TCalculatorForm + + + + + + + + Specifies an event handler signalled for Key events occurring in TCalculatorForm + + + + + + Key value examined in the event handler + + + + + Specifies an event handler signalled when the display in TCalculatorForm is changed + + + + + + + + +

+ TCalculatorState is an enumerated type with values that represent the status for keys/operations in the calculator. TCalculatorState is the type used to implement the Status property in TCalculatorPanel. +

+
+ + + +
+ + Value on the First key press + + + Value after the oepration for the key has been applied successfully + + + Value when the operation resulted in an error + + + + + +

+ TCalculatorLayout is an enumerated type with values that represent the layout for keys and panels on a calculator form. TCalculatorLayout is passed as an argument to the CreateCalculatorForm routine, and to methods in TCalculatorForm and TCalculatorPanel. +

+
+ + + + + + Use the content from the TCalcuatorDialog layout property +
+ + The default layout with larger button sizes and more whitespace + + + The compact layout with smaller button sizes + + + + + Implements a panel used for buttons and the value display in a calculator form + + + + + + + + + + + + + + + + + + + + + + + + + Sets the value for the text property + + + + + + + New value for the property + + + + Ensures that Text is updated and displayed when Status is csFirst + + + + + + + Performs actions for a key press not handled by a button in the calculator panel + + + + + + + + + + Clears the display and operator in the calculator panel + + + + + + + Updates the calculator panel to reflect an error condition, and signals OnError + + + + + + + + Sets the Text in the calculator panel to the specified value, and signals OnDisplayChange + + + + + + Double value formatted and assigned to the Text property + + + + Gets the Double value represented in the Text property + + + + + + + + + Finds the calculator button which handles the specified key character + +

+ Key contains a character value to locate in the button captions on the panel. Keys which are not represented by buttons, like Enter (#13) and Escape (#27), are translated to the value used for the target button. In addition, when ',' is used as the decimal separator on the system, it is translated into the '.' decimal notation. +

+

+ FindButton iterates through the Controls on the panel to locate the button using the associated Key. The return value is Nil when a button is not located for the value in Key. +

+
+ +
+ + + Button which handles the Key, or Nil when no button is available for Key + + + + Key character to locate in the buttons for the calculator panel + + + + Translates a mouse click on a button to the character key used in CalcKey + + + + + Calculator button for the button click notification + + + + + + ErrorBeep is an empty implementation in the current LCL version. + + + + + + Sets the display text for the associated control and signals OnTextChange + + + + + + + Initializes and configures the calculator panel using the specified layout + + + + + + + + + + + + + Locates the button using the specified Key and perform its Click method + + CalcKey is called when a button is located using the specified Key. + + + + + Object for the KeyPress event + + + Key value captured in the panel + + + + Loads the value in Text into the Clipboard as a text value + + + + + + + Pastes text from the Clipboard into the text display for the calculator panel + + + + + + + Gets the minumum number of precision digits allowable for the panel + + + + + + + + + + Updates the Memory indicator to reflect a non-zero value in the Memory property + + + + + + + Contains the Double value representing the Text in the panel + + + + + + Contains the Double value stored in the memory fopr the calculator + + + + + + + Maximum number of digits of precision allowed for the Double value in the calculator + + + + + + + + Indicates if a beep occurs when an error condition is detected in the calculator panel + + + + + + + + Contains the status or state for the calculator panel + + + + + + + + Character representing the last operator entered in the calculator panel + + + + + + Text representation for the Double value in the calculator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Color for the calculator panel + + + + + + + Implements the form used to display a calculator in a TCalculatorDialog + + + + + + + + + + + + + + + + Performs actions needed to handle OnKeyPress events in the calculator form + + + + + + Object for the event notification + + + Key handled in the event handler + + + + Implements a copy menu item in the pop-up menu for the form + + + + + Object for the event notification + + + + Gets the value for the Value property + + + + + Value for the property + + + + Implements a paste menu item in the pop-up menu for the form + + + + + + + + + Sets the value for the Value property + + + + + New value for the property + + + + Performs actions needed when the OK button is clicked + + + + + + + + + Performs actions needed when the Cancel button is clicked + + + + + Object for the event notification + + + + Performs actions needed for a key received in the calculator form + + + + + Object for the event notification + + + Key examined in the method + + + + Performs actions needed when the calculator display is changed + + + + + Object for the event notification + + + + Initializes the calculator form using the specified layout + + + + + Layout applied to the calculator form instance + + + + Constructor for the class instance + + + + + Owner of the class instance + + + TCalculatorLayout used for the form instance + + + + Value displayed or returned from the calculator + + + + + + + + + + + + Panel with the calculator keys, operators,memory buttons, et. al. + + + + + + Panel for the display area on the calculator form + + + + + + Label used to display the value in the panel + + + + + + Event handler signalled to handle keys press on the calculator form + + + + + + Event handler signalled when the calculator display has been changed + + + + + + Creates and configures a new TCalculatorForm instance + + + + + + + + Form instance created in the method + + + Owner for the new form instance + + + Layout for the calculator panel in the form instance + + + + + + + + Color for the numeric digit buttons in a calculator + + + + + + Color for the Memory button in a calculator + + + + + + Color for the Clear button in a calculator + + + + + + Color for the OK button in a calculator + + + + + + Color for the Cancel button in a calculator + + + + + + Color for miscellaneous "other" buttons in a calculator + + + + + + Color for text on the display area for a calculator + + + + + + Color for the background of the display area in a calculator + + + + + + Font name used for buttons and displays in a calculator + + + + + + Font size used for buttons and displays in a calculator + + + + + + Font style used for buttons and displays in a calculator + + + + +
+ +
+
diff --git a/docs/xml/lcl/extgraphics.xml b/docs/xml/lcl/extgraphics.xml index a234dcdc77..84d021df3c 100644 --- a/docs/xml/lcl/extgraphics.xml +++ b/docs/xml/lcl/extgraphics.xml @@ -1,53 +1,23 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + @@ -57,22 +27,18 @@ - - - - @@ -465,6 +431,8 @@ - + + + diff --git a/docs/xml/lcl/graphics.xml b/docs/xml/lcl/graphics.xml index 45660c631c..acbaac2650 100644 --- a/docs/xml/lcl/graphics.xml +++ b/docs/xml/lcl/graphics.xml @@ -3530,7 +3530,8 @@
- + +

Style can contain one of the following values: @@ -4649,15 +4650,29 @@ - - Check that the Resource specified for reading or writing is a valid type - result True if it is - + Determines if the specified resource type is valid for the image format + +

+ LazarusResourceTypeValid is a Boolean function used to determine if the specified resource type is valid for the image format. +

+

+ LazarusResourceTypeValid always returns False in TGraphic. The method must be overridden in descendent classes to check for resource type(s) supported for a specific image format. +

+
+ + + + + + + +
- + Returns True when ResourceType is supported in the image format - The Resource type which is to be checked + The resource type examined in the method @@ -4710,11 +4725,17 @@ - Loads the MIME-encoded data for the graphic from the specified stream + Loads the from the specified stream for the given MIME type

- LoadFromMimeStream reads graphic data from a MIME-encoded stream. + LoadFromMimeStream reads graphic data from a stream for the given MIME type. LoadFromMimeStream compares the value in AMimeType to the value in the MimeType property. When the values are the same, the LoadFromStream method is called the load the image data for the graphic from the stream in AStream.

+

+ In TGraphic, an EInvalidGraphic is raised when AMimeType contains any value other than an empty string (''). +

+ + Must be overridden in a descendent class to provide support for a MIME type representing a specific image format. +
@@ -4722,7 +4743,7 @@ Stream with the content loaded in the method
- MIME type expected in the stream content + MIME type representing the stream content @@ -4912,9 +4933,7 @@ - - GetFileExtensions - returns a list of the file extensions available - + Returns a list of the file extensions available

GetFileExtensions is a String class function used to get a delimited list of file extensions used for graphic files supported in the class. The '.' character is omitted from file extension(s), and extensions are separated by a SemiColon (;) character. For example: @@ -8545,6 +8564,14 @@ Represents handle types used for Bitmaps +

TBitmapHandleType is an enumerated type with values that represent handle types available for Bitmaps. On Windows platforms, the handle may represent two distinctly different storage mechanisms: @@ -8557,7 +8584,7 @@ The handle type indicates the storage format and content for the Bitmap.

- TBitmapHandleType is the type used to implement the HandleType property in TSharedCustomBitmap. + TBitmapHandleType is the type used to implement the HandleType property in TCustomBitmap and TSharedCustomBitmap.

@@ -8581,7 +8608,7 @@ - + Frees the handle for the shared image

@@ -8594,7 +8621,9 @@ No actions are performed in the method when the handle is already set to 0.

- + + +
@@ -8976,7 +9005,7 @@ Not used in the current implementation - + Renders the image to the specified canvas

@@ -8998,7 +9027,9 @@ Draw uses the Device Contexts for Canvas and DestCanvas, and calls the StretchMaskBlt routine in the LCL interface to render the image using methods in the widgetset. The Changing method in DestCanvas is called before drawing the image. The Changed method in DestCanvas is called after the image is drawn.

- + + +
Canvas where the image is rendered @@ -9011,10 +9042,11 @@ Gets the value for the Empty property

- Implements the abstract virtual method defined in the ancestor. Property value contains the result from the IsEmpty method in the shared raster image for the class instance. + Implements the abstract virtual method defined in the ancestor. The property value contains the result from the IsEmpty method in the shared raster image for the class instance.

+
@@ -9595,7 +9627,7 @@ Create is the overridden constructor for the class instance, and calls the inherited constructor on entry. Create ensures that the internal shared image instance is created and referenced for the implementation.

- Create sets the default value for the TransparentColor property to clDefault. This is done for Delphi compatibility where clDefault that the bottom left pixel in the image is used as the transparent color. + Create sets the default value for the TransparentColor property to clDefault. This is done for Delphi compatibility where clDefault indicates that the bottom left pixel in the image is used as the transparent color.

@@ -9860,13 +9892,28 @@ Number of byte to read from the stream
- - - Loads image data from a stream with the specified MIME type - + Loads image data from a stream for the specified MIME type + +

+ LoadFromMimeStream is an overridden method in TRasterImage. +

+

+ LoadFromMimeStream examines the ClassType for the image to determine if it is handled in the overridden method. TBitmap, TPixmap, and TCustomIcon descendants are handled in the method. +

+

+ LoadFromMimeStream compares the value in AMimeType to the PredefinedClipboardMimeTypes values defined in LCL. If AMimeType matches one of the values defined for TPixmap or TBitmap, then the LoadFromStream method is called to load image data from AStream. +

+

+ Other ClassType or MIME type values cause the inherited LoadFromMimeStream method to be called. +

+

+ LoadFromMimeStream is used in the implementation of the AssignGraphic method in TClipboard. +

+
+
@@ -9879,7 +9926,23 @@ Loads image data from the specified TRawImage instance - + +

+ LoadFromRawImage is a procedure used to load raw image data in AImage into the class instance. +

+

+ LoadFromRawImage calls BeginUpdate to increment the update process count, and calls EndUpdate when the image data has been loaded in the method. +

+

+ LoadFromRawImage calls Clear to free the internal save stream for the class instance, and calls SetSize to reflect an empty image. No additional actions are performed in the method If AImage contains an empty image. +

+

+ The Image Descriptor in AImage is assigned to the internal TRawImage instance to capture the image metadata. +

+

+ ADataOwner indicates if the internal TRawImage instance is the owner for the image data in AImage. When set to True, values in AImage data are assigned directly to the pointer to the internal raw image data. Values include the size and content for the image data, the image mask, and the palette. When set to False, storage for values is allocated using GetMem and copied from AImage using the Move routine. +

+
@@ -9893,24 +9956,41 @@ - LoadFromIntfImage - loads image data from an Interface stream + Loads the image from a TLazIntfImage instance - + + Calls the CreateBitmaps method to create the image and mask handles used to access the image data. + Calls SetHandles to apply the image and mask handles to the class instance. + - + TLazIntfImage instance with image data loaded in the method - - SaveToStream - write graphic data to a stream, with error checking - + Saves image data to the specified stream - SaveToStream - write graphic data to a stream +

+ SaveToStream is an overridden method used to write image data to the stream specified in AStream. +

+

+ SaveToStream calls SaveStreamNeeded to ensure that an internal save stream exists in the class instance. An EInvalidGraphicOperation exception is raised in SaveStreamNeeded when the active update count for the count is not 0 (zero). An FPImageException is raised when a TMemoryStream instance could not be created and initialized in SaveStreamNeeded. +

+

+ SaveToStream resets the internal save to stream to its origin, and resizes AStream to include sufficient storage for the values in the internal save stream. The CopyFrom method in AStream is called to store the content for the internal shared image. An FPImageException is raised when the number of bytes written in the CopyFrom method does not match the size for the internal save stream. +

+ +

+ Raises an FPImageException exception when the number of bytes written to the stream does not match the size for the raw image data. +

+

+ An Exception may be raised in SaveToStream (called in the method). +

+
- TGraphic.SaveToStream +
@@ -9918,12 +9998,21 @@ - - GetSupportedSourceMimeTypes calls inherited method and allows addition of extra types not specified there - - + Gets a list of supported MIME types for image data used in the image type + +

+ GetSupportedSourceMimeTypes is an overridden method in TRasterImage used to get the list of MIME types used for image data in the image type. List is the TStrings instance where the list of supported MIME types is stored. +

+

+ GetSupportedSourceMimeTypes uses the value in ClassType to determine if the request is handled in the overridden method. It is handled in the method when ClassType is TBitmap, TPixmap, or TCustomIcon. Values in the PredefinedClipboardMimeTypes constant for the TBitmap and TPixmap types are added to List. When ClassType contains any other type, the inherited method is called. +

+

+ GetSupportedSourceMimeTypes is called from the AssignPicture method in TClipboard. +

+
- + +
@@ -9931,22 +10020,28 @@ - - GetSize - finds the size of the Image - - + Gets the image Width and Height from the metadata for the raw image + +

+ Calls GetRawImageDescriptionPtr to get a pointer to the image descriptor in the raw image data. When the image descriptor is Nil, or its Format contains ricfNone, the values in AWidth and AHeight are both set to 0 (zero). Otherwise, the Width and Height values in the image descriptor are used as the output parameter values. +

+
- + Width for the raw image data - + Height for the raw image data - The Mask with transparent areas in the Image - + Applies the color used for transparent pixels to the image + +

+ Calls CreateMask to create and appy the mask handle required for the fixed color transparency. +

+
@@ -9954,28 +10049,40 @@ - - SetHandles - allows the user to specify handles - - - + Sets handles for the bitmap and the mask to the specified values + +

+ SetHandles is a procedure used to set the handles for the bitmap and the mask to the values specified in ABitmap and AMask. SetHandles is an abstract virtual method in TRasterImage, and must be implemented in a descendent class to store handle values in the shared image used in the image format. +

+
+ + + +
- + Handle to use for the Bitmap - + Handle to use for the Mask - ReleaseBitmapHandle - releases the handle used by the Bitmap + Releases the handle in the shared image without freeing the BitmapHandle - + +

+ ReleaseBitmapHandle is a HBITMAP function used to release the hndle for the shared image without freeing it. The return value contains the handle value in the shared image when its ReleaseHandle method is called. +

+

+ Calls BitmapHandleNeeded to ensure that the BitmapHandle and optional MaskHandle are valid for the image type. Calls FreeCanvasContext to free the cavas context when the handle been has changed. +

+
- + Value for the handle in the shared image before it is released @@ -10134,13 +10241,38 @@ Row number for the pixels accessed in the raw image data - - Color used for transparent pixels in the image - + +

+ TransparentColor is a TColor property which indicates the color used for transparent pixels in the raw image data. The default value for the property is clDefault. +

+

+ TransparentColor is used along with TransparentMode to determine whether a fixed color is used for transparency, or if the tranparent color is read from a specified pixel in the raw image data. +

+

+ When TransparentColor contains clDefault, the RequestTransparentColor method is used to get the transparency color value from the bottom-left pixel in the raw image data. +

+

+ When setting a new value for the property, the TransparentMode property is updated as well. When clDefault is assigned to the property, TransparentMode is set to tmAuto. For other color values, TransparentMode is set to tmFixed. +

+

+ MaskHandleAllocated is called to determine if a HBITMAP handle has been allocated for the MaskHandle property. When True, the MaskHandle is reset to 0 to indicate the handle is no longer in use or is invalid. +

+

+ The Changed method is called to update the internal save stream for the image (when needed), set Modified to True, and signal the OnChange event handler (when assigned). +

+
+ + + + + + + +
@@ -10172,11 +10304,20 @@
- - TSharedCustomBitmap - a reference counted base class for TSharedBitmap, TSharedPixmap, TSharedJPEGImage, TSharedPortableNetworkGraphic and TSharedPortableAnyMapGraphic - - - + Implements the base class for a reference-counted shared image + +

+ TSharedCustomBitmap is a TSharedRasterImage descendant which implements the base class for reference-counted shared images, like: TSharedBitmap, TSharedPixmap, TSharedJPEGImage, TSharedPortableNetworkGraphic and TSharedPortableAnyMapGraphic. +

+
+ + + + + + + +
@@ -10230,21 +10371,37 @@ - - - - FreeImage - release the Image from the Bitmap - - - + Frees raw image data for the shared bitmap and resets its image descriptor + +

+ Calls the FreeData method in the internal TRawImage member to free the raw image data. Sets the Format in its Description property to ricfNone. +

+

+ FreeImage is called from the destructor when the class instance is destroyed. +

+
+ + + +
- ReleasePalette - returns the Handle of the released Palette + Returns the Handle of the released Palette - + +

+ ReleasePalette is a HPALETTE function used to release the internal pallette handle for the shared bitmap. The return value contains the existing palette handle on entry. +

+

+ Sets the value in the internal palette handle to 0 to indicate that the palette handle is no longer in use or is invalid. +

+

+ Use FreePalette to remove the palette handle in widgetset classes. +

+
@@ -10252,14 +10409,14 @@ - - GetPixelFormat - returns the format for the Pixels in this Bitmap - + Gets the value for the PixelFormat property - + + + - + Value for the property @@ -10303,20 +10460,34 @@ - - Destroy - destructor for TSharedCustomBitmap: frees stream, handle and image, then calls inherited Destroy - - + Destructor for the class instance + +

+ Destroy is theoverridden destructor for TSharedCustomBitmap. +

+

+ Destroy frees the internal save stream for the class instance. It also calls FreeHandle and FreeImage to free the handle and the raw image data for the shared bitmap. Calls the inherited destructor prior to exiting from the method. +

+
- TObject.Destroy + + +
Determines if the handle for the shared bitmap has been allocated - + +

+ HandleAllocated is an overridden method used to determine if the handle for the shared bitmap has been allocated. HandleAllocated implements the abstract virtual method defined in TSharedImage. +

+

+ The return value is True when the internal handle has a non-zero value. +

+
- +
@@ -10327,8 +10498,16 @@ ImageAllocated - returns True if an image has been allocated - - + +

+ ImageAllocated is a Boolean function which indicates if the internal raw image data has been allocated for the shared bitmap. The return value is True when the TRawImage instance in the class has a value other than ricfNone in its image descriptor. +

+
+ + + + +
True when the color format for the raw image data has been assigned @@ -10342,6 +10521,9 @@

HandleType is a TBitmapHandleType property which indicates the Bitmap handle type and the storage mechanism used for the Bitmap header and data.

+ + Use of HandleType is not implemented in the current LCL version. +
@@ -10350,32 +10532,44 @@ The Height of the Bitmap

- Height is a read-only Integer property which contains the height for the shared bitmap image as indicated in the descriptor for the raw image data. + Height is a read-only Integer property which contains the height for the shared bitmap image as indicated in the descriptor for the raw image data. The property value is always 0 (zero) when the descriptor for the internal raw image data contains ricfNone.

- + + + + +
- - PixelFormat - the format for the Pixels in this Bitmap - + Storage format for pixels in the raw image data

- PixelFormat is a read-only TPixelFormat property with the storage format used for pixel data in the raw image. + PixelFormat is a read-only TPixelFormat property with the storage format used for pixel data in the raw image. It also determines the number of colors (or color depth) allowed in the raw image data. +

+

+ See TPixelFormat for more information about the values and meanings in the enumeration.

- + + + +
The Width of the Bitmap

- Width is a read-only Integer property which contains the width for the shared bitmap image as indicated in the descriptor for the raw image data. + Width is a read-only Integer property which contains the width for the shared bitmap image as indicated in the descriptor for the raw image data. The property value is always 0 (zero) when the descriptor for the internal raw image data contains ricfNone.

- + + + + +
@@ -10458,7 +10652,7 @@ Updates the value in PixelFormat from the shared Bitmap image

- Called when the value for PixelFormat is retrieved and the descriptor has not already been read for the image. + Called when the value for PixelFormat is retrieved and the image descriptor has not already been read for the shared image.

@@ -10524,7 +10718,7 @@ Object instance for the change notification
- + Creates a handle for the bitmap using the bitmap handle type in the bitmap image data @@ -10542,7 +10736,9 @@ CreateDefaultBitmapHandle is called from the BitmapHandleNeeded method in the ancestor class.

- + + +
Default handle for the bitmap @@ -10614,22 +10810,36 @@ Value for the property - - - - + + Gets a pointer with the raw image data + +

+ Calls RawImageNeeded to ensure that the image descriptor, save stream, and handle are valid for the shared Bitmap image. Calls the CreateData method in the raw image pointer (when needed) prior to exiting from the method. +

+
+ + +
- + Pointer to the TRawImage instance for the shared bitmap image - - - - + + + Gets a pointer to the image descriptor for the shared Bitmap image. + + +

+ Calls RawimageNeeded to ensure that the image desriptor is valid. +

+
+ + +
- + Pointer to the TRawImageDescription instance for the shared bitmap image @@ -10640,6 +10850,7 @@

+
@@ -10647,7 +10858,9 @@ - + + + @@ -10656,7 +10869,9 @@ - + + + @@ -10665,22 +10880,39 @@ - + + + - - RawimageNeeded - method to signal that a raw image is required; if - ADescOnly is True, only a descriptor is required - - + Ensures that the RawImage data is allocated prior to use + +

+ Ensures that the RawImage property is allocated prior to accessing values in the raw image data. +

+

+ ADescOnly indicates whether the image descriptor or the the complete raw image data is required. When ADescOnly is True, only the TRawImageDescription in the raw image is needed. When set to False, all values in the TRawImage instance are required. +

+

+ RawImageNeeded is called from methods access the raw image data, and occurs before the value in RawImage is accessed. For example: +

+
    +
  • SetSize
  • +
  • UpdatePixelFormat
  • +
  • GetMonochrome
  • +
  • UnshareImage
  • +
  • GetRawImagePtr
  • +
  • GetRawImageDescriptionPtr
  • +
+
- + True when only the image descriptor in the raw image data is needed @@ -10703,7 +10935,7 @@ Sets the value for the PixelFormat property

- Implements the abstract virtual method defined in the TRasterImage ancestor. + Implements the abstract virtual method defined in the TRasterImage ancestor.

Frees the raw image data in the class instance. No actions are performed in the method when the new property value is the same as the existing property value. @@ -10720,24 +10952,50 @@ Frees the shared image in the bitmap, and creates a new one - + +

+ UnshareImage is an overridden method used to free the shared image in the bitmap, and create a new one. UnshareImage implements the abstract virtual method defined in the ancestor class. +

+

+ UnshareImage calls GetSharedImageClass to get the class type used for the shared image, and creates a new instance of the class. It is cast to TSharedCustomBitmap, and its Reference method is called to increment the reference count for the shared image. +

+

+ CopyContent indicates whether the existing image data is copied into the new shared image instance. When set to True, the content in the existing shared image is copied and stored in the new shared image instance. When set to False, only the image descriptor in the shared image is copied. This gets the metadata for the image. +

+

+ UnshareImage calls FreeCanvasContext to free the device context for the Canvas used in the image. +

+
- + True copies the exisiting content in the shared image - - Sets the handles for the image and mask in the shared image to the specified values + + Sets the handles for the image and mask in the shared Bitmap to the specified values -

- Implements the abstract virtual method defined in TRasterImage. + UpdateHandles is an overridden Boolean function which implements the abstract virtual method defined in TRasterImage. UpdateHandles is used to set the handles for the shared bitmap image and its mask to the values specified in ABitmap and AMask. +

+

+ The return value is True when the values in ABitmap and AMask are successfully applied in the class instance. The return value is False when ABitmap and Mask have the same values as the exisiting handles in the class instance, and the action is not needed. +

+

+ The FreeHandle method in the internal shared image is called before applying the value in ABitmap. +

+

+ FreeMaskHandle is called to free the value in MaskHandle before applying the value in AMask. +

+

+ UpdateHandles is used in the implementation of the MaskHandleNeeded and SetHandles methods.

- + + +
True when the handle(s) are successfully applied @@ -10757,41 +11015,38 @@

+ +
- - Destroy - destructor for TCustomBitmap: frees any Mask handles, then performs inherited Destroy - + Destructor for the class instance

- Destroy is the destructor for the class instance. The supplied code can override the method defined for ancestor classes. + Destroy is the overridden destructor for the class instance. Destroy calls FreeMaskHandle to free the handle in MaskHandle (when assigned). Destroy calls the inherited destructor prior to exiting from the method.

- + + + + +
- - Assign: find out about the Source of the call - + Copies values from the specified persistent object into the class instance

- Assign: find out about the Source of the call. + Assign is an overridden method in TCustomBitmap used to copy property values from the persistent object in Source into the current class instance. Assign calls the inherited method on entry using Source as an argument.

- If the Bitmap data are already in use, the data are shared; if not, a new Bitmap is produced. + When Source is a TCustomBitmap descendant, values in its PixelFormat and PixelFormatNeedsUpdate members are copied into the members in the class instance.

- - - The Source control (usually a Bitmap) for the Assign procedure - - - + Persistent object with values copied in the method @@ -10821,100 +11076,238 @@ - - - - + + + Determines if the specified resource type is valid for the image format + + +

+ LazarusResourceTypeValid is a Boolean function used to determine if the value in ResourceType is a valid resource type for the image format. +

+

+ LazarusResourceTypeValid is an overridden method in TCustomBitmap, and re-implements the method defined in the ancestor class. The return value is True when ResourceType contains one of the values: +

+
+
'BMP'
+
Bitmap resource type.
+
'BITMAP'
+
Bitmap resource type.
+
'XPM'
+
Pixmap resource type.
+
+

+ Case is not significant for the value in ResourceType; it is converted to uppercase prior to checking its value. +

+

+ The return value is False if ResourceType contains any other value. +

+

+ LazarusResourceTypeValid is used in the implementation of the LoadFromLazarusResource method. +

+
+ + + +
- Returns True if a valid resource type is found + Returns True if the resource type is valid for the image format - The target resource type specified as a string + The resource type examined in the method - - - - + + Returns True if a handle has been allocated for the Bitmap + +

+ BitmapHandleAllocated is an overridden Boolean function used to determine if a handle has been allocated for the bitmap. BitmapHandleAllocated implements the abstract virtual method defined in the ancestor class. +

+

+ The return value is True when the handle in the internal shared image has a non-zero value. +

+

+ BitmapHandleAllocated is used in the implementation of the MaskHandleNeeded method. +

+
+ + +
- - - + Determines if the mask handle has been allocated for the image + +

+ MaskHandleNeeded is an overridden Boolean function in TCustomBitmap, and is used to determine if MaskHandle has been allocated for the image mask. It implements the abstract virtual method defined in the ancestor class. +

+

+ The return value is True when the MaskHandle property contains a non-zero value. +

+

+ MaskHandleAllocated is used in the implementation of methods like: +

+
    +
  • BitmapHandleNeeded
  • +
  • SetTransparentColor
  • +
  • SetBitmapHandle
  • +
  • CreateMask
  • +
  • Assign
  • +
+
+ + + + +
- Returns True is a mask handle has been allocated + Returns True if a mask handle has been allocated for the image - - - - + + Indicates whether a handle has been allocated for a palette in the image + +

+ PaletteAllocated is an overridden Boolean function in TCustomBitmap, and indicates whether a handle has been allocated for a palette in the image. PaletteAllocated implements the abstract virtual method defined in the ancestor class. +

+

+ The return value is True when palette handle in the internal shared image contains a non-zero value. +

+
+ + +
- Returns True if a palette has been allocated + Returns True if a palette handle has been allocated for the image - Release the bitmap handle, effectively freeing resources - + Releases the bitmap handle for the shared image + +

+ Calls HandleNeeded to ensure that the handles for the bitmap and mask reflect the values for the raw image data. Calls the ReleaseHandle method in the shared image to free the handle for the bitmap. +

+
- Returns True if handle has been correctly released + Returns True when the handle is sucessfully released - - + Sets handles for the bitmap and the mask to the specified values + +

+ SetHandles is a procedure used to set the handles for the bitmap and the mask to the values specified in ABitmap and AMask. SetHandles ensures that the Canvas context, shared image, and save stream are unshared and freed. SetHandles calls UpdateHandles to store the specified handles for the shared image and its mask. +

+

+ SetHandles is called from methods that load image data using TLazIntfImage from the LCL interface. It is also called when values are assigned to the BitmapHandle or MaskHandle properties. +

+
- + New Bitmap handle for the image - + New Mask handle for the image - - SetSize - allows the user to specify the size of the Bitmap - - + Sets the Height and Width for the image to the specified values + +

+ SetSize is an overridden method in TCustomBitmap used to change the Height and Width for the bitmap image to the specified values. SetSize implements the abstract virtual method defined in the ancestor class. +

+

+ Calls RawImageNeeded to ensure that the image header in RawImage is valid for the image. +

+

+ The values in AWidth and AHeight contain the new dimensions for the image. Both values must contain a positive value or 0. The default value for an argument is set to 0 when a negative value is found. Their values are assigned to the image desriptor in the shared imaged to change the size for the image content. No additional actions are performed in the method if either value is not successfully applied to the raw image descriptor. +

+

+ Calls UnshareImage and RawImageNeeded to re-create the raw image data for the shared image. +

+

+ Copies exisiting pixel data for the image into the resized image. When the new image size is smaller, only the portion of the image that fits within the new dimensions is copied. Uses the CopyPixels method in the TLazIntfImage instance to copy the image content. +

+

+ Ensures that the Canvas context, BitMapHandle, and MaskHandle are updated for the image. Calls the Changed method to update the shared image data and signal the OnChange event handler (when assigned). +

+
- + New width for the image - + New height for the image The operating system Handle associated with this bitmap - - + +

+ In TCustomBitmap, the handle is provided by the internal shared image class (TSharedCustomBitmap) and stored in the BitmapHandle property. +

+
+ + + +
- The type of system handle - - + Handle type for the Bitmap + +

+ HandleType is a TBitmapHandleType property which indicates the handle type used for the bitmap image data. HandleType identifies whether the bitmap handle is classified as a Device-Dependent Bitmap (DDB) or a Device-Independent Bitmap (DIB). +

+

+ See TBitmapHandleType for more information about the handle types and their specifics. +

+

+ The value for the property is read from the internal shared image in the class instance. Setting a new value for the property has no effect in the current implementation; the value is always read from the raw image data. +

+
+ + + +
- Whether using monochrome display - - + True when the image contains monochrome image data + +

+ Monochrome is a Boolean property which indicates whether the raw image data is represented using pixels of a single color. +

+

+ The property value is True when the descriptor for the shared raw image data has a color depth of 1. The PixelFormat property willl also contain the value pf1bit. +

+

+ Setting a new value in Monochrome causes the value in PixelFormat to be changed. When set to True, PixelFormat is set to pf1bit. When set to False, the value pfDevice is assigned to the PixelFormat property. +

+

+ Changing the value in Monochrome (and PixelFormat) causes the image data to be discarded, and the Handle for the internal shared image is freed. +

+

+ No actions are performed when Monochrome is set to the existing value for the property. +

+
+ + + +
@@ -11086,28 +11479,38 @@ Not used in the current implementation - - Write the data to a stream - + +

+ WriteStream is an overridden procedure in TFPImageBitmap used to write the image content to the stream specified in AStream. WriteStream implements the abstract virtual method defined in TRasterImage. +

+

+ WriteStream creates temporary TLazIntfImage and TFPCustomImageWriter instances that are used to write the data for the internal TRawImage instance used in the class. Raw image data is stored in the TLazIntfImage instance, and its SaveToStream method is called to write the values to AStream. +

+

+ No actions are performed in the method when the data size for the raw image is 0. +

+
- TRasterImage.WriteStream +
- - - - + Stream where the image data is stored - + Returns a list of the file extensions available for the image type + +

+ Always returns an empty string ('') in TFPImageBitmap. +

+
- + List of file extensions supported for the image type @@ -11129,32 +11532,55 @@ True when the stream contains a image data in a supported format - - - - IsFileExtensionSupported - returns True if the given file extension is supported? - - + Indicates whether the given file extension is supported for the image type + +

+ IsFileExtensionSupported is a Boolean class function used to determine if the file extension in FileExtension is valid for the image type. If FileExtension includes a period character ('.'), it is removed before use. +

+

+ The return value is True when FileExtension is included in the value returned by the GetFileExtensions method. No actions are performed in the method when FileExtension is an empty string (''). +

+

+ IsFileExtensionSupported is used in the implementation of LazarusResourceTypeValid. +

+
- + True when the file extension is valid for the image type - + File extension checked for the image type - - - - + + + Determines if the specified resource type is valid for the image format + + +

+ LazarusResourceTypeValid is a Boolean function used to determine if the value in ResourceType is a valid resource type for the image format. +

+

+ LazarusResourceTypeValid is an overridden method, and re-implements the method defined in the ancestor class. The return value is True when ResourceType contains is one the file extensions returned from IsFileExtensionSupported. The return value is False if ResourceType contains any other value. +

+

+ LazarusResourceTypeValid is used in the implementation of the LoadFromLazarusResource method. +

+
+ + + + + +
- + True when the resource type name is one file extensions for the image format - + Resource type examined in the method @@ -11167,7 +11593,11 @@ Defines a reference-counted shared Bitmap graphic - + +

+ TSharedBitmap is a TSharedCustomBitmap descendant. +

+
@@ -11262,22 +11692,43 @@
- Gets the class reference used to create instances of the FCL-compatible reader class + Gets the class reference used to create the FCL-compatible reader for the image - Returns a TLazReaderBMP class reference. +

+ GetReaderClass is an overridden TFPCustomImageReaderClass class function used to get the FCL-compatible reader for the image type. The return value is a TLazReaderBMP class reference in TBitmap. +

+

+ GetReaderClass is called from the ReadStream method when the reader is created and intialized. It is used to load a TLazIntfImage instance with the image content supplied in a stream. It is also used in the IsStreamFormatSupported method to determine if the stream contains an image format that can be read using the reader class type. +

- + + + + + + + + +
Class reference used to create instances of the reader class - Gets the class reference used to create instances of the FCL-compatible writer class + Gets the class reference used to create instances of the FCL-compatible image writer - Returns a TLazWriterBMP class reference. +

+ The return value is a TLazWriterBMP class reference in TBitmap. +

+

+ GetWriterClass is called from the WriteStream method when the image writer is used to write a TLazIntfImage instance to a stream. +

- + + + +
Class reference used to create instances of the writer class @@ -11286,12 +11737,20 @@ Gets the class reference used to create new instances of a shared image - Returns a reference to the TSharedBitmap type. +

+ GetSharedImageClass provides a class reference used to create new instances of the shared image class used in TBitmap. +

+

+ The return value is a TSharedBitmap class reference in TBitmap. +

+

+ GetSharedImageClass is called from methods like Create, Assign, and CanShareImage. +

- Creates new instances of a shared image + Class reference used to create new instances of the shared image class @@ -11352,12 +11811,12 @@ - - TSharedPixmap - a reference counted Pixmap graphic - + Implements a reference-counted shared Pixmap image type + + @@ -11371,7 +11830,7 @@ Pixmap is an image file format used by the X Window System. It is intended primarily for creating icons, and supports transparent pixels. Derived from the earlier XBM syntax, it is a plain text file using the XPM2 format or a C programming language syntax, which can be included in a source code file.

- PixMap ensures that specified resources (image, file, or stream) are of correct type and format. + TPixmap ensures that specified resources (image, file, or stream) are of the correct type and format.

@@ -11404,16 +11863,17 @@ class reference used to create the shared image in the class instance
- + - + + - Returns True if resource type is 'XPM' + Returns True if the resource type is 'XPM' - + Resource type examined in the method @@ -11589,13 +12049,13 @@ Class reference used to create new instances of TIconImage - + + + - - TSharedIcon - a reference counted shared Icon - + Implements a reference-counted shared Icon image type

TSharedIcon is a TSharedRasterImage descendant which implements a reference counted shared Icon. TSharedIcon provides access to the list of images available in the Icon as TIconImage instances using the Images property. Methods are provided to add, delete, clear, sort, and retrieve the images. @@ -12111,13 +12571,13 @@

- Gets the ordinal position in the internal image list for the icon with the specified pixel format, height, and width. The return value is -1 if an image using all of the requested values was not found in the list. + Gets the ordinal position in the internal image list for the icon with the specified pixel format, height, and width. The return value is -1 if an image using all of the requested values was not found in the list.

- Assign the return value to the Current property to use it as the selected image for the icon. + Assign the return value to the Current property to use it as the selected image for the icon.

- Use GetBestIndexForSize to find the position of the image which matches most closely the specified height and width. + Use GetBestIndexForSize to find the position of the image which matches most closely the specified height and width.

@@ -12162,7 +12622,7 @@

- GetDefaultSize is a TSize class function used to gets the default size used for new instances of the class. The return value uses the SM_CXICON and SM_CYICON values returned from the GetSystemMetrics function in its cx and cy members. + GetDefaultSize is a TSize class function used to get the default size in new instances of the class. The return value uses the SM_CXICON and SM_CYICON values returned from the GetSystemMetrics function in its cx and cy members.

@@ -12175,7 +12635,7 @@ Gets the value for the MaskHandle property

- GetMaskHandle implements the abstract method defined in the ancestor class. + GetMaskHandle implements the abstract method defined in the ancestor class.

@@ -12304,7 +12764,7 @@ Type identifier for images in the icon
- + Ensures that a handle for the image has been allocated

@@ -12317,7 +12777,9 @@ HandleNeeded calls the CreateIconIndirect routine for the widgetset to get the value used as the Handle for the shared image.

- + + +
@@ -12347,63 +12809,154 @@ - - - - - - + + Reads data for the class instance from a stream + +

+ ReadData is an overridden method used to read the data for the class instance from the TStream instance specified in Stream. ReadData is the method called when TFiler reads a persistent object during LCL component streaming. +

+

+ ReadData saves the position in Stream on entry, and restores the original position prior to exiting from the method. +

+

+ ReadData checks the values in Stream to determine if a size prefix for the content is stored in the stream. Delphi streaming does not include the size prefix. Current Lazarus versions do. When the LongInt value used as the StreamSignature is 0, the LoadFromStream method is called to load the contents of the stream. Otherwise, the inherited method is called to complete the operation. +

+

+ ReadData is also called from the LoadFromResourceHandle method in TIcon. +

+
+ + + + + +
- - - - + + Reads the content for the icon from the specified stream + +

+ ReadStream is an overridden procedure used to read the content for the icon from the stream specified in AStream. ReadStream implements the abstract virtual method defined in the ancestor class. +

+

+ ReadStream verifies that AStream contains an icon image by checking for header value(s) that are valid for .ICO data. If the header values are nopt found, an EInvalidGraphic exception is raised. +

+

+ For icon data, the icon directory must be read from the stream. The header contains the number of icon directory entries included in the stream. The icon directory entries are read from AStream, and include values for each icon image that includes: +

+
    +
  • HotSpotX
  • +
  • HotSpotY
  • +
  • BytesInRes
  • +
  • ImageOffset
  • +
+

+ ReadStream positions the stream, and reads image data for the each of the icon directory entries. It handles both DIB Bitmap and PNG (used in WIndows Vista) image data for the icon images. An FCL-compatible image reader is created as required for the image type, and a TLazIntfImage instance is used to capture the raw image data from the stream. Images read from the stream are added to the internal list of images in the TSharedIcon member for the class instance. +

+

+ ReadStream calls CheckRequestedSize to use the Width and/or Height specified in the class instance. GetBestIndexForSize is called to determine the value in Current with the requested image size. +

+
+ + +
- + Stream instance with the image content read in the method - + Number of bytes expected for the icon data - - - - + + Sets the value for the Masked property + +

+ SetMasked is an empty implementation in TCustomIcon. +

+
+ + +
- + New value for the property - - - - + + Sets the value for the PixelFormat property + +

+ Changing the value for PixelFormat raises an EInvalidGraphicOperation exception in TCustomIcon. +

+
+ + + +
- + New value for the property - - - - + + Sets the value for the Transparent property + +

+ SetTransparent is an empty implementation in TCustomIcon. +

+
+ + + +
- + New value for the property - - - - + + Unshares the shared image when the content in the icon is changed + +

+ UnshareImage is an overridden procedure used to stop sharing the image(s) for the icon. UnshareImage implements the abstract virtual method defined in the enacestor class. +

+

+ No actions are performed in the method when the RefCount for the internal TSharedIcon instance is less than 1. +

+

+ When sharing is stopped, the internal TSharedIcon instance in the class is re-created. +

+

+ CopyContent indicates whether exising content from icon images is copied into the new image list. When set to True, TIconImage instances are re-created for each of the icon images and their existing content is copied. When set to False, image data for the icon is empty. +

+

+ UnshareImage calls FreeCanvasContext to discard the device context used in the Canvas. +

+

+ UnshareImage calls the Release method for the old TSharedIcon instance. +

+

+ UnshareImage is called from methods which alter the handle or image content for the icon, including: +

+
    +
  • SetHandle
  • +
  • Add
  • +
  • Assign
  • +
  • AssignImage
  • +
  • Delete
  • +
+
+ + +
- + True if exisitng image content is copied in the method @@ -12446,28 +12999,67 @@ Handle compared to the shared icon image - - - - + + Sets the Bitmap and Mask handles for the current image in the icon + +

+ UpdateHandles is an overridden method used to set the Bitmap and Mask handles for the Current icon image to the specified values. UpdateHandles implements the abstract virtual method defined in the ancestor class. +

+

+ UpdateHandles uses the value in Current to determine the TIconImage in the internal image list that is updated in the method. +

+

+ When Current is set to -1, an icon image has not been selected and no actions are performed in the method. The return value is False if the handles could not be applied to icon image. +

+

+ UpdateHandles calls the UpdateHandles method for the TIconImage indicated in Current using the values in ABitmap and AMask as arguments. The return value is True if the handles are successfully applied to the icon image. +

+

+ UpdateHandles is called from methods like: +

+
    +
  • BitmapHandleNeeded
  • +
  • MaskHandleNeeded
  • +
  • UpdateHandle
  • +
  • Assign
  • +
+
+ + +
- + True if the new handles are successfully applied to the icon image - + Bitmap handle for the current image in the icon - + Mask handle for the current image in the icon - - - - + + Writes the content for the multi-image icon to the specified stream + +

+ WriteStream is an overridden method used to write the content for the multi-image icon to the stream specified in AStream. WriteStream implements the abstract virtual method defined in the ancestor class. +

+

+ WriteStream performs actions needed to write the header, icon directory, and content for each of the images used in the multi-image icon to the TMemoryStream instance. It handles both PNG and DIB Bitmap icon images, and creates Mask data for images when it is not already present. +

+

+ For icon images used in TCursorImage, the X and Y coordinates for the HotSpot are also included in the image data. +

+

+ WriteStream is called from SaveStreamNeeded when the SaveToStream method is performed. +

+
+ + +
- + TMemoryStream instance where icon data is stored @@ -12499,7 +13091,17 @@ Add - an Icon formatted as AFormat, with specified Height and Width - + +

+ Add is procedure used to create an image for the icon with the attributes specified in AFormat, AHeight, and AWidth. Add calls GetIIndex to determine if an icon image with the requested attributes already exists in the image list for the icon. An EInvalidGraphicOperation exception is raised when the image already exists in the internal image list. +

+

+ Add calls UnshareImage to release the shared image handle, and adds a new image class instance to the shared icon. If the icon image is the first one in the list, the value in Current is set to 0 (zero) and the UpdateCurrentView method is called. +

+

+ Use Current to make an icon image active for the class instance. Use AssignImage to store the image at the position in Current. +

+
@@ -12513,73 +13115,158 @@ - - Assign checks if Source is correct data type, then copies image data - - + Copies values from the specified persistent object into the current class instance + +

+ Assign is an overridden method used to copyvalues from the persistent object in Source into the current class instance. Assign calls BeginUpdate to increment the active update counter, and calls EndUpdate prior to exiting from the method. +

+

+ Assign handles specific class types in Source, including: +

+
+
+ TRasterImage +
+
+ Calls Clear to remove existing image content, and calls Add to create and icon image with the attributes in the PixelFormat, Height, and Width properties in Source. Calls AssignImage to store the image content from Source in the icon image. If the shared image class in Source is different than the one for the current class instance, UnshareImage is called. +
+
+ TCustomIcon +
+
+ Sets the value in Current to the value found in Source. +
+
+

+ When Source is derived from another class type, the inherited Assign method is called. +

+
- TPersistent.Assign + +
- + Persistent object with values copied into the current class instance - - AssignImage - copies information from the source image to the current one - - - + Copies image data from the source image to the current icon image + +

+ AssignImage is used to copy image data from ASource to the currently selected image for the icon. +

+

+ AssignImage is typically used to assign the icon image when Add is used to create a new icon image with the required attributes (PixelFormat, Height, Width). AssignImage is called from the Assign method to store a single raster image to the icon. +

+
+ + + +
- + Image with the values assigned to the current icon image - - Clear the Icon and release its resources - - + Removes the image content for the icon + +

+ Clear is an overridden method used to remove the image content for the icon. Clear frees the internal save stream for the image. The internal shared image is also freed and re-created. The value in Current is set to -1 to indicate that an icon image has not been selected. +

+

+ Clear calls the Changed method to set the value in Modified and signal the OnChange event handler (when assigned). +

+

+ No actions are performed in the method when Empty returns True. +

+ + Clear does not call the method inherited from TRasterImage. + +
- TGraphic.Clear +
- Delete the indexed Icon + Deletes the image at the specified position in the list of images for the icon - + +

+ Delete is a procedure used to delete the icon image at the ordinal position specified in AIndex from the list of images for the icon. +

+

+ Delete calls UnshareImage to stop sharing the image list for the icon. A copy of the images is kept and restored when the Delete method in TSharedIcon has removed the image at the specified postion. +

+

+ When AIndex is also the Current image for the icon, Current is set to -1 and the UpdateCurrentView method is called. Otherwise, the value in Current is decremented. +

+

+ Use Remove to delete an icon image with specific PixelFormat, Height, and Width values. +

+

+ Use Add to add an icon image with specific PixelFormat, Height, and Width values. +

+

+ Use Count to determine the number of images in the list of images for the icon. +

+
- + Ordinal position for the icon image deleted in the method - - Removes the Icon specified by AFormat, AHeight and AWidth - - - + Removes an icon image with the specified attributes + +

+ Remove is used to locate and delete an icon image with the attributes specified in AFormat, AHeight, and AWidth. +

+

+ Remove calls GetIndex to get the position in the internal image list where the icon image with the specified attributes is stored. If an image is found, the Delete method is called to the remove the icon image. +

+

+ The value in Current is modified when it represents an icon image affected by the removal. Current is set to -1 when it contains the index for the icon image removed in the method. +

+
+ + + + + +
- + Pixel format (color depth) for the icon image - + Height for the icon image - + Width for the icon image - GetDescription - find the description for the Icon + Gets metadata which describes the icon image at the specified position in the image list - - + +

+ GetDescription is used to get image metadata whcih describes the icon image at the position specified in AIndex. AFormat, AHeight, and AWidth are output parameters where the corresponding values from the TIconImage instance are stored. +

+

+ GetDescription accesses the image list in the internal TSharedIcon instance used in the class. +

+
+ + + + +
Aindex - the Index value for the Icon @@ -12595,121 +13282,268 @@ - - SetSize - write the size (width, height) of the Icon - - + Sets the size (width, height) for the image in the Icon + +

+ SetSize is an overridden method used to set the size for the image in the icon to the values specified in AWidth and AHeight. SetSize implements the abstract virtual method defined in the ancestor class. SetSize stores the argument values in an internal member used to track the requested icon image size used in the GetBestIndexForSize method. +

+

+ SetSize raises an EInvalidGraphicOperation exception when an icon size has been selected by setting a value in the Current property. +

+

+ SetSize is called from the ReadStream method. +

+
+ + Raises an EInvalidGraphicOperation with the message in rsIconImageSizeChange when Current contains a value other than -1. + - TRasterImage.SetSize + + + + + +
- + New Width for the icon - + New Height for the icon - GetFileExtensions returns valid file extensions, in this case 'ico' - + Gets a delimited list of file extensions supported for the image type + +

+ GetFileExtensions is an overridden String class function used to get a delimited list of file extensions supported for the image type. In TCustomIcon and TIcon, the return value is always 'ico'. +

+
- TGraphic.GetFileExtensions +
- + Delimited list of file extensions supported for the image type - - - - + + Determines if the specified resource type is valid for the image format + +

+ LazarusResourceTypeValid is an overridden Boolean function used to determine if the specified resource type is valid for the image format. +

+

+ The return value is True when ResourceType contains 'ICO' or 'ICON'. The inherited method is called to get the return value when ResourceType contains any other resource type name. Case is not significant when comparing the value in ResourceType; it is converted to uppercase in the method. +

+
+ + + + + + + +
- + True when the resource type identifier is valid for the image format - + Resource type identifier examined in the method - - + Loads the icon with the specified resource name from the instance handle + +

+ LoadFromResourceName is an overridden procedure used to load a resource with the name specified in ResName using the handle provided in Instance. LoadFromResourceName re-implements the method defined in the ancestor class, and does not call the inherited method. +

+

+ LoadFromResourceName calls GetResourceType to get the Integer resource type used in the class instance. No actions are performed in the method when the TResourceType value is unassigned (contains Nil). +

+

+ LoadFromResourceName calls FindResource to get the resource handle needed in the method. An EResNotFound exception is raised if a resource with the specified name and type is not found in FindResource. +

+

+ LoadFromResourceName calls LoadFromResourceHandle to load the icon using the Instance and resource handle values. +

+

+ Use LoadFromResourceID to load a resource by its Resource ID. +

+

+ Use LoadFromLazarusResource to load a Lazarus resource from a .lrs file with a give name. +

+
- + Handle where the content for the resource is stored - + Name for the resource loaded in the method - - + Load icon data from a resource with the specified integer resource identifier + +

+ LoadFromResourceID is an overridden procedure used to load a resource with the specified Resource ID into the class instance. LoadFromResourceID re-implements the method defined in the ancestor class, and does not call the inherited method. +

+

+ Instance contains the Handle used to read the resource. ResID contains an Integer pointer to the resource identifier loaded in the method. +

+

+ LoadFromResourceID calls GetResourceType to get the Integer resource type used in the class instance. No actions are performed in the method when the TResourceType value is unassigned (contains Nil). +

+

+ LoadFromResourceName calls FindResource to get the resource handle needed in the method. An EResNotFound exception is raised if a resource with the specified ID and type is not found in FindResource. +

+

+ LoadFromResourceName calls LoadFromResourceHandle to load the icon using the Instance and resource handle values. +

+

+ Use LoadFromResourceName to load a resource with a given resource name. +

+

+ Use LoadFromLazarusResource to load a Lazarus resource from a .lrs file with a give name. +

+
+ + Raises an EResNotFound exception if the resource handle for the specified ID and type is not valid. +
- + Handle where the content for the resource is stored - + Integer resource identifier loaded in the method - - - + Loads icon data from the specified instance and resource handles + +

+ LoadFromResourceHandle has an empty implementation in TCustomIcon. It is re-implemented in TIcon descendant. +

+
+ + +
- + Handle with the resource data loaded in the method - + Resource handle with the icon data loaded in the method - - - - + + Indicates if a handle for the icon image has been allocated + +

+ BitmapHandleAllocated is an overridden Boolean function which indicates if a handle for the icon image has been allocated in the class instance. BitmapHandleAllocated implements the abstract virtual method defined in the ancestor class. +

+

+ The return value is True when Current has a valid image index for the icon image, and the handle for the TIconImage in the shared icon has a non-zero value. +

+

+ BitmapHandleAllocated is called from methods that required a valid image handle prior to performing actions using the image data. For example: +

+
    +
  • Assign
  • +
  • BitmapHandleNeeded
  • +
  • MaskHandleNeed
  • +
  • Draw
  • +
  • EndUpdate
  • +
  • SetMaskHandle
  • +
+
+ + +
- + True when a valid handle has been assigned for the shared icon image - - - - + + True if a handle has been allocated for the mask in the image + +

+ MaskHandleAllocated is an overridden method used to determine if a handle for the image mask has been allocated in the class instance. MaskHandleAllocated implements the abstract virtual method defined in the ancestor class. +

+

+ The return value is True when Current contains a value other than -1, and the MaskHandle for the TIconImage in the shared image list has a non-zero value. +

+

+ MaskHandleAllocated is called from methods that required a valid handle prior to performing actions using the mask image data. For example: +

+
    +
  • Assign
  • +
  • AssignImage
  • +
  • BitmapHandleNeeded
  • +
  • MaskHandleNeeded
  • +
  • CreateMask
  • +
  • SetTransparentColor
  • +
  • SetBitmapHandle
  • +
  • SetMaskHandle
  • +
+
+ + + + + + + +
- + True when the MaskHandle has been allocated for the icon image - - - - + + Determine if a handle has been allocated for the Palette in the icon + +

+ PaletteAllocated is an overridden method used to determine if a handle has been allocated for the Palette in the icon image. PaletteAllocated implements the abstract virtual method defined in the ancestor class. +

+

+ The return value is True when Current contains a value other than -1, and the palette handle in the TIconImage instance for the shared icon image has a non-zero value. +

+ + While provided as property in TCustomIcon, Palette is never assigned in the TIconImage class instances used to represent the individual images in the icon. Effectively, Palette is not implemented for TCustomIcon and PaletteAllocated will always return False. + +
+ + + + +
- + True when the Palette handle has been allocated for the icon - + Not implemented in TCustomIcon - Not implemented in TCustomIcon in the current LCL version. +

+ SetHandles has an empty implementation in TCustomIcon. +

- + Handle for the Bitmap in the icon - + Handle for the Mask in the icon @@ -12718,8 +13552,15 @@

Sorts images in the internal image list for the icon. The Sort method in TSharedIcon is called to perform the sort, and compares the Width/PixelFormat values in the images to determine the sort order. Preference is given to the value in Width; if two items have the same Width, the value in PixelFormat is used for the comparison.

+

+ Sort keeps a reference to the image in Current when it is set to a value other than -1. The image is used to restore the value in Current when the sort operation is completed. The IndexOf method for the internal image list is called determine the new position for the referenced image. +

- + + + + +
@@ -12742,9 +13583,7 @@ - - Current - the sequence number of the current Icon - + Ordinal position for the current image displayed for the icon

Current is an Integer property which contains the ordinal position for the selected image in the icon. Setting a new value for the property causes the UpdateCurrentView method to be called to update the Canvas, and the save stream for the shared image. The OnChange event handler is signalled (when assigned). @@ -12757,15 +13596,13 @@ - - Count - the number of references to this Icon - + Number of images in the image list for the shared icon

Count is a read-only Integer property which contains the number of images in the internal image list for the icon. Read access for the property value is redirected to the Count property in the internal TSharedIcon instance used in the class.

- Use methods like Add, Delete, Remove, Clear, Assign, and AssignImage to maintain the list of images available in the icon. + Use methods like Add, Delete, Remove, Clear, Assign, and AssignImage to maintain the list of images available in the icon.

@@ -12773,7 +13610,7 @@ - TIcon - icons, small images typically associated with applications, controls, etc. + Implements an icon image type; small images typically associated with applications, controls, etc.

@@ -12817,51 +13654,72 @@ - - + Ensures that handle values for the icon are valid + +

+ Ensures that Handle values are valid for the icon. Configures the values in IconInfo with the BitmapHandle and MaskHandle for the class instance. Calls CreateIconIndirect for the widgetset to get the Handle used for the shared image in the icon. +

+

+ No actions are performed in the method when the Handle for the shared icon image has already been assigned. +

+
- + + + +
- + Loads icon data from the specified instance and resource handles - + + + - + Handle with the resource data loaded in the method - + Resource handle with the icon data loaded in the method - - ReleaseHandle - frees the handle that was used for the Icon - + Frees the Handle used for the Icon - + HICON value removed from the Handle in the class instance - + +

+ The return value is RT_GROUP_ICON in TIcon. +

+
- + Resource type used for the icon image type - The Operating System Handle used for the Icon - + Handle used to access the image data for the icon + +

+ Handle is a HICON property which contains the icon handle used to access image data for the icon. The property value is provided by the GetHandle method. + +

+
+ + @@ -13062,45 +13920,53 @@ - - TSharedCursorImage - a reference counted shared image to be used for cursors - + Implements a reference-counted shared image used for cursors - + Frees the handle for the cursor image - + + + - + Gets the class reference used to create a new cursor image in the Images property - + Class reference used to create images in the shared cursor image list - - TCursorImageImage - the image for a cursor, stored as an Icon - - - + Implements the image for a cursor, stored as an Icon + +

+ Provides a HotSpot property with the coordinates in the cursor that is the point that interacts with other elements on the screen. +

+
+ + +
- - + Constructor for the class instance + +

+ Calls the inherited constructor on entry using the value in AInfo as an argument. AInfo contains the coordinates that are assigned to the HotSpot property. +

+
- + TIconInfo instance with the hotspot information for the cursor image @@ -13122,30 +13988,36 @@ - + Gets the value for the HotSpot property - + + + - + Value for the property - + Gets the value for the CursorHandle property - + + + - + Value for the property - + Sets the value for the CursorHandle property - + + + - + New value for the property @@ -13163,7 +14035,7 @@ - + @@ -13202,16 +14074,21 @@ - + + + + - + - + + + @@ -13244,7 +14121,9 @@ - + + Updates the HotSpot coordinate to the center point for the Current image in the cursor + @@ -13258,8 +14137,18 @@ - The Operating System Handle allocated for this cursor - + Handle for the cursor image + +

+ Handle is a HCURSOR property in TCursorImage, and contains the handle used to identify the cursor image. The value for the property is provided by the GetHandle method. +

+

+ Setting a new value for Handle causes the device context in Canvas to be freed, and the shared image for the icon is cleared. The UpdateHandle method is called to update the shared image using the new value for the property. If the shared icon contains image data, the value in Current is set to 0 (the first image in the internal list of images). Otherwise, Current is set to -1. +

+

+ Changed is called to re-create the internal save stream for the shared image and signal the OnChange event handler (when assigned). +

+
@@ -13299,7 +14188,7 @@

- TJPEGImage is a TFPImageBitmap descendant which implements support for the JPEG image format. JPEG images are commonly used for storing digital photographs. They can represent detailed color photos using a high degree of compression, resulting in very efficient storage, though with some loss of quality. + TJPEGImage is a TFPImageBitmap descendant which implements support for the JPEG (Joint Photographic Experts Group) image format. JPEG images are commonly used for storing digital photographs. They can represent detailed color photos using a high degree of compression, resulting in very efficient storage, though with some loss of quality.

JPEG image files normally have a file extension like: jpeg, jpg, jpe, or jfif. @@ -13357,24 +14246,41 @@ - Initializes the FCL Image reader for the image type - - + Initializes the FCL-compatible image reader for the image type + +

+ InitializeReader is an overridden method used transfer property values specific to the JPEG image in AImage to the TFPCustomImageReader class instance in AReader. The following property values are stored to the corresponding properties in AReader: +

+
    +
  • MinHeight
  • +
  • MinWidth
  • +
  • Performance
  • +
  • Scale
  • +
  • Smoothing
  • +
+
+ + +
- + Image with values used to configure the reader class - + FCL-compatible image reader class updated in the method + - Initializes the FCL Image Writer for the image type + Initializes the FCL-compatible Image Writer for the image type - - + + Image with values used to configure the writer class + + + FCL-compatible image writer class updated in the method @@ -13383,7 +14289,7 @@ - + FCL-compatible image reader examined in the method @@ -13449,7 +14355,7 @@ - + True when Stream contains a valid image format for the image type TStream instance examined in the method @@ -13461,11 +14367,11 @@ - + Delimited list of file extensions supported for the image type - Determine the compression quality for the image + Determine the compression quality for the image data

Extreme compression can lead to loss of quality at the expense of a small file size. @@ -13474,6 +14380,7 @@ The allowed range is 1..100, where 100 is best quality, and 25 is pretty awful.

+
@@ -13483,19 +14390,19 @@ - Minimum height allowed for the image when read using the FCL image reader + Minimum height allowed for the image when read using an FCL image reader - Minimum width allowed for the image when read using the FCL image reader + Minimum width allowed for the image when read using an FCL image reader - Indicates if progressive encoding was used for the image data + Indicates if progressive encoding is used for the image data @@ -13507,14 +14414,35 @@
- - + A predefined scaling value applied to the image data + +

+ Scale is a TJPEGScale property which contains one of the prefined scaling values applied to the raw image data. For instance: +

+
+
jsFullSize
+
Image is not scaled.
+
jsHalf
+
Image is scaled to one-half of its width and height.
+
jsQuarter
+
Image is scaled to one-quarter of its width and height.
+
jsEighth
+
Image is scaled to one-eighth of its width and height.
+
+
- - + Indicates if smoothing is applied to the raw image data + +

+ Smoothing is a Boolean property which indicates if smoothing is applied to raw data in the image. Smoothing uses a low pass filter to remove high spatial frequency noise from a digital image. +

+

+ The value in Smoothing is used in the InitializeReader method to configure the image reader used to load the raw image data. Set the value in Smoothing prior to calling methods which load the image content using an FCL-compatible image reader. +

+
@@ -13532,7 +14460,7 @@
- + Unit of measurement is unknown @@ -13545,10 +14473,10 @@
- + Unit of measure is Inches - + Unit of measure is Centimeters @@ -13567,7 +14495,7 @@ TTiffImage implements the class methods from the ancestor class which get FCL TFPCustomImageReaderClass and TFPCustomImageWriterClass instances, as well as the shared graphics class instance for the image format.

- TTiffImage has properties which expose values for selected Tag names in the image data, including: + TTiffImage has properties which expose values for Baseline Tags in the image data, including:

  • Artist
  • @@ -13612,7 +14540,7 @@ - + Initializes the FCL-compatible image reader for the image @@ -13624,7 +14552,7 @@ - + Initializes the FCL-compatible image writer for the image @@ -13636,7 +14564,7 @@ - + Captures values from the image reader after loading an image @@ -13693,19 +14621,19 @@ - + Person who created the image - + Copyright notice for the image - + Date and time the image was created @@ -13717,63 +14645,64 @@ - + The computer and/or operating system where the image was created - + A string that describes the subject of the image - + The scanner manufacturer - + The scanner model name or number - + The unit of measurement for XResolution and YResolution - + Name and version number for the software used to create the image - + Number of pixels in ResolutionUnits for the image width - + Number of pixels in ResolutionUnits for the image height - + Implements a reference-counted shared GIF image + - + Implements an image using the GIF (Graphics Interchange Format) image format

    TGIFImage is a TFPImageBitmap descendant which implements support for the GIF (Graphics Interchange Format) image format. GIF images support up to 8 bits per pixel in the image data, and a color palette of up to 256 colors from the 24-bit RGB color space. While GIF images allow animation, the LCL implementation does not support the feature. @@ -13788,7 +14717,8 @@ - + + @@ -13801,12 +14731,29 @@ - - - + Updates the image when the reader has finished loading the image content + +

    + Ensures that image properties discovered using the reader class are applied to the properties in the GIF image. +

    +

    + Calls the inherited method on entry. Copies values found in AReader to the following properties: +

    +
      +
    • Transparent
    • +
    • Interlaced
    • +
    • BitsPerPixel
    • +
    +

    + FinalizeReader is called from the ReadStream method when the reader class has loaded the image content into a TLazIntfImage instance. +

    +
    + + +
    - + FCL-compatible reader for the image type @@ -13870,13 +14817,19 @@ Indicates if the image uses the "venetian blind" effect during display - TODO: GIF89a. Two pass using alternating lines. Similar to progressive JPEG. + + + TODO: Describe GIF89a. Two pass using alternating lines. Similar to progressive JPEG. + + Number of bits needed to represent a pixel in the image - Determines the color depth (or maximum number of colors) that can be represented in the image data. +

    + BitsPerPixel indicates the color depth (or maximum number of colors) that can be represented in the image data. +

    @@ -13895,14 +14848,28 @@ Gets a string with the file extension used for the specified image class type - - + +

    + Calls GetPicFileFormats to get the list which maps TGraphicClass (or descendent) references to a file extension. +

    +

    + GraphicExtension iterates over the values in the mapping list in reverese order, and compares the class name for the list item to the class name in GraphicClass. When a match is found, the GetFormatExt method for the item is called to get the return value for the function. +

    +

    + The return value is an empty string ('') when a mapping for GraphicClass is not found in the list. +

    +
    + + + + +
    - + File extension for the image type - + Graphic class used to determine the file extension @@ -13948,11 +14915,11 @@ - IdentEntry - checks that a given Entry exists in a Map of color names + Checks whether a given Entry exists in a Map of color names

    - IdentEntry - checks that a given Entry exists in a Map of color names. + IdentEntry checks whether a given Entry exists in a Map of color names.

    A list of system Colors is specified as a look-up table of indices (Entry) and names (MapEntry). @@ -14043,7 +15010,7 @@ True when the color value exists in Colors - Color value to located in Colors + Color value to locate in Colors Position in Colors where the color value was found @@ -14066,19 +15033,19 @@ - - ColorToRGB - given a Color value, converts into RGB - - + Converts a TColor value to an RGB color constant + +

    + ColorToRGB ensures that TColor values for special and sytem colors remove the non-RGB values in the constant. +

    +
    - - Returns the original Color transformed to RGB - + LongInt value representing the specified color - The original Color for processing + TColor value converted in the method @@ -14223,20 +15190,20 @@ - RGBToColor - assembles the supplied values for Red, Green and Blue into a composite color + Combines the values for Red, Green and Blue into a TColor value - + TColor value for the specified color components - + Byte with the Red color component - + Byte with the Green color component - + Byte with the Blue color component @@ -14481,19 +15448,23 @@ - - + Gets the family name for the typeface used in the XLFD font descriptor + +

    + Parses a font name in XLFD format and extracts the FamilyName sequence with the typeface family name. +

    +
    - + Typeface family name found in XLFDName - + XLFD font descriptor examined in the routine - + Replaces the specified XLFD segment value with the '*' wildcard. @@ -14508,7 +15479,9 @@
    - + + Replaces the PixelSize, PointSize, ResolutionX, ResolutionY and AverageWidth segments in an XLFD font name with the '*' wildcard + @@ -14520,7 +15493,9 @@
    - + + Replaces the spacing for a XLFD font descrtiptor format with a '*' wildcard + @@ -14532,7 +15507,9 @@ - + + Replaces the WeightName, Slant and SetwidthName segmetnts in an XLFD font name with the '*' wildcard + @@ -14544,7 +15521,9 @@ - + + Chechs whether an explicit value is assigned to XLFD segments controlling font height + @@ -14811,7 +15790,9 @@ - + + Creates and loads a TGraphic instance using the specified instance handle and resource name + @@ -14842,9 +15823,10 @@ - CreateBitmapFromLazarusResource - creates a bitmap image using data read into a stream from a Lazarus Resource (.LRS) + Creates and loads a Bitmap from a Lazarus Resource (.lrs) file - + + @@ -14960,9 +15942,18 @@ Variable used as the cache for Font resources - + +

    + FontResourceCache is a TFontHandleCache variable used as the cache for Font resources. FontResourceCache allows reference-counted font handles to be created or retrieved when the ReferenceNeeded method in TFont is called. Values in FontResourceCache are maintained when the FreeReference method in TFont is called. +

    +

    + Resources for FontResourceCache are allocated when the Graphuic.pp unit is initialized, and freed when the unit is finalized. +

    +
    + +
    diff --git a/docs/xml/lcl/graphmath.xml b/docs/xml/lcl/graphmath.xml index 264d253785..31fd862331 100644 --- a/docs/xml/lcl/graphmath.xml +++ b/docs/xml/lcl/graphmath.xml @@ -9,31 +9,14 @@ A Set of Mathematical Helper routines to simply Cross-Platform Canvas drawing etc - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + TFloatPoint - an extended precision record specifying the X and Y coordinates of a point in a graphic environment diff --git a/docs/xml/lcl/interfacebase.xml b/docs/xml/lcl/interfacebase.xml index 27bb00c678..5748db07dd 100644 --- a/docs/xml/lcl/interfacebase.xml +++ b/docs/xml/lcl/interfacebase.xml @@ -12,34 +12,25 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/docs/xml/lcl/lclproc.xml b/docs/xml/lcl/lclproc.xml index a76bc43e99..e666c4f953 100644 --- a/docs/xml/lcl/lclproc.xml +++ b/docs/xml/lcl/lclproc.xml @@ -2,43 +2,31 @@ + ==================================================================== + LCLProc + ==================================================================== + --> Useful lower level helper functions and classes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + A list for method references. @@ -430,36 +418,7 @@ - - - A record containing an address/description pair. - - - - - - - - - The address to describe. - - - - - - - - - The descriptive text. - - - - - - - - - + Compare function for the TDebugLCLItems AVL tree @@ -477,7 +436,7 @@ - + Compare function for . @@ -495,43 +454,7 @@ - - - Compare function for - - - - - - - - - - - - - - - - - - Compare function for - - - - - - - - - - - - - - - - + Compare function type for TStrings Strings[]. @@ -562,32 +485,41 @@ The sort compare function. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - Finds an enum member by name - - - - - - ? - - - - The member ordinal - ? - - - - The enum TypeInfo. - - - The member name. - - - The value returned when the element was not found. - - Returns the textual representation of an shortcut @@ -600,10 +532,22 @@ + + + + + + + + + + + + + - Converts the textual representation of an shortcut into an shortcut - + Converts the textual representation of an shortcut into an shortcut @@ -613,6 +557,19 @@ + + + + + + + + + + + + + Find an string in a list, given its first few characters. @@ -632,21 +589,16 @@ The list index where the search should start. - True means case-sensitive comparison - - ? - + True means case-sensitive comparison - True means search ascending from iSelStart - - ? - + True means search ascending from iSelStart The list to search. + @@ -661,6 +613,7 @@ The virtual key code. + @@ -679,7 +632,7 @@ - + @@ -688,19 +641,25 @@ - + - + + + + + + + - + @@ -719,6 +678,7 @@ + @@ -880,41 +840,25 @@ - - + + - + - + - + - + - - - Compares two pointers, returning the Sign of the difference. - - - - - +1 if p1 is higher than p2, -1 if p2 is higher than p1, 0 if both are equal. - - - - - - - - - + Compares two Handles, returning the Sign of the difference. @@ -930,26 +874,7 @@ - - - Compares two LCLHandles, returning the Sign of the difference. - - - - - - - - - - - - - - - - - + Returns True when the two rectangles are equal. @@ -985,16 +910,31 @@ - + + + + + + + + + + + + + + + + - Returns true when both method references are equal. - + Returns true when both method references are equal + Deprecated. Use LazMethodList.CompareMethods instead. - - - - + + + Deprecated in LCL version 2.1. Will be removed in version 2.3. + @@ -1002,19 +942,39 @@ - - + + + + + Deprecated. Use LazUtilities.ComparePointers instead. + + + + Deprecated in LCL version 2.1. Will be removed in version 2.3. + + + + + + + + + + + + Returns the rounded value as an Integer. - - - + + Deprecated. Use LazUtilities.RoundToInt instead. + - What if the result exceeds the Integer range? - + + Deprecated in LCL version 2.1. Will be removed in version 2.3. + @@ -1022,15 +982,16 @@ - + Returns the rounded value as an Cardinal. - - - + + Deprecated. Use LazUtilities.RoundToCardinal instead. + - What if the result exceeds the Cardinal range? - + + Deprecated in LCL version 2.1. Will be removed in version 2.3. + @@ -1038,15 +999,16 @@ - + Returns the truncated value as an Integer. - - - + + Deprecated. Use LazUtilities.TruncToInt instead. + - What if the result exceeds the Integer range? - + + Deprecated in LCL version 2.1. Will be removed in version 2.3. + @@ -1054,15 +1016,16 @@ - + Returns the rounded value as an Cardinal. - - - + + Deprecated. Use LazUtilities.TruncToCardinal instead. + - What if the result exceeds the Cardinal range? - + + Deprecated in LCL version 2.1. Will be removed in version 2.3. + @@ -1070,12 +1033,16 @@ - + Converts an numeric string into an Double value. - - + + Deprecated. Use LazUtilities.StrToDouble instead. + + + Deprecated in LCL version 2.1. Will be removed in version 2.3. + @@ -1083,7 +1050,7 @@ - + Raises an exception. @@ -1095,118 +1062,7 @@ - - - - - - - - - - ? - - - - - - - - - - - - ? - - - - - - - - - - - - ? - - - - - - - - - - - - ? - - - - - - - - - - - - - - - - - - ? - - - - - - - - - - - - - - - ? - - - - - - - - - - - - - - - - - - - - - ? - - - - - - - - - - - - + Writes a number of strings (heavily overloaded) to the debug output @@ -1267,7 +1123,7 @@ - + @@ -1303,7 +1159,7 @@ - + @@ -1339,14 +1195,12 @@ - + - ? - @@ -1368,7 +1222,7 @@ - + Formats debug output for various argument types (overloaded). @@ -1445,7 +1299,7 @@ - + Returns the component or class name. @@ -1457,7 +1311,7 @@ - + Converts control characters or above #126 into #hex format. @@ -1470,7 +1324,7 @@ - + Converts control characters or above #126 into #hex format. @@ -1486,7 +1340,7 @@ - + Provides an hex dump of a memory section. @@ -1507,7 +1361,7 @@ The number of bytes per line, zero for no line breaks. - + Provides an hex dump of an memory stream. @@ -1531,7 +1385,6 @@ The maximum number of bytes to dump. - Provides an hex dump of an TObject. @@ -1549,7 +1402,6 @@ - Provides an hex dump of an Int64, (sign + absolute value). @@ -1566,7 +1418,7 @@ - + Provides an dump of SetWindowPosition flags. @@ -1580,7 +1432,7 @@ - + Translates an virtual key code into its VK_... name. @@ -1595,7 +1447,7 @@ - + @@ -1606,7 +1458,7 @@ - + @@ -1622,7 +1474,7 @@ ? - + Writes data into an file @@ -1639,7 +1491,7 @@ - + Appends a line to the given file @@ -1653,7 +1505,7 @@ - + Appends (preformatted) text to an file @@ -1669,7 +1521,7 @@ - + @@ -1679,124 +1531,11 @@ - - - Strips everything after (and including) an CR or LF. - - - - - - - - - - - - - - - - - - - - - - ? - - - - - - - - - - - - - - - - - - - - - - - Compresses multi-line text into a single line. - - -

    - Converts a multiline string to a single line. Replaces CR and LF with spaces. Removes duplicate spaces. -

    -
    - - - - -
    - - - - - - - - - Toggles the case of all ASCII characters in an string. - - - - - - - - - - - - - - - - - - - - - - ? - - - - - - - - - - - - - - - - - - + - - - - - - - ? - + + @@ -1810,436 +1549,19 @@ - + - - Deprecated, see the LazUTF8 unit in the LazUtils package for replacements - - - - - - ? - + + + - + - - Deprecated, see the LazUTF16 unit in the LazUtils package for replacements - - - - - - ? - - - - - - Deprecated, see the LazUTF8 unit in the LazUtils package for replacements - - - - - ? - - - - - - - - - - - Deprecated, see the LazUTF8 unit in the LazUtils package for replacements - - - - - - - - - - - ? - - - - - ? - - - - - ? - - - - - - Deprecated, see the LazUTF8 unit in the LazUtils package for replacements - - - - - ? - - - - - ? - - - - - - - - - - - - Deprecated, see the LazUTF8 unit in the LazUtils package for replacements - - - - - - - - - - - - - - Deprecated, see the LazUTF8 unit in the LazUtils package for replacements - - - - - - - - ? - - - - - - - - - - - - - - - Deprecated, see the LazUTF8 unit in the LazUtils package for replacements - - - - - ? - - - - - - - - - - - - Deprecated, see the LazUTF8 unit in the LazUtils package for replacements - - - - - ? - - - - - - - - - - - - - - - - - - Deprecated, see the LazUTF8 unit in the LazUtils package for replacements - - - - - ? - - - - - - - - - - - - - - - - - - Deprecated, see the LazUTF8 unit in the LazUtils package for replacements - - - - - ? - - - - - - - - - - - - - - - - - - Deprecated, see the LazUTF8 unit in the LazUtils package for replacements - - - - - - - - ? - - - - - - - - - - - - - - - - - - Deprecated, see the LazUTF8 unit in the LazUtils package for replacements - - - - - - - - ? - - - - - - - - - Deprecated, see the LazUTF8 unit in the LazUtils package for replacements - - - - - - - - - - - - - - Deprecated, see the LazUTF8 unit in the LazUtils package for replacements - - - - - - - - - - - - - - - - - Deprecated, see the LazUTF8 unit in the LazUtils package for replacements - - - - - - - - - - - - - - - - - Deprecated, see the LazUTF8 unit in the LazUtils package for replacements - - - - - - - - - - - - - - - - - - - Deprecated, see the LazUTF8 unit in the LazUtils package for replacements - - - - - - - - - - - - - - - - Deprecated, see the LazUTF8 unit in the LazUtils package for replacements - - - - - - - - - - - - - - - - - Deprecated, see the LazUTF8 unit in the LazUtils package for replacements - - - - - - - - - - - - - - Deprecated, see the LazUTF8 unit in the LazUtils package for replacements - - - - - - - - - - - - - - Deprecated, see the LazUTF8 unit in the LazUtils package for replacements - - - - - - - - - - - - - - - - - - Deprecated, see the LazUTF8 unit in the LazUtils package for replacements - - - - - - - - - - - - Deprecated, see the LazUTF8 unit in the LazUtils package for replacements - - - - - - - - - + Deprecated, see the LazUTF16 unit in the LazUtils package for replacements @@ -2251,7 +1573,7 @@ - + Deprecated, see the LazUTF16 unit in the LazUtils package for replacements @@ -2269,7 +1591,7 @@ - + Deprecated, see the LazUTF16 unit in the LazUtils package for replacements @@ -2284,7 +1606,7 @@ - + Deprecated, see the LazUTF16 unit in the LazUtils package for replacements @@ -2296,148 +1618,7 @@ - - - - Deprecated, see the LazUTF8 unit in the LazUtils package for replacements - - - - - - - - - - - - - - - Deprecated, see the LazUTF8 unit in the LazUtils package for replacements - - - - - - - - - - - - - - - Deprecated, see the LazUTF8 unit in the LazUtils package for replacements - - - - - - Deprecated, see the LazUTF8 unit in the LazUtils package for replacements - - - - - - Deprecated, see the LazUTF8 unit in the LazUtils package for replacements - - - - - - Deprecated, see the LazUTF16 unit in the LazUtils package for replacements - - - - - - - - - - - - - - - - - - - - - - - - - - - Deprecated, see the LazUTF16 unit in the LazUtils package for replacements - - - - - - - - - - - - - - - - - - - - - - - - - - - Deprecated, see the LazUTF16 unit in the LazUtils package for replacements - - - - - - - - - - - Replaces last digits with a decimal number one higher - For example Name21 becomes Name22. - - - - - - - - - - - - - - - Deprecated, see the LazUTF8 unit in the LazUtils package for replacements - - - - - - - - - + Replaces last digits with 1 For example Name321 becomes Name1 @@ -2450,7 +1631,7 @@ - + Deprecated, see the LazUTF8 unit in the LazUtils package for replacements @@ -2462,36 +1643,37 @@ - + + + + + + + + + + + + + - - - - - ? - + + - + - - - - - ? - + + - + - - - - - ? - + + +