Exemple #1
0
void PaintBrush::paintEvent(WPaintDevice *paintDevice)
{
  WPainter painter(paintDevice);
  painter.setRenderHint(WPainter::Antialiasing);
  
  WPen pen;
  pen.setWidth(3);
  pen.setColor(color_);
  pen.setCapStyle(FlatCap);
  pen.setJoinStyle(MiterJoin);
  painter.setPen(pen);
  painter.drawPath(path_);

  path_ = WPainterPath(path_.currentPosition());
}
Exemple #2
0
WPen WDataSeries::pen() const
{
  if (customFlags_.test(CustomFlag::Pen))
    return pen_;
  else
    if (chart_)
      if (type_ == SeriesType::Bar)
	return chart_->palette()
	  ->borderPen(chart_->seriesIndexOf(*this));
      else
	return chart_->palette()
	  ->strokePen(chart_->seriesIndexOf(*this));
    else {
      WPen defaultPen;
      defaultPen.setCapStyle(PenCapStyle::Round);
      defaultPen.setJoinStyle(PenJoinStyle::Round);
      return defaultPen;
    }
}