public override void Apply(ref ScrapBase scrap, Point clickpoint) { using (ScrapPaintWindow window = new ScrapPaintWindow(scrap)) { window.ShowDialog(); } scrap.Refresh(); }
public override void Apply(ref ScrapBase scrap, Point clickpoint) { if (this.IsWindow) { if (scrap.FormBorderStyle != FormBorderStyle.FixedDialog) { scrap.FormBorderStyle = FormBorderStyle.FixedDialog; scrap.ControlBox = true; scrap.ShowInTaskbar = true; scrap.TopMost = false; scrap.ClientSize = scrap.Size; scrap.Refresh(); } } else if (scrap.FormBorderStyle != FormBorderStyle.None) { scrap.FormBorderStyle = FormBorderStyle.None; scrap.ControlBox = false; scrap.ShowInTaskbar = false; scrap.TopMost = true; scrap.Refresh(); } }
public override void Apply(ref ScrapBase scrap, Point clickpoint) { using (Graphics graphics = Graphics.FromImage(scrap.Image)) { ColorMatrix newColorMatrix = new ColorMatrix { Matrix00 = -1f, Matrix11 = -1f, Matrix22 = -1f }; ImageAttributes imageAttr = new ImageAttributes(); imageAttr.SetColorMatrix(newColorMatrix); graphics.DrawImage(scrap.Image, new Rectangle(0, 0, scrap.Image.Width, scrap.Image.Height), 0, 0, scrap.Image.Width, scrap.Image.Height, GraphicsUnit.Pixel, imageAttr); } scrap.Refresh(); }
// Token: 0x06000352 RID: 850 RVA: 0x000158DC File Offset: 0x00013ADC public override void Apply(ref ScrapBase scrap, Point clickpoint) { var flag = false; var image = scrap.Image; var rotate = Rotate; if (rotate != 90) { if (rotate != 180) { if (rotate == 270) { image.RotateFlip(RotateFlipType.Rotate270FlipNone); flag = true; } } else { image.RotateFlip(RotateFlipType.Rotate180FlipNone); } } else { image.RotateFlip(RotateFlipType.Rotate90FlipNone); flag = true; } if (VerticalReflection) { image.RotateFlip(RotateFlipType.Rotate180FlipX); } if (HorizonReflection) { image.RotateFlip(RotateFlipType.RotateNoneFlipX); } if (flag) { var width = scrap.ClientSize.Width; var height = scrap.ClientSize.Height; var left = scrap.Location.X + (width - height) / 2; var top = scrap.Location.Y + (height - width) / 2; scrap.SuspendLayout(); scrap.ClientSize = new Size(height, width); scrap.Left = left; scrap.Top = top; scrap.ResumeLayout(); } scrap.Refresh(); }
public override void Apply(ref ScrapBase scrap, Point clickpoint) { bool flag = false; Image image = scrap.Image; switch (this.Rotate) { case 90: image.RotateFlip(RotateFlipType.Rotate90FlipNone); flag = true; break; case 180: image.RotateFlip(RotateFlipType.Rotate180FlipNone); break; case 270: image.RotateFlip(RotateFlipType.Rotate270FlipNone); flag = true; break; } if (this.VerticalReflection) { image.RotateFlip(RotateFlipType.Rotate180FlipX); } if (this.HorizonReflection) { image.RotateFlip(RotateFlipType.RotateNoneFlipX); } if (flag) { int width = scrap.ClientSize.Width; int height = scrap.ClientSize.Height; int num3 = scrap.Location.X + ((width - height) / 2); int num4 = scrap.Location.Y + ((height - width) / 2); scrap.SuspendLayout(); scrap.ClientSize = new Size(height, width); scrap.Left = num3; scrap.Top = num4; scrap.ResumeLayout(); } scrap.Refresh(); }
public override void Apply(ref ScrapBase scrap, Point clickpoint) { using (TrimWindow window = new TrimWindow(scrap)) { if (window.ShowDialog() == DialogResult.OK) { using (Bitmap bitmap = new Bitmap(window.TrimRectangle.Width, window.TrimRectangle.Height, PixelFormat.Format24bppRgb)) { using (Graphics graphics = Graphics.FromImage(bitmap)) { graphics.DrawImage(scrap.Image, 0, 0, new Rectangle(window.TrimLeft, window.TrimTop, window.TrimRectangle.Width, window.TrimRectangle.Height), GraphicsUnit.Pixel); } scrap.Image = bitmap; scrap.Left += window.TrimLeft; scrap.Top += window.TrimTop; scrap.Focus(); } } } scrap.Refresh(); }
public override void Apply(ref ScrapBase scrap, Point clickpoint) { if (this._fixed == ScaleSetType.Fixed) { scrap.Scale = this._scalevalue; } else { scrap.Scale += this._scalevalue; } if (this._interpolationmode != System.Drawing.Drawing2D.InterpolationMode.Invalid) { if (this._interpolationmode != System.Drawing.Drawing2D.InterpolationMode.Low) { scrap.InterpolationMode = this._interpolationmode; } else { switch (scrap.InterpolationMode) { case System.Drawing.Drawing2D.InterpolationMode.HighQualityBilinear: scrap.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic; goto Label_0090; case System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic: scrap.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor; goto Label_0090; case System.Drawing.Drawing2D.InterpolationMode.High: scrap.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBilinear; goto Label_0090; } scrap.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.High; } } Label_0090: scrap.Refresh(); }