chromium/ui/gfx/geometry/rrect_f.cc

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/354829279): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "ui/gfx/geometry/rrect_f.h"

#include <iomanip>
#include <iostream>
#include <sstream>

#include "base/values.h"
#include "third_party/skia/include/core/SkMatrix.h"
#include "ui/gfx/geometry/rect_conversions.h"
#include "ui/gfx/geometry/rect_f.h"

namespace gfx {

// Sets all x radii to x_rad, and all y radii to y_rad. If one of x_rad or
// y_rad are zero, sets ALL radii to zero.
RRectF::RRectF(float x,
               float y,
               float width,
               float height,
               float x_rad,
               float y_rad)
    :{}

// Directly sets all four corners.
RRectF::RRectF(float x,
               float y,
               float width,
               float height,
               float upper_left_x,
               float upper_left_y,
               float upper_right_x,
               float upper_right_y,
               float lower_right_x,
               float lower_right_y,
               float lower_left_x,
               float lower_left_y) {}

gfx::Vector2dF RRectF::GetSimpleRadii() const {}

float RRectF::GetSimpleRadius() const {}

RRectF::Type RRectF::GetType() const {}

gfx::Vector2dF RRectF::GetCornerRadii(Corner corner) const {}

void RRectF::GetAllRadii(SkVector radii[4]) const {}

void RRectF::SetCornerRadii(Corner corner, float x_rad, float y_rad) {}

gfx::RectF RRectF::CornerBoundingRect(Corner corner) const {}

void RRectF::Scale(float x_scale, float y_scale) {}

void RRectF::Offset(float horizontal, float vertical) {}

const RRectF& RRectF::operator+=(const gfx::Vector2dF& offset) {}

const RRectF& RRectF::operator-=(const gfx::Vector2dF& offset) {}

std::string RRectF::ToString() const {}

namespace {
inline bool AboveTol(float val1, float val2, float tolerance) {}
}  // namespace

bool RRectF::ApproximatelyEqual(const RRectF& rect, float tolerance) const {}

// static
RRectF RRectF::ToEnclosingRRectF(const RRectF& rrect_f) {}

// static
RRectF RRectF::ToEnclosingRRectFIgnoringError(const RRectF& rrect_f,
                                              float error) {}

gfx::RoundedCornersF RRectF::GetRoundedCorners() const {}

}  // namespace gfx