using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApp2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Point pt0 = new Point(10, 10);
int width = 50;
var g = pictureBox1.CreateGraphics();
g.Clear(Color.White);
var pen = new Pen(Color.White);
var brush = new SolidBrush(Color.White);
g.DrawRectangle(pen, pt0.X, pt0.Y, width * 10, width * 6);
【c#】 三角形
于 2022-03-25 09:03:46 首次发布