Csharp/C#教程:C#中Shear的用法实例分享

本文实例讲述了C#中Shear的用法。分享给大家供大家参考。具体如下:

usingSystem; usingSystem.Collections.Generic; usingSystem.ComponentModel; usingSystem.Data; usingSystem.Drawing; usingSystem.Text; usingSystem.Windows.Forms; usingSystem.Drawing.Drawing2D; namespaceadvanced_drawing { publicpartialclassForm8:Form { publicForm8() { InitializeComponent(); } privatevoidForm8_Paint(objectsender,PaintEventArgse) { RectangleFrect=newRectangleF(0,0,100,50); StringFormatformat=newStringFormat(); format.Alignment=StringAlignment.Center; format.LineAlignment=StringAlignment.Center; Matrixmatrix=newMatrix(); matrix.Shear(.5f,0f);//只在X方向上Shear matrix.Translate(200,0); Graphicsg=e.Graphics; g.Transform=matrix; g.DrawString("zhuzhao",this.Font,Brushes.Blue,rect,format); g.DrawRectangle(Pens.Black,rect.X,rect.Y,rect.Width,rect.Height); } } }

希望本文所述对大家的C#程序设计有所帮助。

您可能感兴趣的文章:C#词法分析器之输入缓冲和代码定位的应用分析C#读取中文字符及清空缓冲区的实现代码C#反色处理及其效率问题分析C#设置页面单位和缩放的方法C#实现位图转换成图标的方法C#实现页面GZip或Deflate压缩的方法C#使用SQLDMO操作数据库的方法c#对象初始化顺序实例分析C#默认双缓冲技术实例分析

标签: ar

C++小知识:不要去做编译器的工作

C#形状原点变换的方法

上述就是C#学习教程:C#中Shear的用法实例分享的全部内容,如果对大家有所用处且需要了解更多关于C#学习教程,希望大家多多关注—计算机技术网(www.ctvol.com)!

本文来自网络收集,不代表计算机技术网立场,如涉及侵权请联系管理员删除。

ctvol管理联系方式QQ:251552304

本文章地址:https://www.ctvol.com/cdevelopment/907286.html

(0)
上一篇 2021年10月24日
下一篇 2021年10月24日

精彩推荐