The NEW Pong Game  V13.2.1
An interesting implemnettaion of the pong game
Public Member Functions | List of all members
square_renderer Struct Reference

Functor for rendering square shapes. More...

#include <renderers.hpp>

Public Member Functions

void operator() (SDL_Renderer *renderer, float pos_x, float pos_y, float size, SDL_Color color) const
 Renders a square shape at the specified position. More...
 

Detailed Description

Functor for rendering square shapes.

This struct provides an operator to render filled squares at specified positions

Member Function Documentation

◆ operator()()

void square_renderer::operator() ( SDL_Renderer *  renderer,
float  pos_x,
float  pos_y,
float  size,
SDL_Color  color 
) const

Renders a square shape at the specified position.

Parameters
rendererThe SDL renderer used for drawing
pos_xThe x coordinate of the square's center
pos_yThe y coordinate of the square's center
sizeThe side length of the square
colorThe color to fill the square with

The documentation for this struct was generated from the following files: