A utility class to manage and render dynamic ground lines. More...
#include <GroundLineProviders.h>
Classes | |
| struct | GroundLine |
| Represents a single ground line with position, length, and animation phase. More... | |
Public Member Functions | |
| GroundLineProviders ()=delete | |
| Deleted default constructor to enforce parameterized construction. | |
| Q_DISABLE_COPY_MOVE (GroundLineProviders) | |
| Disables copy and move semantics. | |
| GroundLineProviders (int patternLength, int h) | |
| Constructs GroundLineProviders with line pattern length and scene height. | |
| void | initGroundLines (int count=200) |
| Initializes ground lines. | |
| void | update_params (int scrollSpeed) |
| Updates ground line parameters based on scrolling speed. | |
| void | drawLines (QPainter *painter, int w, int h) |
| Draws the ground lines on the given painter. | |
A utility class to manage and render dynamic ground lines.
Provides components for drawing ground lines.
Provides and manages animated ground lines for the scene background.
|
explicit |
Constructs GroundLineProviders with line pattern length and scene height.
| patternLength | The length of the line pattern. |
| h | The height of the scene. |
| void GroundLineProviders::drawLines | ( | QPainter * | painter, |
| int | w, | ||
| int | h | ||
| ) |
Draws the ground lines on the given painter.
| painter | The QPainter used for rendering. |
| w | Width of the drawing area. |
| h | Height of the drawing area. |
| void GroundLineProviders::initGroundLines | ( | int | count = 200 | ) |
Initializes ground lines.
| count | Number of lines to initialize. Default is 200. |
| void GroundLineProviders::update_params | ( | int | scrollSpeed | ) |
Updates ground line parameters based on scrolling speed.
| scrollSpeed | The horizontal scrolling speed. |