summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/fxge/agg/fx_agg_driver.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/fxge/agg/fx_agg_driver.cpp b/core/fxge/agg/fx_agg_driver.cpp
index 5ab48a95fe..4534ee1425 100644
--- a/core/fxge/agg/fx_agg_driver.cpp
+++ b/core/fxge/agg/fx_agg_driver.cpp
@@ -27,9 +27,11 @@
namespace {
+const float kMaxPos = 32000.0f;
+
CFX_PointF HardClip(const CFX_PointF& pos) {
- return CFX_PointF(std::max(std::min(pos.x, 50000.0f), -50000.0f),
- std::max(std::min(pos.y, 50000.0f), -50000.0f));
+ return CFX_PointF(std::max(std::min(pos.x, kMaxPos), -kMaxPos),
+ std::max(std::min(pos.y, kMaxPos), -kMaxPos));
}
void RgbByteOrderSetPixel(CFX_DIBitmap* pBitmap, int x, int y, uint32_t argb) {