OSDN Git Service

ビットマップがキャッシュされていない可能性を考慮した
authorgdkhd812 <test@yahoo.co.jp>
Thu, 6 Apr 2017 13:58:25 +0000 (22:58 +0900)
committergdkhd812 <test@yahoo.co.jp>
Thu, 6 Apr 2017 13:58:25 +0000 (22:58 +0900)
Core/Direct2D/D2DRenderCommon.cs
WPF/FooEditEngine/Direct2D/D2DRender.cs

index 20f2648..f4f67c8 100644 (file)
@@ -161,7 +161,7 @@ namespace FooEditEngine
         int tabLength = 8;
         bool _ShowLineBreak;
         Color4 _Comment, _Literal, _Keyword1, _Keyword2;
-        protected bool hasCache;
+        protected bool hasCache = false;
 
         protected Size renderSize
         {
index e5f4cd0..7ed0412 100644 (file)
@@ -272,7 +272,7 @@ namespace FooEditEngine.WPF
 
         public override void DrawCachedBitmap(Rectangle rect)
         {
-            if (this.render == null || this.render.IsDisposed)
+            if (this.render == null || this.render.IsDisposed || this.cachedBitMap == null || this.cachedBitMap.IsDisposed)
                 return;
             render.DrawBitmap(this.cachedBitMap, rect, 1.0f, D2D.BitmapInterpolationMode.Linear, rect);
         }