熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> .NET編程 >> 正文

學習c#中Shear的使用方法

2013-11-13 09:42:53  來源: .NET編程 
通過代碼來學習一起看下面的代碼

  using System;
using SystemCollectionsGeneric;
using SystemComponentModel;
using SystemData;
using SystemDrawing;
using SystemText;
using SystemWindowsForms;
using SystemDrawingDrawingD;

  namespace advanced_drawing
{
public partial class Form : Form
{
public Form()
{
InitializeComponent();
}

  private void Form_Paint(object sender PaintEventArgs e)
{
RectangleF rect = new RectangleF( );
StringFormat format = new StringFormat();
formatAlignment = StringAlignmentCenter;
formatLineAlignment = StringAlignmentCenter;
Matrix matrix = new Matrix();
matrixShear(f f);//只在X方向上Shear
matrixTranslate();
Graphics g=eGraphics;
gTransform = matrix;
gDrawString(zhuzhao thisFont BrushesBlue rect format);
gDrawRectangle(PensBlack rectX rectY rectWidth rectHeight);
}
}
}


From:http://tw.wingwit.com/Article/program/net/201311/11393.html
    推薦文章
    Copyright © 2005-2013 電腦知識網 Computer Knowledge   All rights reserved.