def drawDiamond(self, startX):
        """Draw a diamond whose leftmost point is at startX."""
        
        # allocate diamond color, if we haven't already
        if not hasattr(self, '__diamondColorIndex'):
            self.__diamondColorIndex = self.__image.colorAllocate(
                self.diamondColor)
        
        # calculate the points
        bottomPoint = (startX + int(math.ceil(self.diamondWidth/2)),
                       self.__height-1 - self.diamondVerticalMargin)
        rightPoint = (startX + self.diamondWidth-1, int((self.__height-1)/2))
        topPoint = (startX + int(math.ceil(self.diamondWidth/2)),
                    self.diamondVerticalMargin)
        leftPoint = (startX + self.diamondLeftMargin, int(self.__height/2))
        
        # draw the diamond
        diamond = (bottomPoint, rightPoint, topPoint, leftPoint)
        self.__image.filledPolygon(diamond, self.__diamondColorIndex)
        
        return
dataset/ETHPy150Open longnow/longview/sliceMaker.py/SlicedImage.drawDiamond/original