#include "third_party/blink/renderer/core/style/style_ray.h"
#include "third_party/blink/renderer/core/style/basic_shapes.h"
#include "third_party/blink/renderer/platform/graphics/path.h"
#include "ui/gfx/geometry/point_f.h"
#include "ui/gfx/geometry/rect_f.h"
#include "ui/gfx/geometry/size_f.h"
namespace blink {
scoped_refptr<StyleRay> StyleRay::Create(
float angle,
RaySize size,
bool contain,
const BasicShapeCenterCoordinate& center_x,
const BasicShapeCenterCoordinate& center_y,
bool has_explicit_center) { … }
StyleRay::StyleRay(float angle,
RaySize size,
bool contain,
const BasicShapeCenterCoordinate& center_x,
const BasicShapeCenterCoordinate& center_y,
bool has_explicit_center)
: … { … }
bool StyleRay::IsEqualAssumingSameType(const BasicShape& o) const { … }
void StyleRay::GetPath(Path&, const gfx::RectF&, float) const { … }
namespace {
float CalculatePerpendicularDistanceToReferenceBoxSide(
const gfx::PointF& point,
const gfx::SizeF& reference_box_size,
float (*comp)(std::initializer_list<float>)) { … }
float CalculateDistance(const gfx::PointF& a, const gfx::PointF& b) { … }
float CalculateDistanceToReferenceBoxCorner(
const gfx::PointF& point,
const gfx::SizeF& box_size,
float (*comp)(std::initializer_list<float>)) { … }
float CalculateDistanceToReferenceBoxSide(
const gfx::PointF& point,
const float angle,
const gfx::SizeF& reference_box_size) { … }
}
float StyleRay::CalculateRayPathLength(
const gfx::PointF& starting_point,
const gfx::SizeF& reference_box_size) const { … }
PointAndTangent StyleRay::PointAndNormalAtLength(
const gfx::PointF& starting_point,
float length) const { … }
}