The Battle for Wesnoth  1.19.0-dev
Classes | Enumerations | Functions
xbrz Namespace Reference

Classes

struct  ScalerCfg
 

Enumerations

enum  SliceType { NN_SCALE_SLICE_SOURCE , NN_SCALE_SLICE_TARGET }
 

Functions

void scale (size_t factor, const uint32_t *src, uint32_t *trg, int srcWidth, int srcHeight, const ScalerCfg &cfg=ScalerCfg(), int yFirst=0, int yLast=std::numeric_limits< int >::max())
 
void nearestNeighborScale (const uint32_t *src, int srcWidth, int srcHeight, uint32_t *trg, int trgWidth, int trgHeight)
 
void nearestNeighborScale (const uint32_t *src, int srcWidth, int srcHeight, int srcPitch, uint32_t *trg, int trgWidth, int trgHeight, int trgPitch, SliceType st, int yFirst, int yLast)
 
bool equalColor (uint32_t col1, uint32_t col2, double luminanceWeight, double equalColorTolerance)
 

Enumeration Type Documentation

◆ SliceType

Enumerator
NN_SCALE_SLICE_SOURCE 
NN_SCALE_SLICE_TARGET 

Definition at line 82 of file xbrz.hpp.

Function Documentation

◆ equalColor()

bool xbrz::equalColor ( uint32_t  col1,
uint32_t  col2,
double  luminanceWeight,
double  equalColorTolerance 
)

Definition at line 1206 of file xbrz.cpp.

◆ nearestNeighborScale() [1/2]

void xbrz::nearestNeighborScale ( const uint32_t *  src,
int  srcWidth,
int  srcHeight,
int  srcPitch,
uint32_t *  trg,
int  trgWidth,
int  trgHeight,
int  trgPitch,
SliceType  st,
int  yFirst,
int  yLast 
)

Definition at line 1212 of file xbrz.cpp.

References NN_SCALE_SLICE_SOURCE, and NN_SCALE_SLICE_TARGET.

◆ nearestNeighborScale() [2/2]

void xbrz::nearestNeighborScale ( const uint32_t *  src,
int  srcWidth,
int  srcHeight,
uint32_t *  trg,
int  trgWidth,
int  trgHeight 
)
inline

Definition at line 100 of file xbrz.hpp.

References NN_SCALE_SLICE_TARGET.

Referenced by scale_surface_nn().

◆ scale()

void xbrz::scale ( size_t  factor,
const uint32_t *  src,
uint32_t *  trg,
int  srcWidth,
int  srcHeight,
const ScalerCfg cfg = ScalerCfg(),
int  yFirst = 0,
int  yLast = std::numeric_limits<int>::max() 
)