OSDN Git Service

動画クラスの不透明度が反映されていなかったミスを修正。
authorくまかみ工房 <kumakamikoubou@gmail.com>
Sun, 20 Nov 2016 04:50:57 +0000 (13:50 +0900)
committerくまかみ工房 <kumakamikoubou@gmail.com>
Sun, 20 Nov 2016 04:50:57 +0000 (13:50 +0900)
FDK24/メディア/動画.cs

index c92bcc0..e3c36f0 100644 (file)
@@ -64,10 +64,10 @@ namespace FDK.メディア
                                * SharpDX.Matrix3x2.Scaling( 描画先矩形dpx.Width / this.サイズdpx.Width, 描画先矩形dpx.Height / this.サイズdpx.Height )  // スケーリング(2)
                                * SharpDX.Matrix3x2.Translation( 描画先矩形dpx.Left * dr.拡大率DPXtoPX横方向, 描画先矩形dpx.Top * dr.拡大率DPXtoPX縦方向 );  // 平行移動(物理単位)、
 
-                       this.進行描画する( dr, 変換行列2Dpx );
+                       this.進行描画する( dr, 変換行列2Dpx, 不透明度0to1 );
                }
 
-               public void 進行描画する( デバイスリソース dr, SharpDX.Matrix3x2 変換行列 )
+               public void 進行描画する( デバイスリソース dr, SharpDX.Matrix3x2 変換行列, float 不透明度0to1 = 1.0f )
                {
                        #region " 条件チェック。"
                        //----------------
@@ -85,10 +85,10 @@ namespace FDK.メディア
                                this._次のフレームを取り出す( out frame );
                                this.最後に表示したフレーム?.Dispose();
                                this.最後に表示したフレーム = frame;
-                               this._D2DBitmapを描画する( dr, 変換行列, frame.D2DBitmap );
+                               this._D2DBitmapを描画する( dr, 変換行列, frame.D2DBitmap, 不透明度0to1 );
                        };
                        Action 前のフレームを表示する = () => {
-                               this._D2DBitmapを描画する( dr, 変換行列, this.最後に表示したフレーム?.D2DBitmap );
+                               this._D2DBitmapを描画する( dr, 変換行列, this.最後に表示したフレーム?.D2DBitmap, 不透明度0to1 );
                        };
 
                        var フレーム = (FrameQueueItem) null;
@@ -393,7 +393,7 @@ namespace FDK.メディア
                        }
                }
 
-               private void _D2DBitmapを描画する( デバイスリソース dr, SharpDX.Matrix3x2 変換行列2Dpx, SharpDX.Direct2D1.Bitmap D2DBitmap )
+               private void _D2DBitmapを描画する( デバイスリソース dr, SharpDX.Matrix3x2 変換行列2Dpx, SharpDX.Direct2D1.Bitmap D2DBitmap, float 不透明度 )
                {
                        if( null == D2DBitmap )
                                return;
@@ -401,7 +401,7 @@ namespace FDK.メディア
                        FDK.Utilities.D2DBatchDraw( dr.D2DContext1, () => {
                                dr.D2DContext1.Transform = 変換行列2Dpx;
                                dr.D2DContext1.PrimitiveBlend = ( this.加算合成 ) ? SharpDX.Direct2D1.PrimitiveBlend.Add : SharpDX.Direct2D1.PrimitiveBlend.SourceOver;
-                               dr.D2DContext1.DrawBitmap( D2DBitmap, this.不透明度, SharpDX.Direct2D1.InterpolationMode.Linear );
+                               dr.D2DContext1.DrawBitmap( D2DBitmap, 不透明度, SharpDX.Direct2D1.InterpolationMode.Linear );
                        } );
                }