国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

C#利用GDI+繪制旋轉文字等效果

2019-11-17 02:52:57
字體:
來源:轉載
供稿:網友
C#利用GDI+繪制旋轉文字等效果

C#中利用GDI+繪制旋轉文本的文字,網上有很多資料,基本都使用矩陣旋轉的方式實現。但基本都只提及按點旋轉,若要實現在矩形范圍內旋轉文本,資料較少。經過琢磨,可以將矩形內旋轉轉化為按點旋轉,不過需要經過不少的計算過程。利用下面的類可以實現該功能。

[csharp]view plaincopy在CODE上查看代碼片usingSystem;
  • usingSystem.Collections.Generic;
  • usingSystem.Drawing;
  • usingSystem.Drawing.Drawing2D;
  • namespaceRotateText
  • {
  • publicclassGraphicsText
  • {
  • 派生到我的代碼片
    1. usingSystem;
    2. usingSystem.Collections.Generic;
    3. usingSystem.ComponentModel;
    4. usingSystem.Data;
    5. usingSystem.Drawing;
    6. usingSystem.Windows.Forms;
    7. namespaceRotateText
    8. {
    9. publicpartialclassFormMain:Form
    10. {
    11. privateFont_font=newFont("Arial",12);
    12. privateBrush_brush=newSolidBrush(Color.Black);
    13. privatePen_pen=newPen(Color.Black,1f);
    14. privatestring_text="CrowSoft";
    15. publicFormMain()
    16. {
    17. InitializeComponent();
    18. }
    19. pr
  • 發表評論 共有條評論
    用戶名: 密碼:
    驗證碼: 匿名發表
    主站蜘蛛池模板: 犍为县| 双峰县| 阿合奇县| 宝坻区| 葫芦岛市| 和林格尔县| 天津市| 大丰市| 报价| 开化县| 蒲江县| 富顺县| 确山县| 新郑市| 平江县| 奇台县| 南川市| 新津县| 张北县| 西贡区| 柳州市| 中阳县| 施甸县| 卢龙县| 石楼县| 舟曲县| 祁阳县| 奉节县| 屏山县| 富蕴县| 白玉县| 安阳县| 荔浦县| 政和县| 保康县| 长汀县| 孝昌县| 灵武市| 西城区| 都匀市| 故城县|