Skip to content

Commit 16e4cb4

Browse files
committed
[pad] use new methods to set opacity and copy pixmap
1 parent 382ea91 commit 16e4cb4

3 files changed

Lines changed: 7 additions & 8 deletions

File tree

graf2d/gpad/src/TPad.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3973,8 +3973,8 @@ void TPad::CopyBackgroundPixmap(Int_t x, Int_t y)
39733973
{
39743974
int px, py;
39753975
XYtoAbsPixel(fX1, fY2, px, py);
3976-
if (GetPainter())
3977-
GetPainter()->CopyDrawable(GetPixmapID(), px-x, py-y);
3976+
if (auto pp = GetPainter())
3977+
pp->CopyDrawable(GetPixmapID(), px-x, py-y);
39783978
}
39793979

39803980
////////////////////////////////////////////////////////////////////////////////

graf2d/gpad/src/TPadPainter.cxx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ gVirtualX or from my own member. So! All attributed, _ALL_ go to/from gVirtualX.
8989

9090
void TPadPainter::SetOpacity(Int_t percent)
9191
{
92-
gVirtualX->SetOpacity(percent);
92+
gVirtualX->SetOpacityW(fWinContext, percent);
9393
}
9494

9595
////////////////////////////////////////////////////////////////////////////////
@@ -146,10 +146,9 @@ void TPadPainter::ClearDrawable()
146146

147147
void TPadPainter::CopyDrawable(Int_t device, Int_t px, Int_t py)
148148
{
149-
gVirtualX->CopyPixmap(device, px, py);
149+
gVirtualX->CopyPixmapW(fWinContext, device, px, py);
150150
}
151151

152-
153152
////////////////////////////////////////////////////////////////////////////////
154153
/// Close the current gVirtualX pixmap.
155154

@@ -160,7 +159,6 @@ void TPadPainter::DestroyDrawable(Int_t device)
160159
fWinContext = (WinContext_t) 0;
161160
}
162161

163-
164162
////////////////////////////////////////////////////////////////////////////////
165163
/// Select the window in which the graphics will go.
166164

graf3d/gl/src/TGLPadPainter.cxx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ TGLPadPainter::TGLPadPainter()
7171

7272
void TGLPadPainter::SetOpacity(Int_t percent)
7373
{
74-
gVirtualX->SetOpacity(percent);
74+
// does not work this way
75+
gVirtualX->SetOpacityW(fWinContext, percent);
7576
}
7677

7778
////////////////////////////////////////////////////////////////////////////////
@@ -183,7 +184,7 @@ Bool_t TGLPadPainter::IsCocoa() const
183184

184185
void TGLPadPainter::CopyDrawable(Int_t /* device */, Int_t /* px */, Int_t /* py */)
185186
{
186-
// gVirtualX->CopyPixmap(device, px, py);
187+
// gVirtualX->CopyPixmapW(fWinContext, device, px, py);
187188
}
188189

189190
////////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)