// Copyright 2024 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "pdf/draw_utils/page_boundary_intersect.h" #include "base/check.h" #include "ui/gfx/geometry/point_f.h" #include "ui/gfx/geometry/rect.h" #include "ui/gfx/geometry/rect_f.h" namespace chrome_pdf { namespace { // gfx::Rect considers points on its bottom and right border to be not contained // within the rect. So to make sure CalculatePageBoundaryIntersectPoint() // returns points within the page, use this constant to move them inwards a bit. constexpr float kBoundaryEpsilon = …; } // namespace gfx::PointF CalculatePageBoundaryIntersectPoint( const gfx::Rect& page_rect, const gfx::PointF& inside_point, const gfx::PointF& outside_point) { … } } // namespace chrome_pdf