Logo Search packages:      
Sourcecode: kdenlive version File versions  Download package

QPoint VectorscopeGenerator::mapToCircle ( const QSize &  targetSize,
const QPointF &  point 
) const

Input point is on [-1,1]², 0 being at the center, and positive directions are →top/→right.

Maps to the coordinates used in QImages with the 0 point at the top left corner.

-1 +1 +1+-----------+ | + | | --0++ | | - | -1+-----------+ vvv mapped to v 0 x 0+------+ |0++ | |- | |- | y+------+

With y: 1. Scale from [-1,1] to [0,1] with y01 := (y+1)/2 2. Invert (Orientation of the y axis changes) with y10 := 1-y01 3. Scale from [1,0] to [height-1,0] with yy := (height-1) * y10 x does not need to be inverted.

Definition at line 112 of file vectorscopegenerator.cpp.

Referenced by Vectorscope::renderBackground(), Vectorscope::renderHUD(), and Vectorscope::scopeRect().

{
    return QPoint( (targetSize.width() -1) *      (point.x()+1)/2,
                   (targetSize.height()-1) * (1 - (point.y()+1)/2) );
}

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index