/* * Copyright 2006 The Android Open Source Project * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkRect_DEFINED #define SkRect_DEFINED #include "include/core/SkPoint.h" #include "include/core/SkSize.h" #include "include/core/SkTypes.h" #include "include/private/base/SkFloatingPoint.h" #include "include/private/base/SkSafe32.h" #include "include/private/base/SkTFitsIn.h" #include <algorithm> #include <cmath> #include <cstdint> #include <cstring> struct SkRect; /** \struct SkIRect SkIRect holds four 32-bit integer coordinates describing the upper and lower bounds of a rectangle. SkIRect may be created from outer bounds or from position, width, and height. SkIRect describes an area; if its right is less than or equal to its left, or if its bottom is less than or equal to its top, it is considered empty. */ struct SK_API SkIRect { … }; /** \struct SkRect SkRect holds four float coordinates describing the upper and lower bounds of a rectangle. SkRect may be created from outer bounds or from position, width, and height. SkRect describes an area; if its right is less than or equal to its left, or if its bottom is less than or equal to its top, it is considered empty. */ struct SK_API SkRect { … }; inline bool SkIRect::contains(const SkRect& r) const { … } #endif