def draw(self, painter, xMap, yMap, canvasRect): pos = QPointF(xMap.transform(self.__data.xValue), yMap.transform(self.__data.yValue)) self.drawLines(painter, canvasRect, pos) if self.__data.symbol and\ self.__data.symbol.style() != QwtSymbol.NoSymbol: sz = self.__data.symbol.size() clipRect = QRectF(canvasRect.adjusted(-sz.width(), -sz.height(), sz.width(), sz.height())) if clipRect.contains(pos): self.__data.symbol.drawSymbols(painter, [pos]) self.drawLabel(painter, canvasRect, pos)
def draw(self, painter, xMap, yMap, canvasRect): pos = QPointF(xMap.transform(self.__data.xValue), yMap.transform(self.__data.yValue)) self.drawLines(painter, canvasRect, pos) if self.__data.symbol and\ self.__data.symbol.style() != QwtSymbol.NoSymbol: sz = self.__data.symbol.size() clipRect = QRectF( canvasRect.adjusted(-sz.width(), -sz.height(), sz.width(), sz.height())) if clipRect.contains(pos): self.__data.symbol.drawSymbols(painter, [pos]) self.drawLabel(painter, canvasRect, pos)
def draw(self, painter, xMap, yMap, canvasRect): """ Draw the marker :param QPainter painter: Painter :param qwt.scale_map.QwtScaleMap xMap: x Scale Map :param qwt.scale_map.QwtScaleMap yMap: y Scale Map :param QRectF canvasRect: Contents rectangle of the canvas in painter coordinates """ pos = QPointF(xMap.transform(self.__data.xValue), yMap.transform(self.__data.yValue)) self.drawLines(painter, canvasRect, pos) if self.__data.symbol and\ self.__data.symbol.style() != QwtSymbol.NoSymbol: sz = self.__data.symbol.size() clipRect = QRectF(canvasRect.adjusted(-sz.width(), -sz.height(), sz.width(), sz.height())) if clipRect.contains(pos): self.__data.symbol.drawSymbols(painter, [pos]) self.drawLabel(painter, canvasRect, pos)
def draw(self, painter, xMap, yMap, canvasRect): """ Draw the marker :param QPainter painter: Painter :param qwt.scale_map.QwtScaleMap xMap: x Scale Map :param qwt.scale_map.QwtScaleMap yMap: y Scale Map :param QRectF canvasRect: Contents rectangle of the canvas in painter coordinates """ pos = QPointF(xMap.transform(self.__data.xValue), yMap.transform(self.__data.yValue)) self.drawLines(painter, canvasRect, pos) if self.__data.symbol and\ self.__data.symbol.style() != QwtSymbol.NoSymbol: sz = self.__data.symbol.size() clipRect = QRectF( canvasRect.adjusted(-sz.width(), -sz.height(), sz.width(), sz.height())) if clipRect.contains(pos): self.__data.symbol.drawSymbols(painter, [pos]) self.drawLabel(painter, canvasRect, pos)