Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@gmail.com>2013-01-28 14:51:48 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2013-04-23 13:35:16 (GMT)
commitf72e853658d060b0edbad1f17162b7cac805eb9a (patch)
tree1b75c49d77992fe540ee3b832d5062fd55752beb
parent9e0a7e8a7a9a749ee63b157606d0d9ab51952557 (diff)
Remove old code and image used to mask loops and instruments
Now is done with cairo paths Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
-rw-r--r--Jam/JamMain.py57
-rw-r--r--common/Resources/Images/jam-blockMask.pngbin4242 -> 0 bytes
2 files changed, 0 insertions, 57 deletions
diff --git a/Jam/JamMain.py b/Jam/JamMain.py
index 1246710..799a784 100644
--- a/Jam/JamMain.py
+++ b/Jam/JamMain.py
@@ -144,65 +144,8 @@ class JamMain(Gtk.EventBox):
self.sampleNoteHeight = 7
- # TODO: we can't use this code to make masks with cairo
- """
- if True: # load block clipmask
- pix = GdkPixbuf.Pixbuf.new_from_file(imagefile('jam-blockMask.png'))
- pixels = pix.get_pixels()
- stride = pix.get_rowstride()
- channels = pix.get_n_channels()
- bitmap = ""
- byte = 0
- shift = 0
- for j in range(pix.get_height()):
- offset = stride * j
- for i in range(pix.get_width()):
- r = pixels[i * channels + offset]
- if r != "\0":
- byte += 1 << shift
- shift += 1
- if shift > 7:
- bitmap += "%c" % byte
- byte = 0
- shift = 0
- if shift > 0:
- bitmap += "%c" % byte
- byte = 0
- shift = 0
- self.blockMask = Gdk.bitmap_create_from_data(
- None, bitmap, pix.get_width(), pix.get_height())
-
- """
self.sampleBg = cairo.ImageSurface.create_from_png(
imagefile('sampleBG.png'))
- """
- if True: # load sample note clipmask
- pix = GdkPixbuf.Pixbuf.new_from_file(imagefile('sampleNoteMask.png'))
- pixels = pix.get_pixels()
- stride = pix.get_rowstride()
- channels = pix.get_n_channels()
- bitmap = ""
- byte = 0
- shift = 0
- for j in range(pix.get_height()):
- offset = stride * j
- for i in range(pix.get_width()):
- r = pixels[i * channels + offset]
- if r != "\0":
- byte += 1 << shift
- shift += 1
- if shift > 7:
- bitmap += "%c" % byte
- byte = 0
- shift = 0
- if shift > 0:
- bitmap += "%c" % byte
- byte = 0
- shift = 0
- self.sampleNoteMask = Gdk.bitmap_create_from_data(
- None, bitmap, pix.get_width(), pix.get_height())
- self.sampleNoteMask.endOffset = pix.get_width() - 3
- """
self.loopPitchOffset = 4
self.loopTickOffset = 13
self.pitchPerPixel = float(Config.NUMBER_OF_POSSIBLE_PITCHES - 1) / \
diff --git a/common/Resources/Images/jam-blockMask.png b/common/Resources/Images/jam-blockMask.png
deleted file mode 100644
index dc3911f..0000000
--- a/common/Resources/Images/jam-blockMask.png
+++ /dev/null
Binary files differ