View Single Post
  #536  
Old 27-03-2024, 06:48
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 688
Thanks: 481
Thanked 2,547 Times in 561 Posts
BLACKFIRE69 is on a distinguished road
Arrow FMXInno: Minor Update

FMXInno: Minor Update - [2024-Mar-27]


Code:
* Added the FColorComboBox class.
* Prevented forms from being resized.
* Added the following new functions:

function IsValidVCLColor(const AColor: TColor): Boolean;
function IsValidFMXColor(const AColor: TAlphaColor): Boolean;

function IsLightFMXColor(const AColor: TAlphaColor): Boolean;
function IsLightVCLColor(const AColor: TColor): Boolean;

IsLightFMXColor:
Quote:
> in some cases, 'IsLightFMXColor' is useful for determining the font colors based on the background color or background image color. here's how it can be used:
Code:
procedure ClrBxOnChange(Sender: TObject);
var
  CtrlClr: TAlphaColor;
begin
  CtrlClr := AClrBx.GetColor;

  if IsLightFMXColor(CtrlClr) then
    AText.Color(ALBlack)
  else
    AText.Color(ALWhite);

  ARect.FillColor(CtrlClr);
end;
Code:
Extra:

function DesktopImgExist: Boolean;

function GetDesktopImgColorFMX: TAlphaColor;
function GetDesktopSolidColorFMX: TAlphaColor;

function GetImgColorFMX(const Image: UnicodeString): TAlphaColor;
function GetImgPartColorFMX(const Image: UnicodeString; 
  const PixelX, PixelY, PixelW, PixelH: Single): TAlphaColor;

How to update:
Code:
1. Download the latest update from the first post.
2. Replace the 'FMXInno.dll' and 'FMXInnoHandle.iss' with the provided ones.


.
Attached Images
File Type: gif 00.gif (96.1 KB, 310 views)

Last edited by BLACKFIRE69; 30-04-2024 at 11:07.
Reply With Quote
The Following 5 Users Say Thank You to BLACKFIRE69 For This Useful Post:
audiofeel (27-03-2024), hitman797 (27-03-2024), Lord.Freddy (27-03-2024), ScOOt3r (27-03-2024), Tihiy_Don (27-03-2024)