Repository navigation
Conversation
Method create TImage instance with screenshot of the window. It should replace TASImage::FromWindow functionality to avoid direct usage of gVirtualX methods in TASImage
It extract alpha channel from the image and prepares data for TVirtualX::CreateBitmap(). Idea to use such bitmap later in the GUI classes where it really required
It is direct method for X11-based platforms to create pixmap object from the image. Idea to use it outside of TASImage and avoid gVirtualX interfaces. Add deprecated mark to docu for TASImage::GetPixmap() because it will disappear in the ROOT7
Methods already exists in TASImage, but now also define them as virtual in TImage class. One gets access to dimension of array returned with GetArgbArray() method, was not possible before
This should be replacement for correspondent TImage methods, but use of gVirtualX will be moved to GUI classes.
exec_macro.C is utility to create image file for the different gui tests. So it is very good test if method works in many different situations. Also use it directly in stressGUI.cxx
Instead of img->FromWindow().
In one place pixmap was created twice Anyway, deprecated code...
GetPixmap(), GetMask() and FromWindow() are now moved to TGWindow class and can be used from there if necessary. Methods will be removed in ROOT 7
linev
force-pushed
the
image_fromwindow
branch
from
October 14, 2026 14:46
4a6769d to
953b13e
Compare
linev
marked this pull request as ready for review
October 14, 2026 14:48
Member
|
OK, I want to try it on Windows locally first. |
Test Results 24 files 24 suites 4d 7h 34m 44s ⏱️ For more details on these failures, see this check. Results for commit 953b13e. ♻️ This comment has been updated with latest results. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These are very special methods for use with TVirtualX-based windows.
While we want to make TASImage fully free of gVirtualX - one need to move such special code outside.
At the same time libASImage has special X11 support which need to be used.
Therefore.
TASImage::GetX11Pixmap()method which only can be used on platforms with X11 support.TGWindow::GetImagePixmap()andTGWindow::GetImageMask()which take gVirtualX-specific logicTImage::GetMaskBits()- extract alpha channel from imageTImage::GetScaledWidth()- just make virtual, was existing already inTASImageclassTImage::GetScaledHeight()- just make virtual, was existing already inTASImageclassTImage::GetX11Pixmap()- only usable on X11TGWindow::CreateImageFromWindow()method - replacingTImage::FromWindow()functionalityTGWindowmethods