ScummVM API documentation
Graphics::TransformTools Class Reference

Static Public Member Functions

static FloatPoint transformPoint (FloatPoint point, const float rotate, const Common::Point &zoom, const bool mirrorX=false, const bool mirrorY=false)
 
static Common::Rect newRect (const Common::Rect &oldRect, const TransformStruct &transform, Common::Point *newHotspot)
 

Member Function Documentation

◆ transformPoint()

static FloatPoint Graphics::TransformTools::transformPoint ( FloatPoint  point,
const float  rotate,
const Common::Point zoom,
const bool  mirrorX = false,
const bool  mirrorY = false 
)
static

Basic transform (scale + rotate) for a single point

Parameters
pointthe point on which the transform is to be applied
rotatethe angle in degrees
zoomzoom x,y in percent
mirrorXflip along the vertical axis?
mirrorYflip along the horizontal axis?

◆ newRect()

static Common::Rect Graphics::TransformTools::newRect ( const Common::Rect oldRect,
const TransformStruct transform,
Common::Point newHotspot 
)
static
Returns
the smallest rect that can contain the transformed sprite and, as a side-effect, "newHotspot" will tell you where the hotspot will have ended up in the new rect, for centering.

The documentation for this class was generated from the following file: