skia2/include/core/SkTileMode.h
Mike Reed e25b4472cd Move SkTileModes to top level
- move shader factories to their host (e.g. picture->makeShader)

More to do to formally deprecated SkShader::TileMode

Bug: skia:8937
Change-Id: I101e42fb9fba4ab91d028a34888f1fde16fdece4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205589
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-04-03 00:18:35 +00:00

42 lines
873 B
C

/*
* Copyright 2019 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkTileModes_DEFINED
#define SkTileModes_DEFINED
#include "SkTypes.h"
enum class SkTileMode {
/**
* Replicate the edge color if the shader draws outside of its
* original bounds.
*/
kClamp,
/**
* Repeat the shader's image horizontally and vertically.
*/
kRepeat,
/**
* Repeat the shader's image horizontally and vertically, alternating
* mirror images so that adjacent images always seam.
*/
kMirror,
/**
* Only draw within the original domain, return transparent-black everywhere else.
*/
kDecal,
kLastTileMode = kDecal,
};
static constexpr int kSkTileModeCount = static_cast<int>(SkTileMode::kLastTileMode) + 1;
#endif