the purpose of the procedure is restore Background in rect XAlign is always centre, Color is the Backgrounf fill TODO replace by some existing procedure
| 590 | //XAlign is always centre, Color is the Backgrounf fill |
| 591 | //TODO replace by some existing procedure |
| 592 | VOID XTheme::FillRectAreaOfScreen(IN INTN XPos, IN INTN YPos, IN INTN Width, IN INTN Height) |
| 593 | { |
| 594 | // TmpBuffer.CopyScaled(Background, 1.f); |
| 595 | INTN X = XPos - (Width >> 1); //X_IS_CENTRE |
| 596 | if (X < 0) { |
| 597 | X = 0; |
| 598 | } |
| 599 | if (X + Width > UGAWidth) { |
| 600 | Width = (X > UGAWidth) ? 0 : (UGAWidth - X); |
| 601 | } |
| 602 | if (YPos + Height > UGAHeight) { |
| 603 | Height = (YPos > UGAHeight) ? 0 : (UGAHeight - YPos); |
| 604 | } |
| 605 | |
| 606 | XImage TmpBuffer(Width, Height); |
| 607 | TmpBuffer.CopyRect(Background, X, YPos); //a part of BackGround image |
| 608 | TmpBuffer.DrawWithoutCompose(X, YPos); |
| 609 | // TmpBuffer.Draw(X, YPos, 0, true); |
| 610 | } |
| 611 | |
| 612 | |
| 613 |
no test coverage detected