skia2/include/core/SkAlpha.h
skia.committer@gmail.com 572a865846 Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@11426 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-21 07:01:53 +00:00

51 lines
1.4 KiB
C

/*
* Copyright 2013 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkAlpha_DEFINED
#define SkAlpha_DEFINED
#include "SkTypes.h"
/**
* Describes how to interpret the alpha compoent of a pixel.
*/
enum SkAlphaType {
/**
* All pixels should be treated as opaque, regardless of the value stored
* in their alpha field. Used for legacy images that wrote 0 or garbarge
* in their alpha field, but intended the RGB to be treated as opaque.
*/
kIgnore_SkAlphaType,
/**
* All pixels are stored as opaque. This differs slightly from kIgnore in
* that kOpaque has correct "opaque" values stored in the pixels, while
* kIgnore may not, but in both cases the caller should treat the pixels
* as opaque.
*/
kOpaque_SkAlphaType,
/**
* All pixels have their alpha premultiplied in their color components.
* This is the natural format for the rendering target pixels.
*/
kPremul_SkAlphaType,
/**
* All pixels have their color components stored without any regard to the
* alpha. e.g. this is the default configuration for PNG images.
*
* This alpha-type is ONLY supported for input images. Rendering cannot
* generate this on output.
*/
kUnpremul_SkAlphaType,
kLastEnum_SkAlphaType = kUnpremul_SkAlphaType
};
#endif