changeset 112:7648e8502822

* Incremental refresh of spectrogram layer
author Chris Cannam
date Tue, 09 May 2006 16:18:59 +0000
parents 1be256ac7681
children 534373d65f39
files base/ResizeableBitmap.h
diffstat 1 files changed, 10 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/base/ResizeableBitmap.h	Tue May 09 12:43:55 2006 +0000
+++ b/base/ResizeableBitmap.h	Tue May 09 16:18:59 2006 +0000
@@ -52,12 +52,16 @@
         return ((*m_bits)[column / 8]) & (1u << (column % 8));
     }
     
-    void set(size_t column, bool state) {
-        if (state) {
-            ((*m_bits)[column / 8]) |=  (uint8_t(1) << (column % 8));
-        } else {
-            ((*m_bits)[column / 8]) &= ~(uint8_t(1) << (column % 8));
-        }
+    void set(size_t column) {
+        ((*m_bits)[column / 8]) |=  (uint8_t(1) << (column % 8));
+    }
+
+    void reset(size_t column) {
+        ((*m_bits)[column / 8]) &= ~(uint8_t(1) << (column % 8));
+    }
+
+    void copy(size_t source, size_t dest) {
+        get(source) ? set(dest) : reset(dest);
     }
     
 private: