03-图像操作/仿QQ截图/ScreenCutter/Form2.cs
(开头部分) 8KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace ScreenCutter
{
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}
public Image ig;
private Graphics MainPainter;
private Pen pen;
private bool isDowned;
private Image baseImage;
private Rectangle Rect;
private bool RectReady;
private Point downPoint;
private bool change;
Rectangle[] Rectpoints;
int point;
int tmpx;
int tmpy;
private void DrawRect(Graphics Painter, int Mouse_x, int Mouse_y)
{
int width = 0;
int heigth = 0;
if (Mouse_y < Rect.Y)
{
Rect.Y = Mouse_y;
heigth = downPoint.Y - Mouse_y;
}
else
{
heigth = Mouse_y - downPoint.Y;
}
if (Mouse_x < Rect.X)
{
Rect.X = Mouse_x;
width = downPoint.X - Mouse_x;
}
else
{
width = Mouse_x - downPoint.X;
}
Rect.Size = new Size(width, heigth);
DrawRects(Painter);
}
private void DrawRects(Graphics Painter)
{
Painter.DrawRectangle(pen, Rect);
}
后面还有 217 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
