Esempio n. 1
0
 private void DrawRectPanel(System.Windows.Forms.PaintEventArgs pevent)
 {
     if ((_GradientMode == Oranikle.Studio.Controls.StyledPanel_LinearGradientMode.None) || BackColor == _BackColour2)
     {
         pevent.Graphics.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.Invalid;
         pevent.Graphics.InterpolationMode  = System.Drawing.Drawing2D.InterpolationMode.Low;
         pevent.Graphics.PixelOffsetMode    = System.Drawing.Drawing2D.PixelOffsetMode.None;
         pevent.Graphics.SmoothingMode      = System.Drawing.Drawing2D.SmoothingMode.None;
     }
     else
     {
         pevent.Graphics.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;
         pevent.Graphics.InterpolationMode  = System.Drawing.Drawing2D.InterpolationMode.High;
         pevent.Graphics.PixelOffsetMode    = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality;
         pevent.Graphics.SmoothingMode      = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
     }
     System.Drawing.Brush brush = GetBackgroundBrush(pevent);
     pevent.Graphics.FillRectangle(brush, ClientRectangle);
     brush.Dispose();
     if ((_BorderStyle == System.Windows.Forms.BorderStyle.FixedSingle) && (_BorderWidth > 0))
     {
         System.Drawing.Pen       pen        = GetBorderPen(_BorderColour, _BorderWidth);
         System.Drawing.Rectangle rectangle2 = ClientRectangle;
         System.Drawing.Point     point      = rectangle2.Location;
         point.X += _BorderWidth / 2;
         point.Y += _BorderWidth / 2;
         System.Drawing.Rectangle rectangle3 = ClientRectangle;
         System.Drawing.Size      size       = rectangle3.Size;
         size.Width  -= _BorderWidth;
         size.Height -= _BorderWidth;
         System.Drawing.Rectangle rectangle1 = new System.Drawing.Rectangle(point, size);
         pevent.Graphics.DrawRectangle(pen, rectangle1);
         pen.Dispose();
     }
 }
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         foreach (Texture2D item in rulerTextures.Values)
         {
             item?.Dispose();
         }
         rulerTextures.Clear();
         fontBrush.Dispose();
         rulerPen.Dispose();
     }
     base.Dispose(disposing);
 }
Esempio n. 3
0
 protected override void Dispose(bool disposing)
 {
     if (disposing && gfx != null)
     {
         gfx.Dispose();
     }
     if (disposing && view != null)
     {
         view.Dispose();
     }
     if (disposing)
     {
         gridPen.Dispose();
         selectPen.Dispose();
         textBrush.Dispose();
     }
     base.Dispose(disposing);
 }
Esempio n. 4
0
 private void DrawCurvedPanel(System.Windows.Forms.PaintEventArgs pevent)
 {
     pevent.Graphics.Clear(GetColorBehindCurve());
     pevent.Graphics.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;
     pevent.Graphics.InterpolationMode  = System.Drawing.Drawing2D.InterpolationMode.High;
     pevent.Graphics.PixelOffsetMode    = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality;
     pevent.Graphics.SmoothingMode      = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
     System.Drawing.Drawing2D.GraphicsPath graphicsPath = GetCurvedPath();
     System.Drawing.Brush brush = GetBackgroundBrush(pevent);
     pevent.Graphics.FillPath(brush, graphicsPath);
     brush.Dispose();
     if ((_BorderStyle == System.Windows.Forms.BorderStyle.FixedSingle) && (_BorderWidth > 0))
     {
         System.Drawing.Pen pen = GetBorderPen(_BorderColour, _BorderWidth);
         pevent.Graphics.DrawPath(pen, graphicsPath);
         pen.Dispose();
     }
     graphicsPath.Dispose();
 }
Esempio n. 5
0
 public void Dispose()
 {
     b.Dispose();
 }