aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/FbPixmap.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2004-01-08 22:07:58 (GMT)
committerfluxgen <fluxgen>2004-01-08 22:07:58 (GMT)
commitf25aab19562fe50c36fac186f2eb5bd3383e2173 (patch)
tree6b509dfbf50285a378122812a78f7c6a319b4b46 /src/FbTk/FbPixmap.cc
parent5643caa65520c7410a87e6daaa55e3b7adb005f8 (diff)
downloadfluxbox_pavel-f25aab19562fe50c36fac186f2eb5bd3383e2173.zip
fluxbox_pavel-f25aab19562fe50c36fac186f2eb5bd3383e2173.tar.bz2
cleaning
Diffstat (limited to 'src/FbTk/FbPixmap.cc')
-rw-r--r--src/FbTk/FbPixmap.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/FbTk/FbPixmap.cc b/src/FbTk/FbPixmap.cc
index 0ea6aa1..edc0e53 100644
--- a/src/FbTk/FbPixmap.cc
+++ b/src/FbTk/FbPixmap.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: FbPixmap.cc,v 1.8 2003/09/10 21:37:05 fluxgen Exp $ 22// $Id: FbPixmap.cc,v 1.9 2004/01/08 22:05:34 fluxgen Exp $
23 23
24#include "FbPixmap.hh" 24#include "FbPixmap.hh"
25#include "App.hh" 25#include "App.hh"
@@ -115,7 +115,6 @@ void FbPixmap::copy(const FbPixmap &the_copy) {
115 } 115 }
116 116
117 if (drawable()) { 117 if (drawable()) {
118 Display *dpy = FbTk::App::instance()->display();
119 GContext gc(drawable()); 118 GContext gc(drawable());
120 119
121 copyArea(the_copy.drawable(), 120 copyArea(the_copy.drawable(),
@@ -176,8 +175,8 @@ void FbPixmap::rotate() {
176 GContext gc(drawable()); 175 GContext gc(drawable());
177 176
178 // copy new area 177 // copy new area
179 for (int y = 0; y < height(); ++y) { 178 for (int y = 0; y < static_cast<signed>(height()); ++y) {
180 for (int x = 0; x < width(); ++x) { 179 for (int x = 0; x < static_cast<signed>(width()); ++x) {
181 gc.setForeground(XGetPixel(src_image, x, y)); 180 gc.setForeground(XGetPixel(src_image, x, y));
182 // revers coordinates 181 // revers coordinates
183 XDrawPoint(dpy, new_pm.drawable(), gc.gc(), y, x); 182 XDrawPoint(dpy, new_pm.drawable(), gc.gc(), y, x);
@@ -219,9 +218,9 @@ void FbPixmap::scale(unsigned int dest_width, unsigned int dest_height) {
219 218
220 // start scaling 219 // start scaling
221 float src_x = 0, src_y = 0; 220 float src_x = 0, src_y = 0;
222 for (int tx=0; tx<dest_width; ++tx, src_x += zoom_x) { 221 for (int tx=0; tx < static_cast<signed>(dest_width); ++tx, src_x += zoom_x) {
223 src_y = 0; 222 src_y = 0;
224 for (int ty=0; ty<dest_height; ++ty, src_y += zoom_y) { 223 for (int ty=0; ty < static_cast<signed>(dest_height); ++ty, src_y += zoom_y) {
225 gc.setForeground(XGetPixel(src_image, 224 gc.setForeground(XGetPixel(src_image,
226 static_cast<int>(src_x), 225 static_cast<int>(src_x),
227 static_cast<int>(src_y))); 226 static_cast<int>(src_y)));