Go to the documentation of this file.
121 angle1 = qBound( -360.0, angle1, 360.0 );
122 angle2 = qBound( -360.0, angle2, 360.0 );
149 || ( tval <= m_data->startAngle - 360.0 ) )
172 (
radius + sz.width() / 2.0 ) * std::sin( arc );
174 (
radius + sz.height() / 2.0 ) * std::cos( arc );
176 const QRectF r(
x - sz.width() / 2,
y - sz.height() / 2,
177 sz.width(), sz.height() );
201 if ( ( tval < m_data->startAngle + 360.0 )
206 const double sinArc = std::sin( arc );
207 const double cosArc = std::cos( arc );
209 const double x1 = cx +
radius * sinArc;
210 const double x2 = cx + (
radius + len ) * sinArc;
211 const double y1 = cy -
radius * cosArc;
212 const double y2 = cy - (
radius + len ) * cosArc;
229 const int a1 = qRound(
qwtMinF( deg1, deg2 ) - 90 );
230 const int a2 = qRound(
qwtMaxF( deg1, deg2 ) - 90 );
237 -a2 * 16, ( a2 - a1 + 1 ) * 16 );
263 for (
int i = 0; i < ticks.count(); i++ )
265 const double value = ticks[i];
270 if ( ( tval < m_data->startAngle + 360 )
280 const double off = qMax( sz.width(), sz.height() );
282 double x = off * std::sin( arc );
283 double y = off * std::cos( arc );
285 const double dist = std::sqrt(
x *
x +
y *
y );
virtual void drawBackbone(QPainter *) const QWT_OVERRIDE
bool hasComponent(ScaleComponent) const
const QwtText & tickLabel(const QFont &, double value) const
Convert a value into its representing label and cache it.
double maxTickLength() const
const QwtScaleMap & scaleMap() const
virtual ~QwtRoundScaleDraw()
Destructor.
const QwtScaleDiv & scaleDiv() const
void moveCenter(double x, double y)
Move the center of the scale draw, leaving the radius unchanged.
bool contains(double value) const
QWT_CONSTEXPR float qwtMinF(float a, float b)
double minimumExtent() const
virtual void drawLabel(QPainter *, double value) const QWT_OVERRIDE
QList< double > ticks(int tickType) const
@ Backbone
Backbone = the line where the ticks are located.
A class representing a text.
QWT_CONSTEXPR float qwtMaxF(float a, float b)
void setPaintInterval(double p1, double p2)
Specify the borders of the paint device interval.
static void drawLine(QPainter *, qreal x1, qreal y1, qreal x2, qreal y2)
Wrapper for QPainter::drawLine()
virtual QwtText label(double) const
Convert a value into its representing label.
void setAngleRange(double angle1, double angle2)
Adjust the baseline circle segment for round scales.
double qwtRadians(double degrees)
Translate degrees into radians.
double transform(double s) const
QwtRoundScaleDraw()
Constructor.
QPointF center() const
Get the center of the scale.
virtual double extent(const QFont &) const QWT_OVERRIDE
void setRadius(double radius)
void draw(QPainter *painter, const QRectF &rect) const
double spacing() const
Get the spacing.
virtual void drawTick(QPainter *, double value, double len) const QWT_OVERRIDE
A class representing a scale division.
double tickLength(QwtScaleDiv::TickType) const
plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:46