mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-26 16:43:55 -07:00
29 lines
930 B
C++
29 lines
930 B
C++
#ifndef CARD_DIMENSIONS_H
|
|
#define CARD_DIMENSIONS_H
|
|
|
|
#include <QtGlobal>
|
|
|
|
/**
|
|
* @file card_dimensions.h
|
|
* @brief Canonical card dimension constants for layout and Z-value calculations.
|
|
*
|
|
* These values represent the logical pixel dimensions of a standard card graphic.
|
|
* They are used throughout the game scene for layout, rendering, and Z-value computation.
|
|
*/
|
|
namespace CardDimensions
|
|
{
|
|
/** @brief Card width in pixels. */
|
|
constexpr int WIDTH = 72;
|
|
/** @brief Card height in pixels. */
|
|
constexpr int HEIGHT = 102;
|
|
|
|
/** @brief Pre-converted for floating-point contexts (Z-value calculations). */
|
|
constexpr qreal WIDTH_F = static_cast<qreal>(WIDTH);
|
|
constexpr qreal HEIGHT_F = static_cast<qreal>(HEIGHT);
|
|
|
|
/** @brief Half-dimensions for centering and rotation transforms. */
|
|
constexpr qreal WIDTH_HALF_F = WIDTH_F / 2;
|
|
constexpr qreal HEIGHT_HALF_F = HEIGHT_F / 2;
|
|
} // namespace CardDimensions
|
|
|
|
#endif // CARD_DIMENSIONS_H
|