Rect
kn::Rect Declared in kraken/geometry/Rect.hpp
At a glance
53 membersxvariableyvariablewvariablehvariableRectfunction~RectfunctioncopyfunctionmovefunctionmovedfunctioninflatefunctionfitfunctionclampfunctionclampedfunctionscaleByfunctionscaledByfunctionscaleTofunctionscaledTofunctiongetCornersfunctiongetEdgesfunctionoperator==functionoperator!=functionoperator SDL_Rectfunctionoperator SDL_FRectfunctionsetPosfunctionsetSizefunctionsetLeftfunctionsetRightfunctionsetTopfunctionsetBottomfunctionsetTopLeftfunctionsetTopMidfunctionsetTopRightfunctionsetMidLeftfunctionsetCenterfunctionsetMidRightfunctionsetBottomLeftfunctionsetBottomMidfunctionsetBottomRightfunctiongetPosfunctiongetSizefunctiongetLeftfunctiongetRightfunctiongetTopfunctiongetBottomfunctiongetTopLeftfunctiongetTopMidfunctiongetTopRightfunctiongetMidLeftfunctiongetCenterfunctiongetMidRightfunctiongetBottomLeftfunctiongetBottomMidfunctiongetBottomRightfunctionReference
C++ APIx
variabledouble x = 0No description in the source header.
y
variabledouble y = 0No description in the source header.
w
variabledouble w = 0No description in the source header.
h
variabledouble h = 0No description in the source header.
No description in the source header.
~Rect
function~Rect()=defaultNo description in the source header.
copy
functionRect copy() constNo description in the source header.
move
functionvoid move(const Vec2 &offset)No description in the source header.
moved
functionNo description in the source header.
inflate
functionvoid inflate(const Vec2 &offset)No description in the source header.
fit
functionvoid fit(const Rect &other)No description in the source header.
No description in the source header.
No description in the source header.
void scaleBy(double factor)void scaleBy(const Vec2 &factor)No description in the source header.
No description in the source header.
scaleTo
functionvoid scaleTo(const Vec2 &size)No description in the source header.
scaledTo
functionNo description in the source header.
getCorners
functionstd::array< Vec2, 4 > getCorners() constNo description in the source header.
getEdges
functionstd::array< Line, 4 > getEdges() constNo description in the source header.
operator==
functionbool operator==(const Rect &other) constNo description in the source header.
operator!=
functionbool operator!=(const Rect &other) constNo description in the source header.
operator SDL_Rect
functionoperator SDL_Rect() constNo description in the source header.
operator SDL_FRect
functionoperator SDL_FRect() constNo description in the source header.
setPos
functionvoid setPos(const Vec2 &pos)No description in the source header.
setSize
functionvoid setSize(const Vec2 &size)No description in the source header.
setLeft
functionvoid setLeft(double left)No description in the source header.
setRight
functionvoid setRight(double right)No description in the source header.
setTop
functionvoid setTop(double top)No description in the source header.
setBottom
functionvoid setBottom(double bottom)No description in the source header.
setTopLeft
functionvoid setTopLeft(const Vec2 &topLeft)No description in the source header.
setTopMid
functionvoid setTopMid(const Vec2 &topMid)No description in the source header.
setTopRight
functionvoid setTopRight(const Vec2 &topRight)No description in the source header.
setMidLeft
functionvoid setMidLeft(const Vec2 &midLeft)No description in the source header.
setCenter
functionvoid setCenter(const Vec2 ¢er)No description in the source header.
setMidRight
functionvoid setMidRight(const Vec2 &midRight)No description in the source header.
setBottomLeft
functionvoid setBottomLeft(const Vec2 &bottomLeft)No description in the source header.
setBottomMid
functionvoid setBottomMid(const Vec2 &bottomMid)No description in the source header.
setBottomRight
functionvoid setBottomRight(const Vec2 &bottomRight)No description in the source header.
getPos
functionVec2 getPos() constNo description in the source header.
getSize
functionVec2 getSize() constNo description in the source header.
getLeft
functiondouble getLeft() constNo description in the source header.
getRight
functiondouble getRight() constNo description in the source header.
getTop
functiondouble getTop() constNo description in the source header.
getBottom
functiondouble getBottom() constNo description in the source header.
getTopLeft
functionVec2 getTopLeft() constNo description in the source header.
getTopMid
functionVec2 getTopMid() constNo description in the source header.
getTopRight
functionVec2 getTopRight() constNo description in the source header.
getMidLeft
functionVec2 getMidLeft() constNo description in the source header.
getCenter
functionVec2 getCenter() constNo description in the source header.
getMidRight
functionVec2 getMidRight() constNo description in the source header.
getBottomLeft
functionVec2 getBottomLeft() constNo description in the source header.
getBottomMid
functionVec2 getBottomMid() constNo description in the source header.
getBottomRight
functionVec2 getBottomRight() constNo description in the source header.