Ejemplo n.º 1
0
 public void DrawRectangle(Rect frame, Pen pen = null, BaseBrush brush = null)
 {
     var p = GetBrush (pen);
     var b = GetBrush (frame, brush);
     if (b != null) {
         renderTarget.FillRectangle (frame.ToRectangleF (), b);
     }
     if (p != null) {
         renderTarget.DrawRectangle (frame.ToRectangleF (), p, (float)pen.Width, GetStrokeStyle (pen));
     }
 }
Ejemplo n.º 2
0
 public void DrawImage(IImage image, Rect frame, double alpha = 1.0)
 {
     var i = GetImage (image);
     renderTarget.DrawBitmap (i, frame.ToRectangleF (), (float)alpha, D2D1.BitmapInterpolationMode.Linear);
 }