zoukankan      html  css  js  c++  java
  • c++ builder firemonkey 实现填充椭圆

    相信同类Delphi 类似文章非常多了,这里我用c++ builder firemonkey 实现填充椭圆

    本例主要在FormPaint实现,当然你想在Image1->Bitmap->Canvas这种地方也能够,详细看官方演示样例吧。

    void __fastcall TForm3::FormPaint(TObject *Sender, TCanvas *Canvas, const TRectF &ARect)
    
    {
    Canvas->BeginScene();
    System::Types::TRectF* Rect=new System::Types::TRectF(0,0,100,100);
    
     TRectF MyRect(50, 40, 200, 270);
    
     TAlphaColorRec*  mycolorRec=new TAlphaColorRec();
     mycolorRec->R=160;
     mycolorRec->G=60;
     mycolorRec->B=60;
     mycolorRec->A=255;
     System::Uitypes::TAlphaColor mycolor(mycolorRec->Color);
    
     TStrokeBrush* brush=new TStrokeBrush(TBrushKind::Solid, mycolor);
     Canvas->DrawEllipse(*Rect,90,brush);
     Canvas->FillEllipse(MyRect, 40,brush);
     Canvas->EndScene();
    }

  • 相关阅读:
    BaseJob
    BaseWorkerForm
    MainForm()
    OperationSystemForm
    Job1
    ExeCuteManager
    ThreadPool
    LogEntry
    java学习阶段一 常量
    java学习阶段一 数据类型
  • 原文地址:https://www.cnblogs.com/llguanli/p/7125128.html
Copyright © 2011-2022 走看看