mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3443 MSW: Visualise perforations, fishbones, packers and fractures in well log plots
This commit is contained in:
@@ -53,6 +53,30 @@ RiuQwtSymbol::RiuQwtSymbol(PointSymbolEnum riuStyle, const QString& label, Label
|
||||
style = QwtSymbol::DTriangle;
|
||||
break;
|
||||
case SYMBOL_LEFT_TRIANGLE:
|
||||
style = QwtSymbol::Path;
|
||||
{
|
||||
QPainterPath path;
|
||||
path.moveTo(0, -10);
|
||||
path.lineTo(-10, 0);
|
||||
path.lineTo(0, 10);
|
||||
path.lineTo(0, -10);
|
||||
setPath(path);
|
||||
setPinPoint(QPointF(0, 0));
|
||||
}
|
||||
break;
|
||||
case SYMBOL_RIGHT_TRIANGLE:
|
||||
style = QwtSymbol::Path;
|
||||
{
|
||||
QPainterPath path;
|
||||
path.moveTo(0, -10);
|
||||
path.lineTo(10, 0);
|
||||
path.lineTo(0, 10);
|
||||
path.lineTo(0, -10);
|
||||
setPath(path);
|
||||
setPinPoint(QPointF(0, 0));
|
||||
}
|
||||
break;
|
||||
case SYMBOL_LEFT_ANGLED_TRIANGLE:
|
||||
style = QwtSymbol::Path;
|
||||
{
|
||||
QPainterPath path;
|
||||
@@ -64,7 +88,7 @@ RiuQwtSymbol::RiuQwtSymbol(PointSymbolEnum riuStyle, const QString& label, Label
|
||||
setPinPoint(QPointF(0, 0));
|
||||
}
|
||||
break;
|
||||
case SYMBOL_RIGHT_TRIANGLE:
|
||||
case SYMBOL_RIGHT_ANGLED_TRIANGLE:
|
||||
style = QwtSymbol::Path;
|
||||
{
|
||||
QPainterPath path;
|
||||
@@ -104,12 +128,16 @@ void RiuQwtSymbol::renderSymbols(QPainter *painter, const QPointF *points, int n
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuQwtSymbol::renderSymbolLabel(QPainter *painter, const QPointF& position) const
|
||||
{
|
||||
int symbolWidth = this->size().width();
|
||||
int labelWidth = painter->fontMetrics().width(m_label);
|
||||
int symbolWidth = this->size().width();
|
||||
int labelWidth = painter->fontMetrics().width(m_label);
|
||||
if (m_labelPosition == LabelAboveSymbol)
|
||||
{
|
||||
painter->drawText(position.x() - labelWidth / 2, position.y() - 5, m_label);
|
||||
}
|
||||
else if (m_labelPosition == LabelLeftOfSymbol)
|
||||
{
|
||||
painter->drawText(position.x() - labelWidth - symbolWidth, position.y(), m_label);
|
||||
}
|
||||
else if (m_labelPosition == LabelRightOfSymbol)
|
||||
{
|
||||
painter->drawText(position.x() + symbolWidth + 3, position.y(), m_label);
|
||||
@@ -124,4 +152,3 @@ void RiuQwtSymbol::setLabelPosition(LabelPosition labelPosition)
|
||||
m_labelPosition = labelPosition;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user