| 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 466 of file impeller.hpp.

## Constructor & Destructor Documentation

## ◆ ColorSource()

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

Definition at line 469 of file impeller.hpp.

469 : 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 474 of file impeller.hpp.

483 {
484 return ColorSource(
485 gGlobalProcTable.ImpellerColorSourceCreateConicalGradientNew(
486 &start_center, //
487 start_radius, //
488 &end_center, //
489 end_radius, //
490 stop_count, //
491 colors, //
492 stops, //
493 tile_mode, //
494 transformation //
495 ),
496 AdoptTag::kAdopt);
497 }
IMPELLER_HPP_NAMESPACE::ColorSource::ColorSource
ColorSource(ImpellerColorSource source, AdoptTag tag)
Definition: impeller.hpp:469
IMPELLER_HPP_NAMESPACE::AdoptTag::kAdopt
@ kAdopt
IMPELLER_HPP_NAMESPACE::gGlobalProcTable
ProcTable gGlobalProcTable
Definition: playground_test.cc:25

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 502 of file impeller.hpp.

506 {
507 return ColorSource(gGlobalProcTable.ImpellerColorSourceCreateImageNew(
508 image.Get(), //
509 horizontal_tile_mode, //
510 vertical_tile_mode, //
511 sampling, //
512 transformation //
513 ),
514 AdoptTag::kAdopt);
515 }

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 520 of file impeller.hpp.

527 {
528 return ColorSource(
529 gGlobalProcTable.ImpellerColorSourceCreateLinearGradientNew(
530 &start_point,
531 &end_point, //
532 stop_count, //
533 colors, //
534 stops, //
535 tile_mode, //
536 transformation //
537 ),
538 AdoptTag::kAdopt);
539 }

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 544 of file impeller.hpp.

551 {
552 return ColorSource(
553 gGlobalProcTable.ImpellerColorSourceCreateRadialGradientNew(
554 &center, //
555 radius, //
556 stop_count, //
557 colors, //
558 stops, //
559 tile_mode, //
560 transformation //
561 ),
562 AdoptTag::kAdopt);
563 }

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 568 of file impeller.hpp.

576 {
577 return ColorSource(
578 gGlobalProcTable.ImpellerColorSourceCreateSweepGradientNew(
579 &center, //
580 start, //
581 end, //
582 stop_count, //
583 colors, //
584 stops, //
585 tile_mode, //
586 transformation //
587 ),
588 AdoptTag::kAdopt);
589 }

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