C++完成基於掌握台界面的吃豆子游戲。本站提示廣大學習愛好者:(C++完成基於掌握台界面的吃豆子游戲)文章只能為提供參考,不一定能成為您想要的結果。以下是C++完成基於掌握台界面的吃豆子游戲正文
本文實例講述了C#圖形區域剪切的完成辦法。分享給年夜家供年夜家參考。詳細以下:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Drawing2D;
namespace advanced_drawing
{
public partial class Form16 : Form
{
public Form16()
{
InitializeComponent();
}
private void Form16_Paint(object sender, PaintEventArgs e)
{
Graphics g = e.Graphics;
GraphicsPath path = new GraphicsPath();
path.AddEllipse(this.ClientRectangle);
Region regoin = new Region(path);
g.DrawPath(Pens.Red, path);
g.Clip = regoin;
Rectangle rect = this.ClientRectangle;
rect.Offset(10, 10);
rect.Width -= 20;
rect.Height -= 20;
g.FillRectangle(Brushes.Black, rect);
g.DrawString("zhuzhao", this.Font, Brushes.Blue, 100, 100);
}
}
}
願望本文所述對年夜家的C#法式設計有所贊助。