⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 psgradient.h

📁 用于开发Atmel的AVR系列单片机的GCC集成开发环境
💻 H
字号:
//---------------------------------------------------------------------------
#ifndef PSGradientH
#define PSGradientH
//---------------------------------------------------------------------------
#include <vcl\SysUtils.hpp>
#include <vcl\Controls.hpp>
#include <vcl\Classes.hpp>
#include <vcl\Forms.hpp>
#pragma link "PSGradient"
//---------------------------------------------------------------------------
enum TPSGradientShape {pgsLine, pgsRectangular, pgsElliptic};
enum TPSGradientDirection {pgdHorizontal, pgdVertical, pgdDiagonal1,
                           pgdDiagonal2};

class TPSGradient : public TPersistent
{
private:
 TColor FColor_1, FColor_2, FColor_3, FColor_4, FColor_5;
 int FColorsUsed;
 TPSGradientShape FShape;
 TPSGradientDirection FDirection;
 TNotifyEvent FOnChange;

 void __fastcall SetColor_1 (TColor val);
 void __fastcall SetColor_2 (TColor val);
 void __fastcall SetColor_3 (TColor val);
 void __fastcall SetColor_4 (TColor val);
 void __fastcall SetColor_5 (TColor val);
 void __fastcall SetColorsUsed (int val);
 void __fastcall SetDirection (TPSGradientDirection val);
 void __fastcall SetShape (TPSGradientShape val);

protected:
           virtual void __fastcall Change ();

public:
 __fastcall TPSGradient(void);
 void __fastcall DrawGradient (Graphics::TCanvas *can, TRect rect);

__published:
 __property TColor Color_1 = {read=FColor_1, write=SetColor_1, default=clRed, stored=true};
 __property TColor Color_2 = {read=FColor_2, write=SetColor_2, default=clYellow, stored=true};
 __property TColor Color_3 = {read=FColor_3, write=SetColor_3, default=clLime, stored=true};
 __property TColor Color_4 = {read=FColor_4, write=SetColor_4, default=clBlue, stored=true};
 __property TColor Color_5 = {read=FColor_5, write=SetColor_5, default=clPurple, stored=true};
 __property int ColorsUsed = {read=FColorsUsed, write=SetColorsUsed, default=5};
 __property TPSGradientDirection Direction = {read=FDirection, write=SetDirection, default=pgdHorizontal};
 __property TPSGradientShape Shape = {read=FShape, write=SetShape, default=pgsLine};
 __property TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
};
//---------------------------------------------------------------------------
#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -