chromium/third_party/skia/src/core/SkPaint.cpp

/*
 * 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.
 */

#include "include/core/SkPaint.h"

#include "include/core/SkAlphaType.h"
#include "include/core/SkBlendMode.h"
#include "include/core/SkBlender.h"
#include "include/core/SkColorFilter.h"
#include "include/core/SkImageFilter.h"
#include "include/core/SkMaskFilter.h"
#include "include/core/SkPathEffect.h"
#include "include/core/SkRect.h"
#include "include/core/SkScalar.h"
#include "include/core/SkShader.h"
#include "include/core/SkStrokeRec.h"
#include "include/private/base/SkTPin.h"
#include "include/private/base/SkTo.h"
#include "src/core/SkBlenderBase.h"
#include "src/core/SkColorSpacePriv.h"
#include "src/core/SkColorSpaceXformSteps.h"
#include "src/core/SkMaskFilterBase.h"
#include "src/core/SkPaintDefaults.h"
#include "src/core/SkPathEffectBase.h"
#include "src/effects/colorfilters/SkColorFilterBase.h"

#include <utility>

// define this to get a printf for out-of-range parameter in setters
// e.g. setTextSize(-1)
//#define SK_REPORT_API_RANGE_CHECK


SkPaint::SkPaint()
    :{}

SkPaint::SkPaint(const SkColor4f& color, SkColorSpace* colorSpace) :{}

SkPaint::SkPaint(const SkPaint& src) = default;

SkPaint::SkPaint(SkPaint&& src) = default;

SkPaint::~SkPaint() = default;

SkPaint& SkPaint::operator=(const SkPaint& src) = default;

SkPaint& SkPaint::operator=(SkPaint&& src) = default;

bool operator==(const SkPaint& a, const SkPaint& b) {}

#define DEFINE_FIELD_REF
DEFINE_FIELD_REF
DEFINE_FIELD_REF
DEFINE_FIELD_REF
DEFINE_FIELD_REF
DEFINE_FIELD_REF
DEFINE_FIELD_REF
#undef DEFINE_FIELD_REF

#define DEFINE_FIELD_SET
DEFINE_FIELD_SET
DEFINE_FIELD_SET
DEFINE_FIELD_SET
DEFINE_FIELD_SET
DEFINE_FIELD_SET
#undef DEFINE_FIELD_SET

///////////////////////////////////////////////////////////////////////////////

void SkPaint::reset() {}

void SkPaint::setStyle(Style style) {}

void SkPaint::setStroke(bool isStroke) {}

void SkPaint::setColor(SkColor color) {}

void SkPaint::setColor(const SkColor4f& color, SkColorSpace* colorSpace) {}

void SkPaint::setAlphaf(float a) {}

void SkPaint::setARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b) {}

std::optional<SkBlendMode> SkPaint::asBlendMode() const {}

SkBlendMode SkPaint::getBlendMode_or(SkBlendMode defaultMode) const {}

bool SkPaint::isSrcOver() const {}

void SkPaint::setBlendMode(SkBlendMode mode) {}

void SkPaint::setBlender(sk_sp<SkBlender> blender) {}

void SkPaint::setStrokeWidth(SkScalar width) {}

void SkPaint::setStrokeMiter(SkScalar limit) {}

void SkPaint::setStrokeCap(Cap ct) {}

void SkPaint::setStrokeJoin(Join jt) {}

///////////////////////////////////////////////////////////////////////////////

bool SkPaint::canComputeFastBounds() const {}

const SkRect& SkPaint::computeFastBounds(const SkRect& orig, SkRect* storage) const {}

const SkRect& SkPaint::doComputeFastBounds(const SkRect& origSrc,
                                           SkRect* storage,
                                           Style style) const {}

///////////////////////////////////////////////////////////////////////////////

// return true if the filter exists, and may affect alpha
static bool affects_alpha(const SkColorFilter* cf) {}

// return true if the filter exists, and may affect alpha
static bool affects_alpha(const SkImageFilter* imf) {}

bool SkPaint::nothingToDraw() const {}