void DrawMissingImageRect(XRect rect)
{
#if GDI
if (this.targetContext == XGraphicTargetContext.GDI)
{
float x = (float)rect.x;
float y = (float)rect.y;
float width = (float)rect.width;
float height = (float)rect.height;
this.gfx.DrawRectangle(Pens.Red, x, y, width, height);
this.gfx.DrawLine(Pens.Red, x, y, x + width, y + height);
this.gfx.DrawLine(Pens.Red, x + width, y, x, y + height);
}
#endif
#if WPF
if (this.targetContext == XGraphicTargetContext.WPF)
{
double x = rect.x;
double y = rect.y;
double width = rect.width;
double height = rect.height;
#if !SILVERLIGHT
System.Windows.Media.Pen pen = new System.Windows.Media.Pen(System.Windows.Media.Brushes.Red, 1);
#else
System.Windows.Media.Pen pen = new System.Windows.Media.Pen(new SolidColorBrush(Colors.Red), 1);
#endif
this.dc.DrawRectangle(null, pen, new Rect(x, y, width, height));
this.dc.DrawLine(pen, new System.Windows.Point(x, y), new System.Windows.Point(x + width, y + height));
this.dc.DrawLine(pen, new System.Windows.Point(x + width, y), new System.Windows.Point(x, y + height));
}
#endif
}