本文整理汇总了C++中FX_RECT::Normalize方法的典型用法代码示例。如果您正苦于以下问题:C++ FX_RECT::Normalize方法的具体用法?C++ FX_RECT::Normalize怎么用?C++ FX_RECT::Normalize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FX_RECT
的用法示例。
在下文中一共展示了FX_RECT::Normalize方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetClosestRect
FX_RECT CFX_FloatRect::GetClosestRect() const {
CFX_FloatRect rect1 = *this;
FX_RECT rect;
_MatchFloatRange(rect1.left, rect1.right, rect.left, rect.right);
_MatchFloatRange(rect1.bottom, rect1.top, rect.top, rect.bottom);
rect.Normalize();
return rect;
}
示例2: Union
void FX_RECT::Union(const FX_RECT& other_rect) {
Normalize();
FX_RECT other = other_rect;
other.Normalize();
left = left < other.left ? left : other.left;
right = right > other.right ? right : other.right;
bottom = bottom > other.bottom ? bottom : other.bottom;
top = top < other.top ? top : other.top;
}
示例3: GetInnerRect
FX_RECT CFX_FloatRect::GetInnerRect() const {
CFX_FloatRect rect1 = *this;
FX_RECT rect;
rect.left = (int)FXSYS_ceil(rect1.left);
rect.right = (int)FXSYS_floor(rect1.right);
rect.top = (int)FXSYS_ceil(rect1.bottom);
rect.bottom = (int)FXSYS_floor(rect1.top);
rect.Normalize();
return rect;
}
示例4: _FXDIB_SwapClipBox
FX_RECT _FXDIB_SwapClipBox(FX_RECT& clip, int width, int height, FX_BOOL bFlipX, FX_BOOL bFlipY)
{
FX_RECT rect;
if (bFlipY) {
rect.left = height - clip.top;
rect.right = height - clip.bottom;
} else {
rect.left = clip.top;
rect.right = clip.bottom;
}
if (bFlipX) {
rect.top = width - clip.left;
rect.bottom = width - clip.right;
} else {
rect.top = clip.left;
rect.bottom = clip.right;
}
rect.Normalize();
return rect;
}