这篇教程C++ GetPageEnd函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中GetPageEnd函数的典型用法代码示例。如果您正苦于以下问题:C++ GetPageEnd函数的具体用法?C++ GetPageEnd怎么用?C++ GetPageEnd使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了GetPageEnd函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: MOZ_ASSERTvoid 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,
示例2: MOZ_ASSERTvoid 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,
示例3: switchfloat 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,
示例4: ScaleWillOverscrollBothSidesfloat 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,
示例5: MOZ_ASSERTvoid 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,
示例6: ScaleWillOverscrollBothSidesAxis::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,
示例7: GetOriginAxis::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,
示例8: GetOriginbool Axis::HasRoomToPan() const { return GetOrigin() > GetPageStart() || GetCompositionEnd() < GetPageEnd();}
开发者ID:Wrichik1999,项目名称:gecko-dev,代码行数:4,
注:本文中的GetPageEnd函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ GetPageSize函数代码示例 C++ GetPageCount函数代码示例 |