API:System.UITypes.TAlphaColorF

提供: RAD Studio API Documentation
移動先: 案内検索

Delphi

  TAlphaColorF = record
  public const
    Epsilon = 1.5259E-05; // 1 / 65535, minimal value for TPixelFormat.RGBA16 components
  private
    class function SameComponent(const Value1, Value2: Single): Boolean; static; inline;
    class function ClampComponent(const Value: Single): Single; static; inline;
  public
    R, G, B, A: Single;
    class function Create(const R, G, B: Single; const A: Single = 1): TAlphaColorF; overload; static; inline;
    class function Create(const Color: TAlphaColor): TAlphaColorF; overload; static; inline;
    class operator Add(const Color1, Color2: TAlphaColorF): TAlphaColorF;
    class operator Subtract(const Color1, Color2: TAlphaColorF): TAlphaColorF;
    class operator Equal(const Color1, Color2: TAlphaColorF): Boolean;
    class operator NotEqual(const Color1, Color2: TAlphaColorF): Boolean;
    class operator Negative(const Color: TAlphaColorF): TAlphaColorF;
    class operator Multiply(const Color1, Color2: TAlphaColorF): TAlphaColorF;
    class operator Multiply(const Color: TAlphaColorF; const Factor: Single): TAlphaColorF;
    class operator Multiply(const Factor: Single; const Color: TAlphaColorF): TAlphaColorF; inline;
    class operator Divide(const Color: TAlphaColorF; const Factor: Single): TAlphaColorF; inline;
    function PremultipliedAlpha: TAlphaColorF;
    function UnpremultipliedAlpha: TAlphaColorF;
    function Clamp: TAlphaColorF;
    function ToAlphaColor: TAlphaColor;
  end;

C++

struct DECLSPEC_DRECORD TAlphaColorF
{
public:
    #define TAlphaColorF_Epsilon  (1.525900E-05)
private:
    static bool __fastcall SameComponent(const float Value1, const float Value2);
    static float __fastcall ClampComponent(const float Value);
public:
    float R;
    float G;
    float B;
    float A;
    static TAlphaColorF __fastcall Create(const float R, const float G, const float B, const float A = 1.000000E+00f)/* overload */;
    static TAlphaColorF __fastcall Create(const TAlphaColor Color)/* overload */;
    static TAlphaColorF __fastcall _op_Addition(const TAlphaColorF &Color1, const TAlphaColorF &Color2);
    static TAlphaColorF __fastcall _op_Subtraction(const TAlphaColorF &Color1, const TAlphaColorF &Color2);
    static bool __fastcall _op_Equality(const TAlphaColorF &Color1, const TAlphaColorF &Color2);
    static bool __fastcall _op_Inequality(const TAlphaColorF &Color1, const TAlphaColorF &Color2);
    static TAlphaColorF __fastcall _op_UnaryNegation(const TAlphaColorF &Color);
    static TAlphaColorF __fastcall _op_Multiply(const TAlphaColorF &Color1, const TAlphaColorF &Color2);
    static TAlphaColorF __fastcall _op_Multiply(const TAlphaColorF &Color, const float Factor);
    static TAlphaColorF __fastcall _op_Multiply(const float Factor, const TAlphaColorF &Color);
    static TAlphaColorF __fastcall _op_Division(const TAlphaColorF &Color, const float Factor);
    TAlphaColorF __fastcall PremultipliedAlpha();
    TAlphaColorF __fastcall UnpremultipliedAlpha();
    TAlphaColorF __fastcall Clamp();
    TAlphaColor __fastcall ToAlphaColor();
    friend TAlphaColorF operator +(const TAlphaColorF &Color1, const TAlphaColorF &Color2) { return TAlphaColorF::_op_Addition(Color1, Color2); }
    friend TAlphaColorF operator -(const TAlphaColorF &Color1, const TAlphaColorF &Color2) { return TAlphaColorF::_op_Subtraction(Color1, Color2); }
    friend bool operator ==(const TAlphaColorF &Color1, const TAlphaColorF &Color2) { return TAlphaColorF::_op_Equality(Color1, Color2); }
    friend bool operator !=(const TAlphaColorF &Color1, const TAlphaColorF &Color2) { return TAlphaColorF::_op_Inequality(Color1, Color2); }
    TAlphaColorF operator -() { return TAlphaColorF::_op_UnaryNegation(*this); }
    friend TAlphaColorF operator *(const TAlphaColorF &Color1, const TAlphaColorF &Color2) { return TAlphaColorF::_op_Multiply(Color1, Color2); }
    friend TAlphaColorF operator *(const TAlphaColorF &Color, const float Factor) { return TAlphaColorF::_op_Multiply(Color, Factor); }
    friend TAlphaColorF operator *(const float Factor, const TAlphaColorF &Color) { return TAlphaColorF::_op_Multiply(Factor, Color); }
    friend TAlphaColorF operator /(const TAlphaColorF &Color, const float Factor) { return TAlphaColorF::_op_Division(Color, Factor); }
};

プロパティ

種類 可視性 ソース ユニット
record
struct
public
System.UITypes.pas
System.UITypes.hpp
System.UITypes System.UITypes

説明

このトピックには現在ドキュメントが存在しません。「ノート」を利用してこのトピックの改良について話しあうことができます。