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

學習c#中Shear的使用方法

2022-06-13   來源: .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-2022 電腦知識網 Computer Knowledge   All rights reserved.