Paints this item as the normal look.
        
        :param      painter | <QPainter>
162931
def paintNormal( self, painter ):
        
        # generate the rect
        rect    = self.rect()
        
        x       = 0
        y       = self.padding()
        w       = rect.width()
        h       = rect.height() - (2 * self.padding()) - 1
        radius  = self.borderRadius()
        
        # grab the color options
        color       = self.color()
        alt_color   = self.alternateColor()
        
        if ( self.isSelected() ):
            color       = self.highlightColor()
            alt_color   = self.alternateHighlightColor()
        
        # create the background brush
        gradient = QLinearGradient()
        gradient.setStart(0, 0)
        gradient.setFinalStop(0, h)
        
        gradient.setColorAt(0,   color)
        gradient.setColorAt(0.8, alt_color)
        gradient.setColorAt(1,   color)
        painter.setPen(self.borderColor())
        
        if ( radius ):
            painter.setRenderHint(painter.Antialiasing)
            pen = painter.pen()
            pen.setWidthF(0.5)
            painter.setPen(pen)
        
        painter.setBrush(QBrush(gradient))
        painter.drawRoundedRect(x, y, w, h, radius, radius)
        
        # create the progress brush
        if ( self.showProgress() ):
            gradient = QLinearGradient()
            gradient.setStart(0, 0)
            gradient.setFinalStop(0, h)
            gradient.setColorAt(0, self.progressColor())
            gradient.setColorAt(0.8, self.alternateProgressColor())
            gradient.setColorAt(1, self.progressColor())
            
            prog_w = (w - 4) * (self._percentComplete/100.0)
            radius -= 2
            
            painter.setPen(Qt.NoPen)
            painter.setBrush(QBrush(gradient))
            painter.drawRoundedRect(x + 2, y + 2, prog_w, h - 4, radius, radius)
        
        # draw the text on this item
        if ( self.text() ):
            painter.setPen(self.textColor())
            painter.drawText(x, y, w, h, Qt.AlignCenter, self.text())
1248518
def drawBackground(self, painter, rect):
        
        if self._dirty:
            self.rebuild()
        
        # draw the alternating rects
        gantt   = self.ganttWidget()
        
        # draw the alternating rects
        painter.setPen(Qt.NoPen)
        painter.setBrush(gantt.alternateBrush())
        for rect in self._alternateRects:
            painter.drawRect(rect)
        
        # draw the weekends
        painter.setBrush(gantt.weekendBrush())
        for rect in self._weekendRects:
            painter.drawRect(rect)
        
        # draw the default background
        painter.setPen(gantt.gridPen())
        painter.drawLines(self._hlines + self._vlines)
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)
528040
def paintEvent(self, event):
        
        super(IconLineEdit, self).paintEvent(event)
        painter = QPainter(self)

        rect = self.geometry()
        space = int((rect.height())/6)
        h = rect.height() - space
        w = rect.width() - h

        if self._icon_visible:
            if self._status and self._status_set:
                pixmap = self._set_icon.pixmap(h, h)
            elif self._status:
                pixmap = self._valid_icon.pixmap(h, h)
            else:
                pixmap = self._invalid_icon.pixmap(h, h)

            painter.drawPixmap(w, space, pixmap)

        application_style = QApplication.style().objectName()
        if self._application_style != application_style:
            self._application_style = application_style
            self._refresh()

        # Small hack to gurantee correct padding on Spyder start
        if self._paint_count < 5:
            self._paint_count += 1
            self._refresh()
901198
def paintMilestone( self, painter ):
        
        # generate the rect
        rect    = self.rect()
        
        padding = self.padding()
        gantt   = self.scene().ganttWidget()
        cell_w  = gantt.cellWidth()
        cell_h  = gantt.cellHeight()
        
        x       = rect.width() - cell_w
        y       = self.padding()
        w       = cell_w
        h       = rect.height() - padding - 2
        
        # grab the color options
        color       = self.color()
        alt_color   = self.alternateColor()
        
        if ( self.isSelected() ):
            color       = self.highlightColor()
            alt_color   = self.alternateHighlightColor()
        
        # create the background brush
        gradient = QLinearGradient()
        gradient.setStart(0, 0)
        gradient.setFinalStop(0, h)
        
        gradient.setColorAt(0,   color)
        gradient.setColorAt(0.8, alt_color)
        gradient.setColorAt(1,   color)
        
        painter.setPen(self.borderColor())
        painter.setBrush(QBrush(gradient))
        
        pen = painter.pen()
        pen.setWidthF(0.5)
        painter.setPen(pen)
        painter.setRenderHint( painter.Antialiasing )
        
        path = QPainterPath()
        path.moveTo(x - cell_w / 3.0, y + h / 2.0)
        path.lineTo(x, y)
        path.lineTo(x + cell_w / 3.0, y + h / 2.0)
        path.lineTo(x, y + h)
        path.lineTo(x - cell_w / 3.0, y + h / 2.0)
        
        painter.drawPath(path)
35918
def drawBackground( self, painter, opt, rect, brush ):
        
        if not brush:
            return
        
        painter.setPen(QtCore.Qt.NoPen)
        painter.setBrush(brush)
        painter.drawRect(rect)
1355779
public void paint (Graphics2D gfx, int x, int y)
    {
        // Paint everyone.
        for (Mirage m : _mirages) {
            m.paint(gfx, x, y);
        }
    }
941943
def paintEvent( self, event ):
        
        super(XRolloutItem, self).paintEvent(event)
        
        with XPainter(self) as painter:
            w = self.width() - 3
            h = self.height() - 3
            
            color = self.palette().color(QPalette.Midlight)
            color = color.darker(180)
            pen = QPen(color)
            pen.setWidthF(0.5)
            
            painter.setPen(pen)
            painter.setBrush(self.palette().color(QPalette.Midlight))
            painter.setRenderHint(XPainter.Antialiasing)
            painter.drawRoundedRect(1, 1, w, h, 10, 10)
1164218
def _icon_by_painter(self, painter, options):
        """"""
        engine = CharIconEngine(self, painter, options)
        return QIcon(engine)
1276502
public void paintAndClear (Graphics2D gfx)
    {
        int icount = _items.size();
        for (int ii = 0; ii < icount; ii++) {
            DirtyItem item = _items.get(ii);
            item.paint(gfx);
            item.clear();
            _freelist.add(item);
        }
        _items.clear();
    }
1358499
public void paint (Graphics2D gfx, int x, int y)
    {
        _mirage.paint(gfx, x, y);
    }
747385
def drawOverlay(self, painter, option, rect, icon):
        
        if icon and not icon.isNull():
            painter.drawPixmap(rect, icon.pixmap(rect.width(), rect.height()))
715206
def drawItem(self, item, painter, option):
        
        dataset = item.dataset()
        
        painter.save()
        painter.setRenderHint(painter.Antialiasing)
        
        center = item.buildData('center')
        radius = item.buildData('radius')
        
        if int(option.state) & QStyle.State_MouseOver != 0:
            alpha = 20
            mouse_over = True
        else:
            alpha = 0
            mouse_over = False
        
        for value, subpath in item.buildData('subpaths', []):
            clr = dataset.color(value)
            
            bg = clr.lighter(110)
            bg.setAlpha(alpha + 100)
            painter.setBrush(bg)
            
            if mouse_over:
                scale = 1.08
                dx = (center.x() / scale) - center.x()
                dy = (center.y() / scale) - center.y()
                
                painter.save()
                painter.scale(scale, scale)
                painter.translate(dx, dy)
                painter.setPen(Qt.NoPen)
                painter.drawPath(subpath)
                painter.restore()
            
            pen = QPen(clr)
            pen.setWidth(0.5)
            painter.setPen(pen)
            
            painter.drawPath(subpath)
            
        painter.restore()
861947
private void paintHover(Graphics2D g, JComponent c, int width, int height) {
        paintMenu(g, c, width, height, hover);
    }
931134
def set_painter(self, painter, light_color):
        """"""
        painter.setPen(QColor(light_color).darker(120))
        painter.setBrush(QBrush(QColor(light_color)))
1156992
def paintEvent(self, event):
        """"""
        if self.isVisible() and self.position != self.Position.FLOATING:
            # fill background
            self._background_brush = QBrush(QColor(
                self.editor.sideareas_color))
            self._foreground_pen = QPen(QColor(
                self.palette().windowText().color()))
            painter = QPainter(self)
            painter.fillRect(event.rect(), self._background_brush)
1356052
def paint( self, painter, option, widget ):
        
        if ( self._rebuildRequired ):
            self.rebuild()
        
        # set the coloring options
        painter.setPen(self.borderColor())
        
        if ( self.isSelected() ):
            painter.setBrush(self.highlightColor())
        else:
            painter.setBrush(self.fillColor())
        
        hints = painter.renderHints()
        if ( not self.isAllDay() ):
            painter.setRenderHint(painter.Antialiasing)
            pen = painter.pen()
            pen.setWidthF(0.25)
            painter.setPen(pen)
        
        painter.drawPath(self.path())
        
        # draw the text in the different rect locations
        title = self.title()
        painter.setPen(self.textColor())
        for data in self._textData:
            painter.drawText(*data)
        
        painter.setRenderHints(hints)