コード例 #1
0
        /// <summary>
        /// Raises the <see cref="PaintLayer"/> event.
        /// </summary>
        /// <param name="e">A <see cref="PaintLayerEventArgs"/> object containing the
        /// event data.</param>
        protected virtual void OnPaintLayer(PaintLayerEventArgs e)
        {
            EventHandler <PaintLayerEventArgs> handler = PaintLayer;

            if (handler != null)
            {
                PaintLayer(this, e);
            }
        }
コード例 #2
0
        protected void PaintLayeredWindow(Bitmap bitmap, double opacity)
        {
            if (bitmap.PixelFormat != PixelFormat.Format32bppArgb)
            {
                throw new ArgumentException("The bitmap must be 32bpp with an alpha-channel.", "bitmap");
            }

            layerOpacity = opacity;

            using (PaintLayerEventArgs args = new PaintLayerEventArgs(bitmap))
            {
                OnPaintLayer(args);
                PaintNative(bitmap, OpacityAsByte);
            }
        }
コード例 #3
0
ファイル: MainCropForm.cs プロジェクト: enriquein/Cropper
 protected override void OnPaintLayer(PaintLayerEventArgs e)
 {
     PaintUI(e.Graphics);
     base.OnPaintLayer(e);
 }
コード例 #4
0
ファイル: LayeredForm.cs プロジェクト: pusp/o2platform
		protected void PaintLayeredWindow(Bitmap bitmap, double opacity)
		{
			if (bitmap.PixelFormat != PixelFormat.Format32bppArgb)
				throw new ArgumentException("The bitmap must be 32bpp with an alpha-channel.", "bitmap");

			layerOpacity = opacity;
			
			using (PaintLayerEventArgs args = new PaintLayerEventArgs(bitmap))
			{
				OnPaintLayer(args);
				PaintNative(bitmap, OpacityAsByte);
			}
		}
コード例 #5
0
ファイル: LayeredForm.cs プロジェクト: pusp/o2platform
		/// <summary>
		/// Raises the <see cref="PaintLayer"/> event.
		/// </summary>
		/// <param name="e">A <see cref="PaintLayerEventArgs"/> object containing the 
		/// event data.</param>
		protected virtual void OnPaintLayer(PaintLayerEventArgs e)
		{
            EventHandler<PaintLayerEventArgs> handler = PaintLayer;
			if (handler != null)
				PaintLayer(this, e);
		}