diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2012-02-20 13:16:51 +0100 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2012-02-20 22:19:32 +0100 |
commit | f4fbdf7f9c8e657cccb679b341397daabee7079b (patch) | |
tree | da5535c167fff13a0f692ee10cc47a8748e67060 /vcl/unx/generic/gdi | |
parent | 24f63831af82e71133fae0fc8309d1f752a402bf (diff) |
unusedcode.easy: Remove SwProtocol::Snapshot()
And all implementations. Also unused and removed:
ImplCreateFromXImage()
ImplGetFrameBitmap()
Diffstat (limited to 'vcl/unx/generic/gdi')
-rw-r--r-- | vcl/unx/generic/gdi/salbmp.cxx | 94 |
1 files changed, 0 insertions, 94 deletions
diff --git a/vcl/unx/generic/gdi/salbmp.cxx b/vcl/unx/generic/gdi/salbmp.cxx index 0eccf20f1ad0..cd617b8c2c58 100644 --- a/vcl/unx/generic/gdi/salbmp.cxx +++ b/vcl/unx/generic/gdi/salbmp.cxx @@ -565,100 +565,6 @@ bool X11SalBitmap::ImplCreateFromDrawable( } // ----------------------------------------------------------------------------- -bool X11SalBitmap::SnapShot (Display* pDisplay, XLIB_Window hWindow) -{ - if (hWindow != None) - { - XWindowAttributes aAttribute; - XGetWindowAttributes (pDisplay, hWindow, &aAttribute); - if (aAttribute.map_state == IsViewable) - { - // get coordinates relative to root window - XLIB_Window hPetitFleur; - int nRootX, nRootY; - - if (XTranslateCoordinates (pDisplay, hWindow, aAttribute.root, - 0, 0, &nRootX, &nRootY, &hPetitFleur)) - { - XWindowAttributes aRootAttribute; - XGetWindowAttributes (pDisplay, aAttribute.root, &aRootAttribute); - - int width = aAttribute.width; - int height = aAttribute.height; - int x = nRootX; - int y = nRootY; - - // horizontal range check - if (x < 0) - { - width = width + x; - x = 0; - } - else - if (x > aRootAttribute.width) - { - width = 0; - x = aRootAttribute.width; - } - else - if (x + width > aRootAttribute.width) - { - width = aRootAttribute.width - x; - } - - // vertical range check - if (y < 0) - { - height = height + y; - y = 0; - } - else - if (y > aRootAttribute.height) - { - height = 0; - y = aRootAttribute.height; - } - else - if (y + height > aRootAttribute.height) - { - height = aRootAttribute.height - y; - } - - if ((width > 0) && (height > 0)) - { - XImage* pImage = XGetImage( pDisplay, aAttribute.root, - x, y, width, height, AllPlanes, ZPixmap ); - bool bSnapShot = ImplCreateFromXImage( - pDisplay, aAttribute.root, - SalX11Screen (XScreenNumberOfScreen( aAttribute.screen ) ), - pImage ); - XDestroyImage (pImage); - - return bSnapShot; - } - } - } - } - - return False; -} - -bool X11SalBitmap::ImplCreateFromXImage ( - Display* pDisplay, - XLIB_Window hWindow, - SalX11Screen nScreen, - XImage* pImage -) { - Destroy(); - - if (pImage != NULL && pImage->width != 0 && pImage->height != 0 && pImage->depth != 0) - { - mpDDB = new ImplSalDDB (pDisplay, hWindow, nScreen, pImage); - return True; - } - return False; -} - ImplSalDDB* X11SalBitmap::ImplGetDDB( Drawable aDrawable, SalX11Screen nXScreen, |