MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / FillRectAreaOfScreen

Method FillRectAreaOfScreen

rEFIt_UEFI/libeg/XTheme.cpp:592–610  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

590//XAlign is always centre, Color is the Backgrounf fill
591//TODO replace by some existing procedure
592VOID 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

Callers 4

GraphicsMenuStyleMethod · 0.80
DrawMainMenuLabelMethod · 0.80
MainMenuVerticalStyleMethod · 0.80
MainMenuStyleMethod · 0.80

Calls 2

CopyRectMethod · 0.80
DrawWithoutComposeMethod · 0.80

Tested by

no test coverage detected