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();
    }

  • 相关阅读:
    子查询
    视频工作工具链
    视频拆帧与组帧
    二叉树
    回溯法
    windows配置编译器
    C++工厂模式
    C++单例模式
    HTML学习记录
    C++代码规范
  • 原文地址:https://www.cnblogs.com/llguanli/p/7125128.html
Copyright © 2011-2022 走看看