资讯   |   开发   |   选机中心   |   产品大全 | IBM | 惠普 | 联想 | 戴尔 | 苹果 | 神舟
更多: | 华硕 | 明基 | 方正 | 紫光 | TCL | 夏新 | 联宝 | 宏碁 | 七喜 | 长城 | 清华同方 | 海尔 | 三星 | 东芝 | 索尼 | 富士通 | LG | 技术 | ddnoon
当前位置:笔记本 > 软件开发 >
Advertisement
文章正文

关于VB.net中实现字体的旋转显示,100分求助高手!!

类型:转载   责任编辑:asp.net   日期:2007/05/23


热门软件下载:


   

小弟对.net不是很熟悉,想实现在一个Picturebox或其他控件中文字的旋转一个角度显示,  
  在VB6里面要用API,创建一个字体,好像比较繁琐,请问在VB.net里面怎么实现,最好给一个简单  
  点的办法。

网友回答:

发表者:farrio

用gdi+可能吧。up一下。

发表者:btut2004

具体没做过  
  思路应该是绘图到g,然后旋转。

发表者:lyxhappy

关注ing!没搞过,帮你UP!

发表者:zihu928

如果是比较小的图片可以计算象素来处理。

发表者:net_lover

Private   Sub   btnDrawText_Click(ByVal   sender   As   _  
          System.Object,   ByVal   e   As   System.EventArgs)   Handles   _  
          btnDrawText.Click  
          Static   angle   As   Long           Angle   in   degrees.  
   
            Make   a   GraphicsPath   that   draws   the   text  
            at   (150,   150).  
          Dim   graphics_path   As   New   _  
                  GraphicsPath(Drawing.Drawing2D.FillMode.Winding)  
          graphics_path.AddString("Hello",   _  
                  New   FontFamily("Times   New   Roman"),   _  
                  FontStyle.Bold,   40,   _  
                  New   Point(150,   150),   _  
                  StringFormat.GenericDefault)  
   
            Make   a   rotation   matrix   representing    
            rotation   around   the   point   (150,   150).  
          Dim   rotation_matrix   As   New   Matrix()  
          angle   +=   20  
          rotation_matrix.RotateAt(angle,   New   PointF(150,   150))  
   
            Transform   the   GraphicsPath.  
          graphics_path.Transform(rotation_matrix)  
   
            Draw   the   text.  
          With   Me.CreateGraphics  
                  .Clear(Me.BackColor)  
                  .FillPath(Brushes.Black,   graphics_path)  
          End   With  
  End   Sub  
 

发表者:net_lover

http://www.vb-helper.com/HowTo/howto_net_rotated_text.zip

发表者:wenww

这个复杂了

发表者:308012157

还是用图片方便


 

 
热门推荐笔记本: 明基笔记本
相关文章:
webmaster:popbb@126.com   最佳浏览:1024X768 MSIE
©2007 popbb.net All Rights Reserved