本文整理汇总了C++中GetPageEnd函数的典型用法代码示例。如果您正苦于以下问题:C++ GetPageEnd函数的具体用法?C++ GetPageEnd怎么用?C++ GetPageEnd使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetPageEnd函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: MOZ_ASSERT
void Axis::OverscrollBy(ParentLayerCoord aOverscroll) {
MOZ_ASSERT(CanScroll());
StopSamplingOverscrollAnimation();
aOverscroll = ApplyResistance(aOverscroll);
if (aOverscroll > 0) {
#ifdef DEBUG
if (!FuzzyEqualsCoordinate(GetCompositionEnd().value, GetPageEnd().value)) {
nsPrintfCString message("composition end (%f) is not equal (within error) to page end (%f)\n",
GetCompositionEnd().value, GetPageEnd().value);
NS_ASSERTION(false, message.get());
MOZ_CRASH();
}
#endif
MOZ_ASSERT(mOverscroll >= 0);
} else if (aOverscroll < 0) {
#ifdef DEBUG
if (!FuzzyEqualsCoordinate(GetOrigin().value, GetPageStart().value)) {
nsPrintfCString message("composition origin (%f) is not equal (within error) to page origin (%f)\n",
GetOrigin().value, GetPageStart().value);
NS_ASSERTION(false, message.get());
MOZ_CRASH();
}
#endif
MOZ_ASSERT(mOverscroll <= 0);
}
mOverscroll += aOverscroll;
}
开发者ID:RobertJGabriel,项目名称:Waterfox,代码行数:27,代码来源:Axis.cpp
示例2: MOZ_ASSERT
void Axis::OverscrollBy(CSSCoord aOverscroll) {
MOZ_ASSERT(CanScroll());
aOverscroll = ApplyResistance(aOverscroll);
if (aOverscroll > 0) {
#ifdef DEBUG
if (!FuzzyEqualsAdditive(GetCompositionEnd().value, GetPageEnd().value, COORDINATE_EPSILON)) {
nsPrintfCString message("composition end (%f) is not within COORDINATE_EPISLON of page end (%f)\n",
GetCompositionEnd().value, GetPageEnd().value);
NS_ASSERTION(false, message.get());
MOZ_CRASH();
}
#endif
MOZ_ASSERT(mOverscroll >= 0);
} else if (aOverscroll < 0) {
#ifdef DEBUG
if (!FuzzyEqualsAdditive(GetOrigin().value, GetPageStart().value, COORDINATE_EPSILON)) {
nsPrintfCString message("composition origin (%f) is not within COORDINATE_EPISLON of page origin (%f)\n",
GetOrigin().value, GetPageStart().value);
NS_ASSERTION(false, message.get());
MOZ_CRASH();
}
#endif
MOZ_ASSERT(mOverscroll <= 0);
}
mOverscroll += aOverscroll;
}
开发者ID:martasect,项目名称:gecko,代码行数:26,代码来源:Axis.cpp
示例3: switch
float Axis::GetExcess() {
switch (GetOverscroll()) {
case OVERSCROLL_MINUS: return GetOrigin() - GetPageStart();
case OVERSCROLL_PLUS: return GetCompositionEnd() - GetPageEnd();
case OVERSCROLL_BOTH: return (GetCompositionEnd() - GetPageEnd()) +
(GetPageStart() - GetOrigin());
default: return 0;
}
}
开发者ID:nhirata,项目名称:releases-mozilla-central,代码行数:9,代码来源:Axis.cpp
示例4: ScaleWillOverscrollBothSides
float Axis::ScaleWillOverscrollAmount(float aScale, float aFocus) {
float originAfterScale = (GetOrigin() + aFocus) - (aFocus / aScale);
bool both = ScaleWillOverscrollBothSides(aScale);
bool minus = originAfterScale < GetPageStart();
bool plus = (originAfterScale + (GetCompositionLength() / aScale)) > GetPageEnd();
if ((minus && plus) || both) {
// If we ever reach here it's a bug in the client code.
MOZ_ASSERT(false, "In an OVERSCROLL_BOTH condition in ScaleWillOverscrollAmount");
return 0;
}
if (minus) {
return originAfterScale - GetPageStart();
}
if (plus) {
return originAfterScale + (GetCompositionLength() / aScale) - GetPageEnd();
}
return 0;
}
开发者ID:blue119,项目名称:gecko-dev,代码行数:20,代码来源:Axis.cpp
示例5: MOZ_ASSERT
void Axis::OverscrollBy(CSSCoord aOverscroll) {
MOZ_ASSERT(CanScroll());
aOverscroll = ApplyResistance(aOverscroll);
if (aOverscroll > 0) {
MOZ_ASSERT(FuzzyEqualsAdditive(GetCompositionEnd().value, GetPageEnd().value, COORDINATE_EPSILON));
MOZ_ASSERT(mOverscroll >= 0);
} else if (aOverscroll < 0) {
MOZ_ASSERT(FuzzyEqualsAdditive(GetOrigin().value, GetPageStart().value, COORDINATE_EPSILON));
MOZ_ASSERT(mOverscroll <= 0);
}
mOverscroll += aOverscroll;
}
开发者ID:bebef1987,项目名称:gecko-dev,代码行数:12,代码来源:Axis.cpp
示例6: ScaleWillOverscrollBothSides
Axis::Overscroll Axis::ScaleWillOverscroll(float aScale, int32_t aFocus) {
float originAfterScale = (GetOrigin() + aFocus) * aScale - aFocus;
bool both = ScaleWillOverscrollBothSides(aScale);
bool minus = originAfterScale < GetPageStart() * aScale;
bool plus = (originAfterScale + GetCompositionLength()) > GetPageEnd() * aScale;
if ((minus && plus) || both) {
return OVERSCROLL_BOTH;
}
if (minus) {
return OVERSCROLL_MINUS;
}
if (plus) {
return OVERSCROLL_PLUS;
}
return OVERSCROLL_NONE;
}
开发者ID:nhirata,项目名称:releases-mozilla-central,代码行数:18,代码来源:Axis.cpp
示例7: GetOrigin
Axis::Overscroll Axis::DisplacementWillOverscroll(int32_t aDisplacement) {
// If the current pan plus a displacement takes the window to the left of or
// above the current page rect.
bool minus = GetOrigin() + aDisplacement < GetPageStart();
// If the current pan plus a displacement takes the window to the right of or
// below the current page rect.
bool plus = GetCompositionEnd() + aDisplacement > GetPageEnd();
if (minus && plus) {
return OVERSCROLL_BOTH;
}
if (minus) {
return OVERSCROLL_MINUS;
}
if (plus) {
return OVERSCROLL_PLUS;
}
return OVERSCROLL_NONE;
}
开发者ID:nhirata,项目名称:releases-mozilla-central,代码行数:18,代码来源:Axis.cpp
示例8: GetOrigin
bool Axis::HasRoomToPan() const {
return GetOrigin() > GetPageStart()
|| GetCompositionEnd() < GetPageEnd();
}
开发者ID:Wrichik1999,项目名称:gecko-dev,代码行数:4,代码来源:Axis.cpp
注:本文中的GetPageEnd函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论