chromium/third_party/blink/renderer/platform/graphics/path.cc

/*
 * Copyright (C) 2003, 2006 Apple Computer, Inc.  All rights reserved.
 *                     2006 Rob Buis <[email protected]>
 * Copyright (C) 2007 Eric Seidel <[email protected]>
 * Copyright (C) 2013 Google Inc. All rights reserved.
 * Copyright (C) 2013 Intel Corporation. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include "third_party/blink/renderer/platform/graphics/path.h"

#include <math.h>
#include "third_party/blink/renderer/platform/graphics/skia/skia_utils.h"
#include "third_party/blink/renderer/platform/graphics/stroke_data.h"
#include "third_party/blink/renderer/platform/transforms/affine_transform.h"
#include "third_party/blink/renderer/platform/wtf/math_extras.h"
#include "third_party/skia/include/pathops/SkPathOps.h"
#include "ui/gfx/geometry/point_f.h"
#include "ui/gfx/geometry/quad_f.h"
#include "ui/gfx/geometry/rect_f.h"
#include "ui/gfx/geometry/skia_conversions.h"

namespace blink {

namespace {

bool PathQuadIntersection(const SkPath& path, const gfx::QuadF& quad) {}

}  // namespace

Path::Path() :{}

Path::Path(const Path& other) :{}

Path::Path(const SkPath& other) :{}

Path::~Path() = default;

Path& Path::operator=(const Path& other) {}

Path& Path::operator=(const SkPath& other) {}

bool Path::operator==(const Path& other) const {}

bool Path::Contains(const gfx::PointF& point) const {}

bool Path::Contains(const gfx::PointF& point, WindRule rule) const {}

bool Path::Intersects(const gfx::QuadF& quad) const {}

bool Path::Intersects(const gfx::QuadF& quad, WindRule rule) const {}

SkPath Path::StrokePath(const StrokeData& stroke_data,
                        const AffineTransform& transform) const {}

SkPath Path::StrokePath(const StrokeData& stroke_data,
                        float stroke_precision) const {}

bool Path::StrokeContains(const gfx::PointF& point,
                          const StrokeData& stroke_data,
                          const AffineTransform& transform) const {}

gfx::RectF Path::TightBoundingRect() const {}

gfx::RectF Path::BoundingRect() const {}

gfx::RectF Path::StrokeBoundingRect(const StrokeData& stroke_data) const {}

static base::span<gfx::PointF> ConvertPathPoints(
    std::array<gfx::PointF, 3>& dst,
    base::span<const SkPoint> src) {}

void Path::Apply(void* info, PathApplierFunction function) const {}

Path& Path::Transform(const AffineTransform& xform) {}

Path& Path::Transform(const gfx::Transform& transform) {}

float Path::length() const {}

gfx::PointF Path::PointAtLength(float length) const {}

static std::optional<PointAndTangent> CalculatePointAndNormalOnPath(
    SkPathMeasure& measure,
    SkScalar& contour_start,
    SkScalar length) {}

PointAndTangent Path::PointAndNormalAtLength(float length) const {}

Path::PositionCalculator::PositionCalculator(const Path& path)
    :{}

PointAndTangent Path::PositionCalculator::PointAndNormalAtLength(float length) {}

void Path::Clear() {}

bool Path::IsEmpty() const {}

bool Path::IsClosed() const {}

bool Path::IsLine() const {}

void Path::SetIsVolatile(bool is_volatile) {}

bool Path::HasCurrentPoint() const {}

gfx::PointF Path::CurrentPoint() const {}

void Path::SetWindRule(const WindRule rule) {}

void Path::MoveTo(const gfx::PointF& point) {}

void Path::AddLineTo(const gfx::PointF& point) {}

void Path::AddQuadCurveTo(const gfx::PointF& cp, const gfx::PointF& ep) {}

void Path::AddBezierCurveTo(const gfx::PointF& p1,
                            const gfx::PointF& p2,
                            const gfx::PointF& ep) {}

void Path::AddArcTo(const gfx::PointF& p1,
                    const gfx::PointF& p2,
                    float radius) {}

void Path::AddArcTo(const gfx::PointF& p,
                    float radius_x,
                    float radius_y,
                    float x_rotate,
                    bool large_arc,
                    bool sweep) {}

void Path::CloseSubpath() {}

void Path::AddEllipse(const gfx::PointF& p,
                      float radius_x,
                      float radius_y,
                      float start_angle,
                      float end_angle) {}

void Path::AddArc(const gfx::PointF& p,
                  float radius,
                  float start_angle,
                  float end_angle) {}

void Path::AddRect(const gfx::RectF& rect) {}

void Path::AddRect(const gfx::PointF& origin,
                   const gfx::PointF& opposite_point) {}

void Path::AddEllipse(const gfx::PointF& p,
                      float radius_x,
                      float radius_y,
                      float rotation,
                      float start_angle,
                      float end_angle) {}

void Path::AddEllipse(const gfx::PointF& center,
                      float radius_x,
                      float radius_y) {}

void Path::AddRoundedRect(const FloatRoundedRect& rect, bool clockwise) {}

void Path::AddPath(const Path& src, const AffineTransform& transform) {}

void Path::Translate(const gfx::Vector2dF& offset) {}

bool Path::SubtractPath(const Path& other) {}

bool Path::UnionPath(const Path& other) {}

bool EllipseIsRenderable(float start_angle, float end_angle) {}

}  // namespace blink