Paints this item.
        
        :param      painter | <QPainter>
                    option  | <QGraphicsOption>
                    widget  | <QWidget>
552506
def paint( self, painter, option, widget ):
        
        painter.save()
        pen = QPen(self.color())
        pen.setWidth(2)
        painter.setPen(pen)
        painter.drawPath(self._basePath)
        painter.setRenderHint(painter.Antialiasing)
        
        
        pen.setColor(QColor('white'))
        painter.setPen(pen)
        painter.setBrush(self.color())
        for ellipse in self._ellipses:
            painter.drawEllipse(ellipse, 6, 6)
        
        painter.restore()
186743
def paint(self, p, *args):
        '''
          
        '''
        if self.picturenotgened:
            self.generatePicture(self.getBoundingParents()[0].rect())
            self.picturenotgened = False
        pg.ImageItem.paint(self, p, *args)
        self.generatePicture(self.getBoundingParents()[0].rect())
1358499
public void paint (Graphics2D gfx, int x, int y)
    {
        _mirage.paint(gfx, x, y);
    }
1291488
private void paintMinimizeEnabled(Graphics2D g, JComponent c, int width, int height) {
        iconifyPainter.paintEnabled(g, c, width, height);
    }
856192
public void setForegroundPaint(final Paint PAINT) {
        if (null == foregroundPaint) {
            _foregroundPaint = PAINT;
            fireUpdateEvent(REDRAW_EVENT);
        } else {
            foregroundPaint.set(PAINT);
        }
    }
1237485
def draw(self, drawDC=None):
        
        DEBUG_MSG("draw()", 1, self)
        self.renderer = RendererWx(self.bitmap, self.figure.dpi)
        self.figure.draw(self.renderer)
        self._isDrawn = True
        self.gui_repaint(drawDC=drawDC)
186771
def paintEvent(self, event):
        
        super(XTextEdit, self).paintEvent(event)
        
        if self.document().isEmpty() and self.hint():
            text    = self.hint()
            rect    = self.rect()
            
            # modify the padding on the rect
            rect.setX(4)
            rect.setY(4)
            align = int(Qt.AlignLeft | Qt.AlignTop)
            
            # setup the coloring options
            clr = self.hintColor()
            
            # paint the hint
            with XPainter(self.viewport()) as painter:
                painter.setPen(clr)
                painter.drawText(rect, align | Qt.TextWordWrap, text)
406240
def paintEvent(self, event):
        

        def __set_bold(state):
            """
            Sets the current painter font bold state.

            :return: Definiton success.
            :rtype: bool
            """

            font = painter.font()
            font.setBold(state)
            painter.setFont(font)
            return True

        painter = QPainter(self)
        painter.fillRect(event.rect(), self.__background_color)

        pen = QPen(QBrush(), self.__separator_width)
        pen.setColor(self.__separator_color)
        painter.setPen(pen)
        top_right_corner = event.rect().topRight()
        bottom_right_corner = event.rect().bottomRight()
        painter.drawLine(top_right_corner.x(), top_right_corner.y(), bottom_right_corner.x(), bottom_right_corner.y())
        painter.setPen(self.__color)

        viewport_height = self.__editor.viewport().height()
        metrics = QFontMetrics(self.__editor.document().defaultFont())
        current_block = self.__editor.document().findBlock(
            self.__editor.textCursor().position())

        block = self.__editor.firstVisibleBlock()
        block_number = block.blockNumber()
        painter.setFont(self.__editor.document().defaultFont())

        while block.isValid():
            block_number += 1
            position = self.__editor.blockBoundingGeometry(block).topLeft() + self.__editor.contentOffset()
            if position.y() > viewport_height:
                break

            if not block.isVisible():
                continue

            block == current_block and __set_bold(True) or __set_bold(False)
            painter.drawText(
                self.width() - metrics.width(foundations.strings.to_string(block_number)) - self.__margin / 3,
                round(position.y() + metrics.ascent() + metrics.descent() -
                      (self.__editor.blockBoundingRect(block).height() * 8.0 / 100)),
                foundations.strings.to_string(block_number))
            block = block.next()

        painter.end()
        QWidget.paintEvent(self, event)
1355779
public void paint (Graphics2D gfx, int x, int y)
    {
        // Paint everyone.
        for (Mirage m : _mirages) {
            m.paint(gfx, x, y);
        }
    }
988782
def paint( self, painter, option, index ):
        
        # draw the background
        edit = self.parent()
        item = edit.item(index.row())
        if ( not isinstance(item, XMultiTagCreateItem) ):
            if ( item.isSelected() ):
                painter.setBrush(edit.highlightColor())
            else:
                painter.setBrush(edit.tagColor())
            
            painter.drawRect(option.rect)
        
        painter.setBrush(Qt.NoBrush)
        painter.setPen(item.foreground().color())
        
        super(XMultiTagDelegate, self).paint(painter, option, index)
        
        # draw the border
        item = self.parent().item(index.row())
        if ( not isinstance(item, XMultiTagCreateItem) ):
            painter.setPen(edit.borderColor())
            painter.setBrush(Qt.NoBrush)
            painter.drawRect(option.rect)
            painter.drawText(option.rect.right() - 14,
                             option.rect.top() + 1,
                             16,
                             16,
                             Qt.AlignCenter,
                             'x')
1011282
def drawGrid( self, painter ):
        
        # draw the minor grid lines
        pen = QPen(self.borderColor())
        painter.setPen(pen)
        painter.setBrush(self.baseColor())
        
        # draw the grid data
        painter.drawRect(self._buildData['grid_rect'])
        
        painter.setBrush(self.alternateColor())
        painter.setPen(Qt.NoPen)
        
        if ( self.alternatingRowColors() ):
            for alt_rect in self._buildData['grid_h_alt']:
                painter.drawRect(alt_rect)
        
        if ( self.alternatingColumnColors() ):
            for alt_rect in self._buildData['grid_v_alt']:
                painter.drawRect(alt_rect)
        
        if ( self.showGrid() ):
            painter.setPen(pen)
            
            grid = []
            if ( self.showRows() ):
                grid += self._buildData['grid_h_lines']
            
            if ( self.showColumns() ):
                grid += self._buildData['grid_v_lines']
            
            painter.drawLines(grid)
976463
def _paint_icon(self, iconic, painter, rect, mode, state, options):
        """"""
        painter.save()
        color = options['color']
        char = options['char']

        color_options = {
            QIcon.On: {
                QIcon.Normal: (options['color_on'], options['on']),
                QIcon.Disabled: (options['color_on_disabled'],
                                 options['on_disabled']),
                QIcon.Active: (options['color_on_active'],
                               options['on_active']),
                QIcon.Selected: (options['color_on_selected'],
                                 options['on_selected']) 
            },

            QIcon.Off: {
                QIcon.Normal: (options['color_off'], options['off']),
                QIcon.Disabled: (options['color_off_disabled'],
                                 options['off_disabled']),
                QIcon.Active: (options['color_off_active'],
                               options['off_active']),
                QIcon.Selected: (options['color_off_selected'],
                                 options['off_selected']) 
            }
        }

        color, char = color_options[state][mode]

        painter.setPen(QColor(color))

        # A 16 pixel-high icon yields a font size of 14, which is pixel perfect
        # for font-awesome. 16 * 0.875 = 14
        # The reason why the glyph size is smaller than the icon size is to
        # account for font bearing.

        draw_size = 0.875 * round(rect.height() * options['scale_factor'])
        prefix = options['prefix']

        # Animation setup hook
        animation = options.get('animation')
        if animation is not None:
            animation.setup(self, painter, rect)

        painter.setFont(iconic.font(prefix, draw_size))
        if 'offset' in options:
            rect = QRect(rect)
            rect.translate(options['offset'][0] * rect.width(),
                           options['offset'][1] * rect.height())

        painter.setOpacity(options.get('opacity', 1.0))

        painter.drawText(rect, Qt.AlignCenter | Qt.AlignVCenter, char)
        painter.restore()
193879
def paintEvent(self, event):
        
        x = 1
        y = 1
        w = self.width()
        h = self.height()
        
        clr_a = QColor(220, 220, 220)
        clr_b = QColor(190, 190, 190)
        
        grad = QLinearGradient()
        grad.setColorAt(0.0, clr_a)
        grad.setColorAt(0.6, clr_a)
        grad.setColorAt(1.0, clr_b)
        
        # adjust the coloring for the horizontal toolbar
        if self.position() & (self.Position.North | self.Position.South):
            h = self.minimumPixmapSize().height() + 6
            
            if self.position() == self.Position.South:
                y = self.height() - h
                grad.setStart(0, y)
                grad.setFinalStop(0, self.height())
            else:
                grad.setStart(0, 0)
                grad.setFinalStart(0, h)
        
        # adjust the coloring for the vertical toolbar
        if self.position() & (self.Position.East | self.Position.West):
            w = self.minimumPixmapSize().width() + 6
            
            if self.position() == self.Position.West:
                x = self.width() - w
                grad.setStart(x, 0)
                grad.setFinalStop(self.width(), 0)
            else:
                grad.setStart(0, 0)
                grad.setFinalStop(w, 0)
        
        with XPainter(self) as painter:
            painter.fillRect(x, y, w, h, grad)
            
            # show the active action
            action = self.selectedAction()
            if action is not None and \
               not self.currentAction() and \
               not self._animating:
                for lbl in self.actionLabels():
                    if lbl.action() != action:
                        continue
                    
                    geom = lbl.geometry()
                    size = lbl.pixmapSize()
                    
                    if self.position() == self.Position.North:
                        x = geom.left()
                        y = 0
                        w = geom.width()
                        h = size.height() + geom.top() + 2
                    
                    elif self.position() == self.Position.East:
                        x = 0
                        y = geom.top()
                        w = size.width() + geom.left() + 2
                        h = geom.height()
                    
                    painter.setPen(QColor(140, 140, 40))
                    painter.setBrush(QColor(160, 160, 160))
                    painter.drawRect(x, y, w, h)
                    break
1090579
public void paintFrame (Graphics2D g, int index, int x, int y) {
        _images[index].paint(g, x, y);
    }
179208
def paintEvent(self, event):
        
        pen = QPen(Qt.DashLine)
        pen.setColor(QColor('red'))
        with XPainter(self) as painter:
            painter.setPen(pen)
            clr = QColor('black')
            clr.setAlpha(100)
            painter.setBrush(clr)
            
            painter.drawRect(self._region)
579005
def paint( self, painter, option, widget ):
        
        style       = self.itemStyle()
        ItemStyle   = self.treeItem().ItemStyle
        
        if ( style == ItemStyle.Group ):
            self.paintGroup( painter )
        
        elif ( style == ItemStyle.Milestone ):
            self.paintMilestone( painter )
        
        else:
            self.paintNormal( painter )
1055247
def draw(self, painter, options, widget):
        
        self.declaration.draw(painter, options, widget)