#include <QRectF>
#include <QSize>
#include <QSizeF>
#include <libcockatrice/deck_list/deck_list.h>
Go to the source code of this file.
|
| qreal | PlaymatUtils::playmatVisibleWidth (const QSize &fullCardSize, const PlaymatParams ¶ms) |
| | Width of the outer viewing window: full card width trimmed by the horizontal margins. Guarded against margins summing to >= 1.
|
| qreal | PlaymatUtils::playmatClampedZoom (const QSize &fullCardSize, const PlaymatParams ¶ms) |
| | Zoom clamped to the range where every step renders differently.
|
| qreal | PlaymatUtils::playmatWindowSide (const QSize &fullCardSize, const PlaymatParams ¶ms) |
| | Side of the square sampling window actually rendered for these parameters. Never exceeds either card dimension, so the source rect always lies within the image (vertical travel remains for panning whenever the art is taller than it is wide).
|
| QRectF | PlaymatUtils::computeArtSourceRect (const QSize &fullCardSize, const PlaymatParams ¶ms) |
| | Computes the source region of the full resolution card image to use as a playmat.
|
| QRectF | PlaymatUtils::coverFitRect (const QRectF &dstArea, const QSizeF &srcSize) |
| | Returns the destination rectangle that fits a source of the given aspect ratio into dstArea using "cover" semantics (no distortion, overflows cropped).
|
| QRectF | PlaymatUtils::aspectFitRect (const QRectF &dstArea, qreal aspect) |
| | Fits a rectangle of the given aspect ratio into dstArea, centered, touching the constraining dimension ("aspect fit" of the FRAME itself, not of a source image).
|