blob: e677813288484230e1dddc96f6cb03b4d6dc41b7 [file] [log] [blame]
* Copyright 2013 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 SkXfermodeImageFilter_DEFINED
#define SkXfermodeImageFilter_DEFINED
#include "SkArithmeticImageFilter.h"
#include "SkBlendMode.h"
#include "SkImageFilter.h"
* This filter takes a SkBlendMode, and uses it to composite the foreground over the background.
* If foreground or background is NULL, the input bitmap (src) is used instead.
class SK_API SkXfermodeImageFilter {
static sk_sp<SkImageFilter> Make(SkBlendMode, sk_sp<SkImageFilter> background,
sk_sp<SkImageFilter> foreground,
const SkImageFilter::CropRect* cropRect);
static sk_sp<SkImageFilter> Make(SkBlendMode mode, sk_sp<SkImageFilter> background) {
return Make(mode, std::move(background), nullptr, nullptr);
SkXfermodeImageFilter(); // can't instantiate