aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/PixmapWithMask.hh
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-08-22 21:25:14 (GMT)
committerfluxgen <fluxgen>2003-08-22 21:25:14 (GMT)
commit834645f54563fc9a73a845e83ad687700ffecee1 (patch)
tree8ba1c6c2843c0d6fe82195f54c7027ef9d199ea9 /src/FbTk/PixmapWithMask.hh
parent7b059d2399956a7d9753c92d8df00f9b7b508201 (diff)
downloadfluxbox_pavel-834645f54563fc9a73a845e83ad687700ffecee1.zip
fluxbox_pavel-834645f54563fc9a73a845e83ad687700ffecee1.tar.bz2
image handling
Diffstat (limited to 'src/FbTk/PixmapWithMask.hh')
-rw-r--r--src/FbTk/PixmapWithMask.hh53
1 files changed, 53 insertions, 0 deletions
diff --git a/src/FbTk/PixmapWithMask.hh b/src/FbTk/PixmapWithMask.hh
new file mode 100644
index 0000000..6803f3f
--- /dev/null
+++ b/src/FbTk/PixmapWithMask.hh
@@ -0,0 +1,53 @@
1// PixmapWithMask.hh for FbTk - Fluxbox ToolKit
2// Copyright (c) 2003 Henrik Kinnunen (fluxgen at users.sourceforge.net)
3//
4// Permission is hereby granted, free of charge, to any person obtaining a
5// copy of this software and associated documentation files (the "Software"),
6// to deal in the Software without restriction, including without limitation
7// the rights to use, copy, modify, merge, publish, distribute, sublicense,
8// and/or sell copies of the Software, and to permit persons to whom the
9// Software is furnished to do so, subject to the following conditions:
10//
11// The above copyright notice and this permission notice shall be included in
12// all copies or substantial portions of the Software.
13//
14// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE.
21
22// $Id: PixmapWithMask.hh,v 1.1 2003/08/22 21:25:14 fluxgen Exp $
23
24#ifndef FBTK_PIXMAPWITHMASK_HH
25#define FBTK_PIXMAPWITHMASK_HH
26
27#include "FbPixmap.hh"
28namespace FbTk {
29
30class PixmapWithMask {
31public:
32 PixmapWithMask() { }
33 PixmapWithMask(Pixmap pm, Pixmap mask):m_pixmap(pm), m_mask(mask) { }
34
35 void scale(unsigned int width, unsigned int height) {
36 pixmap().scale(width, height);
37 mask().scale(width, height);
38 }
39
40 FbPixmap &pixmap() { return m_pixmap; }
41 FbPixmap &mask() { return m_mask; }
42
43 const FbPixmap &pixmap() const { return m_pixmap; }
44 const FbPixmap &mask() const { return m_mask; }
45
46private:
47 FbPixmap m_pixmap;
48 FbPixmap m_mask;
49};
50
51} // end namespace FbTk
52
53#endif // FBTK_PIXMAPWITHMASK_HH