| Flutter Impeller |

Public Member Functions | Static Public Member Functions | List of all members
IMPELLER_HPP_NAMESPACE::ColorSource Class Referencefinal

`#include <impeller.hpp>`

Inheritance diagram for IMPELLER_HPP_NAMESPACE::ColorSource:

## Public Member Functions
| ColorSource (ImpellerColorSource source, AdoptTag tag)
Public Member Functions inherited from IMPELLER_HPP_NAMESPACE::Object< ImpellerColorSource, ImpellerColorSourceTraits >
| Object ()=default
| Object (ImpellerColorSource object)
| Object (ImpellerColorSource object, AdoptTag)
| Object (Object &&other)
| Object (const Object &other)
| ~Object ()
Object & | operator= (Object &&other)
Object & | operator= (const Object &other)
ImpellerColorSource | Get () const
| operator bool () const

## Static Public Member Functions
static ColorSource | ConicalGradient (const ImpellerPoint &start_center, float start_radius, const ImpellerPoint &end_center, float end_radius, uint32_t stop_count, const ImpellerColor *colors, const float *stops, ImpellerTileMode tile_mode, const ImpellerMatrix *transformation=nullptr)
static ColorSource | Image (const Texture &image, ImpellerTileMode horizontal_tile_mode, ImpellerTileMode vertical_tile_mode, ImpellerTextureSampling sampling, const ImpellerMatrix *transformation=nullptr)
static ColorSource | LinearGradient (const ImpellerPoint &start_point, const ImpellerPoint &end_point, uint32_t stop_count, const ImpellerColor *colors, const float *stops, ImpellerTileMode tile_mode, const ImpellerMatrix *transformation=nullptr)
static ColorSource | RadialGradient (const ImpellerPoint &center, float radius, uint32_t stop_count, const ImpellerColor *colors, const float *stops, ImpellerTileMode tile_mode, const ImpellerMatrix *transformation=nullptr)
static ColorSource | SweepGradient (const ImpellerPoint &center, float start, float end, uint32_t stop_count, const ImpellerColor *colors, const float *stops, ImpellerTileMode tile_mode, const ImpellerMatrix *transformation=nullptr)

## Detailed Description

See also
  ImpellerColorSource

Definition at line 421 of file impeller.hpp.

## Constructor & Destructor Documentation

## ◆ ColorSource()

IMPELLER_HPP_NAMESPACE::ColorSource::ColorSource | ( | ImpellerColorSource | source,
|  | AdoptTag | tag
| ) |  |
| inline

Definition at line 424 of file impeller.hpp.

424 : Object(source, tag) {}
IMPELLER_HPP_NAMESPACE::Object< ImpellerColorSource, ImpellerColorSourceTraits >::Object
Object()=default

Referenced by ConicalGradient(), Image(), LinearGradient(), RadialGradient(), and SweepGradient().

## Member Function Documentation

## ◆ ConicalGradient()

static ColorSource IMPELLER_HPP_NAMESPACE::ColorSource::ConicalGradient | ( | const ImpellerPoint & | start_center,
|  | float | start_radius,
|  | const ImpellerPoint & | end_center,
|  | float | end_radius,
|  | uint32_t | stop_count,
|  | const ImpellerColor * | colors,
|  | const float * | stops,
|  | ImpellerTileMode | tile_mode,
|  | const ImpellerMatrix * | transformation = `nullptr`
| ) |  |
| inline static

See also
  ImpellerColorSourceCreateConicalGradientNew

Definition at line 429 of file impeller.hpp.

438 {
439 return ColorSource(
440 gGlobalProcTable.ImpellerColorSourceCreateConicalGradientNew(
441 &start_center, //
442 start_radius, //
443 &end_center, //
444 end_radius, //
445 stop_count, //
446 colors, //
447 stops, //
448 tile_mode, //
449 transformation //
450 ),
451 AdoptTag::kAdopt);
452 }
IMPELLER_HPP_NAMESPACE::ColorSource::ColorSource
ColorSource(ImpellerColorSource source, AdoptTag tag)
Definition: impeller.hpp:424
IMPELLER_HPP_NAMESPACE::AdoptTag::kAdopt
@ kAdopt
IMPELLER_HPP_NAMESPACE::gGlobalProcTable
ProcTable gGlobalProcTable
Definition: playground_test.cc:10

References ColorSource(), IMPELLER_HPP_NAMESPACE::gGlobalProcTable, and IMPELLER_HPP_NAMESPACE::kAdopt.

## ◆ Image()

static ColorSource IMPELLER_HPP_NAMESPACE::ColorSource::Image | ( | const Texture & | image,
|  | ImpellerTileMode | horizontal_tile_mode,
|  | ImpellerTileMode | vertical_tile_mode,
|  | ImpellerTextureSampling | sampling,
|  | const ImpellerMatrix * | transformation = `nullptr`
| ) |  |
| inline static

See also
  ImpellerColorSourceCreateImageNew

Definition at line 457 of file impeller.hpp.

461 {
462 return ColorSource(gGlobalProcTable.ImpellerColorSourceCreateImageNew(
463 image.Get(), //
464 horizontal_tile_mode, //
465 vertical_tile_mode, //
466 sampling, //
467 transformation //
468 ),
469 AdoptTag::kAdopt);
470 }

References ColorSource(), IMPELLER_HPP_NAMESPACE::Object< T, Traits >::Get(), IMPELLER_HPP_NAMESPACE::gGlobalProcTable, and IMPELLER_HPP_NAMESPACE::kAdopt.

## ◆ LinearGradient()

static ColorSource IMPELLER_HPP_NAMESPACE::ColorSource::LinearGradient | ( | const ImpellerPoint & | start_point,
|  | const ImpellerPoint & | end_point,
|  | uint32_t | stop_count,
|  | const ImpellerColor * | colors,
|  | const float * | stops,
|  | ImpellerTileMode | tile_mode,
|  | const ImpellerMatrix * | transformation = `nullptr`
| ) |  |
| inline static

See also
  ImpellerColorSourceCreateLinearGradientNew

Definition at line 475 of file impeller.hpp.

482 {
483 return ColorSource(
484 gGlobalProcTable.ImpellerColorSourceCreateLinearGradientNew(
485 &start_point,
486 &end_point, //
487 stop_count, //
488 colors, //
489 stops, //
490 tile_mode, //
491 transformation //
492 ),
493 AdoptTag::kAdopt);
494 }

References ColorSource(), IMPELLER_HPP_NAMESPACE::gGlobalProcTable, and IMPELLER_HPP_NAMESPACE::kAdopt.

## ◆ RadialGradient()

static ColorSource IMPELLER_HPP_NAMESPACE::ColorSource::RadialGradient | ( | const ImpellerPoint & | center,
|  | float | radius,
|  | uint32_t | stop_count,
|  | const ImpellerColor * | colors,
|  | const float * | stops,
|  | ImpellerTileMode | tile_mode,
|  | const ImpellerMatrix * | transformation = `nullptr`
| ) |  |
| inline static

See also
  ImpellerColorSourceCreateRadialGradientNew

Definition at line 499 of file impeller.hpp.

506 {
507 return ColorSource(
508 gGlobalProcTable.ImpellerColorSourceCreateRadialGradientNew(
509 &center, //
510 radius, //
511 stop_count, //
512 colors, //
513 stops, //
514 tile_mode, //
515 transformation //
516 ),
517 AdoptTag::kAdopt);
518 }

References ColorSource(), IMPELLER_HPP_NAMESPACE::gGlobalProcTable, and IMPELLER_HPP_NAMESPACE::kAdopt.

## ◆ SweepGradient()

static ColorSource IMPELLER_HPP_NAMESPACE::ColorSource::SweepGradient | ( | const ImpellerPoint & | center,
|  | float | start,
|  | float | end,
|  | uint32_t | stop_count,
|  | const ImpellerColor * | colors,
|  | const float * | stops,
|  | ImpellerTileMode | tile_mode,
|  | const ImpellerMatrix * | transformation = `nullptr`
| ) |  |
| inline static

See also
  ImpellerColorSourceCreateSweepGradientNew

Definition at line 523 of file impeller.hpp.

531 {
532 return ColorSource(
533 gGlobalProcTable.ImpellerColorSourceCreateSweepGradientNew(
534 &center, //
535 start, //
536 end, //
537 stop_count, //
538 colors, //
539 stops, //
540 tile_mode, //
541 transformation //
542 ),
543 AdoptTag::kAdopt);
544 }

References ColorSource(), IMPELLER_HPP_NAMESPACE::gGlobalProcTable, and IMPELLER_HPP_NAMESPACE::kAdopt.

The documentation for this class was generated from the following file:

- impeller/toolkit/interop/impeller.hpp