Unit CastleFmxUtils
Description
Utilities for Delphi FMX (FireMonkey).
Source: delphi/castlefmxutils.pas (line 17).
Uses
- Types
- FMX.Dialogs
- FMX.Types
- FMX.Graphics
- CastleFileFilters
- CastleImages
Overview
Functions and Procedures
procedure FileFiltersToDialog(const FileFilters: string; const Dialog: TOpenDialog; const AllFields: boolean = true); overload; |
procedure FileFiltersToDialog(FFList: TFileFilterList; const Dialog: TOpenDialog; const AllFields: boolean = true); overload; |
function BitmapToCastleImage(const Bitmap: TBitmap): TRGBAlphaImage; |
Description
Functions and Procedures
procedure FileFiltersToDialog(const FileFilters: string; const Dialog: TOpenDialog; const AllFields: boolean = true); overload; |
|
Convert file filters into FMX Dialog.Filter, Dialog.FilterIndex. Suitable for both open and save dialogs (in FMX, TSaveDialog descends from TOpenDialog). Input filters are either given as a string FileFilters (encoded just like for TFileFilterList.AddFiltersFromString), or as TFileFilterList instance. Output filters are set as appropriate properties of given Dialog instance. When AllFields is false, then filters starting with "All " in the name, like "All files", "All images", are not included in the output. |
procedure FileFiltersToDialog(FFList: TFileFilterList; const Dialog: TOpenDialog; const AllFields: boolean = true); overload; |
|
This item has no description. |
function BitmapToCastleImage(const Bitmap: TBitmap): TRGBAlphaImage; |
|
Convert FMX bitmap to a new Castle Game Engine image. The caller is responsible for freeing the returned image (or passing it to something that takes the ownership, like TImageTextureNode.LoadFromImage with TakeImageOwnership = This is useful e.g. to use FMX camera frames (from FMX TCameraComponent.SampleBufferToBitmap) as a texture in a viewport. See examples/delphi/fmx_camera and examples/delphi/window_camera. Any pixel format of the FMX bitmap is handled. Note that we don't do anything special about the alpha premultiplication, so this is most suitable for opaque bitmaps. |
Generated by PasDoc 1.0.4.