diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:21:41 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:21:41 +0200 |
commit | d6301fca6b78db52d0d98f8e0799aba175ad2e59 (patch) | |
tree | 0380aac034e0d70ee058db07900d80ff20cfc81e /wx+/image_tools.h | |
parent | 5.7 (diff) | |
download | FreeFileSync-d6301fca6b78db52d0d98f8e0799aba175ad2e59.tar.gz FreeFileSync-d6301fca6b78db52d0d98f8e0799aba175ad2e59.tar.bz2 FreeFileSync-d6301fca6b78db52d0d98f8e0799aba175ad2e59.zip |
5.8
Diffstat (limited to 'wx+/image_tools.h')
-rw-r--r-- | wx+/image_tools.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/wx+/image_tools.h b/wx+/image_tools.h index c5011634..9de93c26 100644 --- a/wx+/image_tools.h +++ b/wx+/image_tools.h @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) ZenJu (zenju AT gmx DOT de) - All Rights Reserved * +// * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #ifndef IMAGE_TOOLS_HEADER_45782456427634254 @@ -121,7 +121,10 @@ wxBitmap layOver(const wxBitmap& foreground, const wxBitmap& background) { wxMemoryDC dc; dc.SelectObject(output); - dc.DrawBitmap(foreground, 0, 0, true); + + const int offsetX = (background.GetWidth () - foreground.GetWidth ()) / 2; + const int offsetY = (background.GetHeight() - foreground.GetHeight()) / 2; + dc.DrawBitmap(foreground, offsetX, offsetY, true); dc.SelectObject(wxNullBitmap); } return output; |