Esempio n. 1
0
 internal ScreenDrawingContext(Rect rect)
 {
     ContextBounds  = rect;
     renderArea     = new Rect(rect.Size);
     background     = new ColorDevice(rect.Size);
     foreground     = new ColorDevice(rect.Size);
     chars          = new CharDevice(rect.Size);
     cursorPosition = Point.Empty;
 }
Esempio n. 2
0
 private void SetValuesInternal(ArrayDevice <Color> device, Rect rect, Color value)
 {
     for (var row = rect.Top; row < rect.Bottom; row++)
     {
         for (var col = rect.Left; col < rect.Right; col++)
         {
             device[col, row] = value;
         }
     }
 }
Esempio n. 3
0
 /// <summary>
 /// Initialize a new instance <see cref="DefaultDrawingContext"/>
 /// </summary>
 public DefaultDrawingContext(Rect rect,
                              Guid controlId,
                              IDrawingContext parent)
 {
     ContextBounds  = rect;
     renderArea     = new Rect(rect.Size);
     background     = new ColorDevice(rect.Size);
     foreground     = new ColorDevice(rect.Size);
     chars          = new CharDevice(rect.Size);
     cursorPosition = Point.Empty;
     ControlId      = controlId;
     Parent         = parent;
 }