Mercurial > ~darius > hgwebdir.cgi > musiccutter
diff musiccutter.py @ 25:ce367392806c
comment tweaks
author | Daniel O'Connor <darius@dons.net.au> |
---|---|
date | Sat, 30 Apr 2016 16:37:23 +0930 |
parents | 71b78f06ff03 |
children | f492b70f5e49 |
line wrap: on
line diff
--- a/musiccutter.py Sat Apr 30 16:37:14 2016 +0930 +++ b/musiccutter.py Sat Apr 30 16:37:23 2016 +0930 @@ -102,7 +102,7 @@ # Add title and page number Midi2PDF.textHelper(pdf, 0 * mm, 1 * mm, ENGRAVE_COLOUR, True, self.fontname, self.fontsize, '%s (%d / %d)' % (title, pindx + 1, npages)) - pdf.saveState() # Not really necessary since this is last thing we do + pdf.saveState() # Not really necessary since everything after this is done hairline pdf.setLineWidth(0) # Draw time marks @@ -118,7 +118,7 @@ pdf.line(x * mm, self.heel, x * mm, self.pageheight * mm) Midi2PDF.textHelper(pdf, x * mm, 1 * mm, ENGRAVE_COLOUR, False, self.fontname, self.fontsize, str(s) + 's') - # Draw rectangle around page + # Draw rectangle around page (upper and right hand ends don't seem to render though) if self.drawrect: pdf.rect(0, 0, self.pagewidth * mm, self.pageheight * mm, fill = False, stroke = True) @@ -130,6 +130,8 @@ # Note name if self.notenames: Midi2PDF.textHelper(pdf, (self.pagewidth - 10) * mm, ofs + 1 * mm, ENGRAVE_COLOUR, False, self.fontname, self.fontsize, self.slot2note[slot]) + + # Save PDF pdf.save() # http://newt.phys.unsw.edu.au/jw/notes.html