- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
if ((pen == true) || (brush == true))
{
mousePath = new System.Drawing.Drawing2D.GraphicsPath();
myPaths.Add(mousePath);
}
else
if ((rectangle == true) && (e.X > 0) && (e.Y > 0) && (e.X < pictureBox1.Width)
&& (e.Y < pictureBox1.Height))
{
if (Border == true)
{
PenForBrush.Width = trackBar1.Value;
if ((e.X >= rectX) && (e.Y >= rectY))
{
g.DrawRectangle(PenForBrush, rectX, rectY, e.X - rectX, e.Y - rectY);
}
else
if ((e.X <= rectX) && (e.Y <= rectY))
{
Rectangle R = new Rectangle(e.X, e.Y, rectX - e.X, rectY - e.Y);
g.DrawRectangle(PenForBrush, R);
}
else
if ((e.X <= rectX) && (e.Y >= rectY))
{
Rectangle R = new Rectangle(e.X, rectY, rectX - e.X, e.Y - rectY);
g.DrawRectangle(PenForBrush, R);
}
else
if ((e.X >= rectX) && (e.Y <= rectY))
{
Rectangle R = new Rectangle(rectX, e.Y, e.X - rectX, rectY - e.Y);
g.DrawRectangle(PenForBrush, R);
}
}
else if (FillBorder == true)
{
else
if ((e.X <= rectX) && (e.Y <= rectY))
{
Rectangle R = new Rectangle(e.X + width, e.Y + width,
rectX - e.X - trackBar1.Value, rectY - e.Y - trackBar1.Value);
g.FillRectangle(FillBrush, R);
g.DrawRectangle(PenForBrush, e.X, e.Y, rectX - e.X, rectY - e.Y);
}
else
if ((e.X <= rectX) && (e.Y >= rectY))
{
Rectangle R = new Rectangle(e.X + width, rectY + width,
rectX - e.X - trackBar1.Value, e.Y - rectY - trackBar1.Value);
g.FillRectangle(FillBrush, R);
g.DrawRectangle(PenForBrush, e.X, rectY, rectX - e.X, e.Y - rectY);
}
else
if ((e.X >= rectX) && (e.Y <= rectY))
{
Rectangle R = new Rectangle(rectX + width, e.Y + width,
e.X - rectX - trackBar1.Value, rectY - e.Y - trackBar1.Value);
g.FillRectangle(FillBrush, R);
g.DrawRectangle(PenForBrush, rectX, e.Y, e.X - rectX, rectY - e.Y);
}
}
else if ((mark == true) && (!IsMarkPaint)
&& (e.X - distance1 > 0) && (e.Y - distance2 > 0)
&& (e.X + distance3 < pictureBox1.Width) && (e.Y + distance4 < pictureBox1.Height))
{
if (Count == 0)
{
try
{
Rectangle R = new Rectangle(PreviousMarkPoint.X, PreviousMarkPoint.Y,
MarkRectangle.Width, MarkRectangle.Height);
SolidBrush s = new SolidBrush(Color.White);
g.FillRectangle(s, R);
Bitmap temp = new Bitmap(pictureBox1.Image.Width, pictureBox1.Image.Height);
temp = (Bitmap)pictureBox1.Image;
ImageClone = temp.Clone(MarkRectangle, PixelFormat.Format16bppArgb1555);
}
catch { }
if (myImages.Count > 35)
{
myImages.RemoveAt(0);
ImageNames.RemoveAt(0);
}
Lure Of Chaos 25.09.2011 18:33 # +1
GavnoCoder111 25.09.2011 22:06 # 0
Lure Of Chaos 25.09.2011 22:21 # −1
akaDElpher 28.09.2011 11:01 # 0
CPPGovno 28.09.2011 11:06 # +1
akaDElpher 28.09.2011 11:21 # 0
Дельфисты любят писать iButton1, iButton2... iButton35, так легче делать Layout всех элементов в onFromSize.
CPPGovno 28.09.2011 12:59 # 0
foGa 26.09.2011 05:30 # 0
"Обожаю" такие конструкции.
guest8 09.04.2019 11:35 # −999