Example #1
0
 public override void FillRectangle(gdi.Color c, RectangleF rect)
 {
     using (Brush b = new SolidColorBrush(renderTarget, c.ToColor4()))
     {
         renderTarget.FillRectangle(rect.ToRectangleF(), b);
     }
 }
Example #2
0
 public override void DrawRect(gdi.Color c, float width, RectangleF rect)
 {
     using (Brush b = new SolidColorBrush(renderTarget, c.ToColor4()))
     {
         renderTarget.DrawRectangle(rect.ToRectangleF(), b, width);
     }
 }
Example #3
0
 public override void DrawImage(Image img, RectangleF rect)
 {
     try
     {
         if (img.D2DBitmap == null || img.D2DBitmap.IsDisposed)
         {
             img.LoadD2D(mainRenderTarget);
         }
         renderTarget.DrawBitmap(img.D2DBitmap, rect.ToRectangleF(), 1, BitmapInterpolationMode.NearestNeighbor);
     }
     catch (Exception e)
     {
         Program.MainLog.Add(e);
     }
 }