Skip to content

Class QAccelPlot::LineCurveLineRenderer

ClassList > QAccelPlot > LineCurveLineRenderer

Internal renderer responsible for building and updating QSGNode line geometry for a LineCurve .More...

  • #include <LineCurveLineRenderer.hpp>

Public Functions

Type Name
bool contains (const QPointF & point, const CurveHitTestParams & params) const
Returns true if__point lies within__params.hitThreshold pixels of the curve.
QSGNode * paint (QSGNode * oldNode, const LineCurveRenderParams & params) const
Updates the scene graph node tree for this curve.

Public Static Functions

Type Name
std::shared_ptr< DataTexture > dataTexture (QSGNode * node)
Returns the data texture of the line in node , a tree returned bypaint() , ornullptr before an upload.
std::size_t vertexCacheBytesPerPoint (StepMode stepMode)
Returns the vertex cache bytes per data point of a line drawn with stepMode .
void writeVertexCache (std::vector< char > & cache, int firstPoint, int pointCount, StepMode stepMode)
Writes the vertices of data points [ firstPoint _,_pointCount ) of a line drawn with__stepMode into__cache .

Detailed Description

Supports solid and dashed lines, gradient stroke, gradient fill, and optional pre-built vertex caches assembled on the main thread for reduced render-thread stalls.

Public Functions Documentation

function contains

Returns true if__point lies within__params.hitThreshold pixels of the curve.

bool QAccelPlot::LineCurveLineRenderer::contains (
    const QPointF & point,
    const CurveHitTestParams & params
) const


function paint

Updates the scene graph node tree for this curve.

QSGNode * QAccelPlot::LineCurveLineRenderer::paint (
    QSGNode * oldNode,
    const LineCurveRenderParams & params
) const

When params.vertexCache is non-null the vertex data is transferred via a fast memcpy; otherwise geometry is built in-place on the render thread.


Public Static Functions Documentation

function dataTexture

Returns the data texture of the line in node , a tree returned bypaint() , ornullptr before an upload.

static std::shared_ptr< DataTexture > QAccelPlot::LineCurveLineRenderer::dataTexture (
    QSGNode * node
) 


function vertexCacheBytesPerPoint

Returns the vertex cache bytes per data point of a line drawn with stepMode .

static std::size_t QAccelPlot::LineCurveLineRenderer::vertexCacheBytesPerPoint (
    StepMode stepMode
) 


function writeVertexCache

Writes the vertices of data points [ firstPoint _,_pointCount ) of a line drawn with__stepMode into__cache .

static void QAccelPlot::LineCurveLineRenderer::writeVertexCache (
    std::vector< char > & cache,
    int firstPoint,
    int pointCount,
    StepMode stepMode
) 

cache holds vertexCacheBytesPerPoint() bytes for each of pointCount data points. A vertex depends only on its data point index and step corner, never on data values, so the vertices before firstPoint stay valid. Writes neutral RGBA (1,1,1,1); solid and gradient shaders obtain their colors from their materials.



The documentation for this class was generated from the following file QAccelPlot/src/QAccelPlot/renderers/LineCurveLineRenderer.hpp