Esempio n. 1
0
 def draw(self,dc):
     drawutils.setPenColour(dc,self.colour)
     drawutils.setPenWidth(dc,self.penWidth)
     if self.__inXRange() and self.__inYRange():
         for line in range(5):
             dc.DrawLine(self.x1,self.y1+(line*self.spacing),self.x2,self.y2+(line*self.spacing))
     drawutils.setPenWidth(dc,1)
Esempio n. 2
0
    def scrolldraw(self,dc,xOffset=0,yOffset=0,xRange=(-10000,10000),yRange=(-10000,10000)):

        drawutils.setPenColour(dc,self.lineColour)
        drawutils.setPenWidth(dc,1)
        for stave in self.staves:
            for item in stave.lines:
                item.setXOffset(xOffset)
                item.setYOffset(yOffset)
                if xRange:
                    item.setXRange(xRange)
                item.m_draw(dc)


        drawutils.setBrushColour(dc,self.noteColour)
        drawutils.setPenColour(dc,self.noteColour)
 
        for stave in self.staves:
            for item in stave.circles:
                item.setXOffset(xOffset)
                item.setYOffset(yOffset)
                if xRange:
                    item.setXRange(xRange)
                item.m_draw(dc)
            
        for stave in self.staves:
            for item in stave.text:
                item.setXOffset(xOffset)
                item.setYOffset(yOffset)
                if xRange:
                    item.setXRange(xRange)
                item.m_draw(dc)
            
        pts,weight=fonts.setStaffNumbersFont(dc)
        for stave in self.staves:
            for item in stave.numbers:
                item.setXOffset(xOffset)
                item.setYOffset(yOffset)
                if xRange:
                    item.setXRange(xRange)
                item.m_draw(dc)
        fonts.resetFont(dc,pts,weight)
Esempio n. 3
0
 def draw(self,dc):
     drawutils.setPenColour(dc,self.colour)
     drawutils.setPenWidth(dc,self.penWidth)
     if self.__inXRange() and self.__inYRange():
         dc.DrawLine(self.x1,self.y1,self.x2,self.y2)
     drawutils.setPenWidth(dc,1)