mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 03:35:53 +01:00
Allow image-based pens with dash patterns
This commit is contained in:
parent
8990f2cfcf
commit
7bd03b0f2e
@ -880,16 +880,11 @@ QList<const Style::Symbol*> Style::areaSymbols(int zoom) const
|
||||
|
||||
QPen Style::PathRender::pen(int zoom) const
|
||||
{
|
||||
if (!_img.isNull()) {
|
||||
if (!_img.isNull() || _strokeColor.isValid()) {
|
||||
qreal width = (_scale > None && zoom >= 12)
|
||||
? pow(1.5, zoom - 12) * _strokeWidth : _strokeWidth;
|
||||
return QPen(QBrush(_img), width, Qt::SolidLine, _strokeCap,
|
||||
_strokeJoin);
|
||||
} else if (_strokeColor.isValid()) {
|
||||
qreal width = (_scale > None && zoom >= 12)
|
||||
? pow(1.5, zoom - 12) * _strokeWidth : _strokeWidth;
|
||||
QPen p(QBrush(_strokeColor), width, Qt::SolidLine, _strokeCap,
|
||||
_strokeJoin);
|
||||
QBrush brush = _img.isNull() ? QBrush(_strokeColor) : QBrush(_img);
|
||||
QPen p(brush, width, Qt::SolidLine, _strokeCap, _strokeJoin);
|
||||
if (!_strokeDasharray.isEmpty()) {
|
||||
QVector<qreal>pattern(_strokeDasharray);
|
||||
for (int i = 0; i < _strokeDasharray.size(); i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user