author | treke <treke> | 2002-09-05 04:42:25 (UTC) |
---|---|---|
committer | treke <treke> | 2002-09-05 04:42:25 (UTC) |
commit | e2186a49cb5cbdf01b56f57818a15a760ff25b2e (patch) (unidiff) | |
tree | f22e7342c7a3adcccb6eed52a314fe8e301cc624 /noncore/comm/keypebble/krfbbuffer.cpp | |
parent | fd3239820e471044bf279a2964702573572859d6 (diff) | |
download | opie-e2186a49cb5cbdf01b56f57818a15a760ff25b2e.zip opie-e2186a49cb5cbdf01b56f57818a15a760ff25b2e.tar.gz opie-e2186a49cb5cbdf01b56f57818a15a760ff25b2e.tar.bz2 |
Added support for client side scaling of the screen. Slow, but sometimes usable.
Diffstat (limited to 'noncore/comm/keypebble/krfbbuffer.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/comm/keypebble/krfbbuffer.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/noncore/comm/keypebble/krfbbuffer.cpp b/noncore/comm/keypebble/krfbbuffer.cpp index 5a52f31..f1cb929 100644 --- a/noncore/comm/keypebble/krfbbuffer.cpp +++ b/noncore/comm/keypebble/krfbbuffer.cpp | |||
@@ -8,2 +8,4 @@ | |||
8 | #include "krfbbuffer.h" | 8 | #include "krfbbuffer.h" |
9 | #include "krfbconnection.h" | ||
10 | #include "krfbserver.h" | ||
9 | #include "krfbserverinfo.h" | 11 | #include "krfbserverinfo.h" |
@@ -88,2 +90,3 @@ void KRFBBuffer::drawRawRectChunk( void *data, | |||
88 | 90 | ||
91 | int scaleFactor=decoder->con->options()->scaleFactor; | ||
89 | int redMax = Swap16IfLE( decoder->format->redMax ); | 92 | int redMax = Swap16IfLE( decoder->format->redMax ); |
@@ -99,2 +102,3 @@ void KRFBBuffer::drawRawRectChunk( void *data, | |||
99 | 102 | ||
103 | |||
100 | for ( int j = 0; j < h; j++ ) { | 104 | for ( int j = 0; j < h; j++ ) { |
@@ -189,6 +193,11 @@ void KRFBBuffer::drawRawRectChunk( void *data, | |||
189 | 193 | ||
194 | if (scaleFactor > 1) { | ||
195 | p.drawImage( x/scaleFactor, y/scaleFactor, img.smoothScale(w/scaleFactor,h/scaleFactor) ); | ||
196 | emit updated( x/scaleFactor, y/scaleFactor, w/scaleFactor, h/scaleFactor ); | ||
197 | } | ||
198 | else { | ||
190 | p.drawImage( x, y, img ); | 199 | p.drawImage( x, y, img ); |
191 | |||
192 | emit updated( x, y, w, h ); | 200 | emit updated( x, y, w, h ); |
193 | } | 201 | } |
202 | } | ||
194 | 203 | ||