MCPcopy Create free account
hub / github.com/CieNTi/serial_port_plotter / boundingDistance

Method boundingDistance

qcustomplot/qcustomplot.cpp:5235–5257  ·  view source on GitHub ↗

! \internal Returns the maximum pixel radius the ending decoration might cover, starting from the position the decoration is drawn at (typically a line ending/\ref QCPItemPosition of an item). This is relevant for clipping. Only omit painting of the decoration when the position where the decoration is supposed to be drawn is farther away from the clipping rect than the returned dis

Source from the content-addressed store, hash-verified

5233 distance.
5234*/
5235double QCPLineEnding::boundingDistance() const
5236{
5237 switch (mStyle)
5238 {
5239 case esNone:
5240 return 0;
5241
5242 case esFlatArrow:
5243 case esSpikeArrow:
5244 case esLineArrow:
5245 case esSkewedBar:
5246 return qSqrt(mWidth*mWidth+mLength*mLength); // items that have width and length
5247
5248 case esDisc:
5249 case esSquare:
5250 case esDiamond:
5251 case esBar:
5252 case esHalfBar:
5253 return mWidth*1.42; // items that only have a width -> width*sqrt(2)
5254
5255 }
5256 return 0;
5257}
5258
5259/*!
5260 Starting from the origin of this line ending (which is style specific), returns the length

Callers 1

drawMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected