SkColorMatrixFilter.h 737 B

12345678910111213141516171819202122232425
  1. /*
  2. * Copyright 2007 The Android Open Source Project
  3. *
  4. * Use of this source code is governed by a BSD-style license that can be
  5. * found in the LICENSE file.
  6. */
  7. #ifndef SkColorMatrixFilter_DEFINED
  8. #define SkColorMatrixFilter_DEFINED
  9. #include "include/core/SkColorFilter.h"
  10. #include "include/effects/SkColorMatrix.h"
  11. class SK_API SkColorMatrixFilter : public SkColorFilter {
  12. public:
  13. /**
  14. * Create a colorfilter that multiplies the RGB channels by one color, and
  15. * then adds a second color, pinning the result for each component to
  16. * [0..255]. The alpha components of the mul and add arguments
  17. * are ignored.
  18. */
  19. static sk_sp<SkColorFilter> MakeLightingFilter(SkColor mul, SkColor add);
  20. };
  21. #endif