Table of Contents

TTMSFNCScaledBitmaps Class

Collection of bitmaps keyed by display scale factor, enabling controls to serve the highest-resolution image available for the current DPI.

API unit family: TMSFNCTypes Inherits from: TOwnedCollection

Syntax

TTMSFNCScaledBitmaps = class(TOwnedCollection)

Properties

Name Description
Bitmaps Provides scale-keyed access to the bitmaps in the collection.
Items Provides indexed access to the scaled bitmap items.

Methods

Name Description
Add Adds a new scaled bitmap item at the given scale factor and returns it.
AddBitmap Wraps an existing bitmap object in a new collection item at the given scale and returns it.
AddBitmapFromFile Loads a bitmap from the specified file and adds it to the collection at the given scale.
AddBitmapFromResource Loads a bitmap from the application's default instance resources and adds it at the given scale.
AddBitmapName Adds an item with a named bitmap container reference at the given scale and returns it.
AddDrawBitmap Wraps an existing draw bitmap in a new collection item at the given scale and returns it.
GetBitmapByScale Returns the bitmap whose scale factor best matches the requested scale, or the first bitmap if no exact match exists.
GetItemByScale Returns the collection item whose scale factor matches the requested scale, or nil if not found.
Insert Inserts a new item at the specified zero-based index and returns it.

Events

Name Description
OnChange Fired when any item in the collection changes.