| Flutter Impeller |

Classes | Macros | Typedefs | Enumerations | Functions
impeller.h File Reference
`#include <stdbool.h>`
`#include <stddef.h>`
`#include <stdint.h>`

Go to the source code of this file.

## Classes
struct | ImpellerRect
struct | ImpellerPoint
struct | ImpellerSize
struct | ImpellerISize
struct | ImpellerMatrix
struct | ImpellerColorMatrix
struct | ImpellerRoundingRadii
struct | ImpellerColor
struct | ImpellerTextureDescriptor
struct | ImpellerMapping

## Macros
#define | IMPELLER_EXTERN_C
#define | IMPELLER_EXTERN_C_BEGIN
#define | IMPELLER_EXTERN_C_END
#define | IMPELLER_EXPORT_DECORATION __attribute__((visibility("default")))
#define | IMPELLER_EXPORT IMPELLER_EXPORT_DECORATION
#define | IMPELLER_NULLABLE
#define | IMPELLER_NONNULL
#define | IMPELLER_NODISCARD
#define | IMPELLER_MAKE_VERSION(variant, major, minor, patch)
| Pack a version in a uint32_t. More...
#define | IMPELLER_VERSION_VARIANT 1
#define | IMPELLER_VERSION_MAJOR 1
#define | IMPELLER_VERSION_MINOR 2
#define | IMPELLER_VERSION_PATCH 0
#define | IMPELLER_VERSION
#define | IMPELLER_VERSION_GET_VARIANT(version) ((uint32_t)(version) >> 29U)
#define | IMPELLER_VERSION_GET_MAJOR(version) (((uint32_t)(version) >> 22U) & 0x7FU)
#define | IMPELLER_VERSION_GET_MINOR(version) (((uint32_t)(version) >> 12U) & 0x3FFU)
#define | IMPELLER_VERSION_GET_PATCH(version) ((uint32_t)(version) & 0xFFFU)
#define | IMPELLER_INTERNAL_HANDLE_NAME(handle) handle##_
#define | IMPELLER_DEFINE_HANDLE(handle) typedef struct IMPELLER_INTERNAL_HANDLE_NAME(handle) * handle;

## Typedefs
typedef void(* | ImpellerCallback) (void *IMPELLER_NULLABLE user_data)
typedef void *IMPELLER_NULLABLE(* | ImpellerProcAddressCallback) (const char *IMPELLER_NONNULL proc_name, void *IMPELLER_NULLABLE user_data)
typedef enum ImpellerFillType | ImpellerFillType
typedef enum ImpellerClipOperation | ImpellerClipOperation
typedef enum ImpellerBlendMode | ImpellerBlendMode
typedef enum ImpellerDrawStyle | ImpellerDrawStyle
typedef enum ImpellerStrokeCap | ImpellerStrokeCap
typedef enum ImpellerStrokeJoin | ImpellerStrokeJoin
typedef enum ImpellerPixelFormat | ImpellerPixelFormat
typedef enum ImpellerTextureSampling | ImpellerTextureSampling
typedef enum ImpellerTileMode | ImpellerTileMode
typedef enum ImpellerBlurStyle | ImpellerBlurStyle
typedef enum ImpellerColorSpace | ImpellerColorSpace
typedef enum ImpellerFontWeight | ImpellerFontWeight
typedef enum ImpellerFontStyle | ImpellerFontStyle
typedef enum ImpellerTextAlignment | ImpellerTextAlignment
typedef enum ImpellerTextDirection | ImpellerTextDirection
typedef struct ImpellerRect | ImpellerRect
typedef struct ImpellerPoint | ImpellerPoint
typedef struct ImpellerSize | ImpellerSize
typedef struct ImpellerISize | ImpellerISize
typedef struct ImpellerMatrix | ImpellerMatrix
typedef struct ImpellerColorMatrix | ImpellerColorMatrix
typedef struct ImpellerRoundingRadii | ImpellerRoundingRadii
typedef struct ImpellerColor | ImpellerColor
typedef struct ImpellerTextureDescriptor | ImpellerTextureDescriptor
typedef struct ImpellerMapping | ImpellerMapping

## Enumerations
enum | ImpellerFillType { kImpellerFillTypeNonZero , kImpellerFillTypeOdd }
enum | ImpellerClipOperation { kImpellerClipOperationDifference , kImpellerClipOperationIntersect }
enum | ImpellerBlendMode { kImpellerBlendModeClear , kImpellerBlendModeSource , kImpellerBlendModeDestination , kImpellerBlendModeSourceOver , kImpellerBlendModeDestinationOver , kImpellerBlendModeSourceIn , kImpellerBlendModeDestinationIn , kImpellerBlendModeSourceOut , kImpellerBlendModeDestinationOut , kImpellerBlendModeSourceATop , kImpellerBlendModeDestinationATop , kImpellerBlendModeXor , kImpellerBlendModePlus , kImpellerBlendModeModulate , kImpellerBlendModeScreen , kImpellerBlendModeOverlay , kImpellerBlendModeDarken , kImpellerBlendModeLighten , kImpellerBlendModeColorDodge , kImpellerBlendModeColorBurn , kImpellerBlendModeHardLight , kImpellerBlendModeSoftLight , kImpellerBlendModeDifference , kImpellerBlendModeExclusion , kImpellerBlendModeMultiply , kImpellerBlendModeHue , kImpellerBlendModeSaturation , kImpellerBlendModeColor , kImpellerBlendModeLuminosity }
enum | ImpellerDrawStyle { kImpellerDrawStyleFill , kImpellerDrawStyleStroke , kImpellerDrawStyleStrokeAndFill }
enum | ImpellerStrokeCap { kImpellerStrokeCapButt , kImpellerStrokeCapRound , kImpellerStrokeCapSquare }
enum | ImpellerStrokeJoin { kImpellerStrokeJoinMiter , kImpellerStrokeJoinRound , kImpellerStrokeJoinBevel }
enum | ImpellerPixelFormat { kImpellerPixelFormatRGBA8888 }
enum | ImpellerTextureSampling { kImpellerTextureSamplingNearestNeighbor , kImpellerTextureSamplingLinear }
enum | ImpellerTileMode { kImpellerTileModeClamp , kImpellerTileModeRepeat , kImpellerTileModeMirror , kImpellerTileModeDecal }
enum | ImpellerBlurStyle { kImpellerBlurStyleNormal , kImpellerBlurStyleSolid , kImpellerBlurStyleOuter , kImpellerBlurStyleInner }
enum | ImpellerColorSpace { kImpellerColorSpaceSRGB , kImpellerColorSpaceExtendedSRGB , kImpellerColorSpaceDisplayP3 }
enum | ImpellerFontWeight { kImpellerFontWeight100 , kImpellerFontWeight200 , kImpellerFontWeight300 , kImpellerFontWeight400 , kImpellerFontWeight500 , kImpellerFontWeight600 , kImpellerFontWeight700 , kImpellerFontWeight800 , kImpellerFontWeight900 }
enum | ImpellerFontStyle { kImpellerFontStyleNormal , kImpellerFontStyleItalic }
enum | ImpellerTextAlignment { kImpellerTextAlignmentLeft , kImpellerTextAlignmentRight , kImpellerTextAlignmentCenter , kImpellerTextAlignmentJustify , kImpellerTextAlignmentStart , kImpellerTextAlignmentEnd }
enum | ImpellerTextDirection { kImpellerTextDirectionRTL , kImpellerTextDirectionLTR }

## Functions
| IMPELLER_DEFINE_HANDLE (ImpellerContext)
| IMPELLER_DEFINE_HANDLE (ImpellerDisplayList)
| IMPELLER_DEFINE_HANDLE (ImpellerDisplayListBuilder)
| IMPELLER_DEFINE_HANDLE (ImpellerPaint)
| IMPELLER_DEFINE_HANDLE (ImpellerColorFilter)
| IMPELLER_DEFINE_HANDLE (ImpellerColorSource)
| IMPELLER_DEFINE_HANDLE (ImpellerImageFilter)
| IMPELLER_DEFINE_HANDLE (ImpellerMaskFilter)
| IMPELLER_DEFINE_HANDLE (ImpellerTypographyContext)
| IMPELLER_DEFINE_HANDLE (ImpellerParagraph)
| IMPELLER_DEFINE_HANDLE (ImpellerParagraphBuilder)
| IMPELLER_DEFINE_HANDLE (ImpellerParagraphStyle)
| IMPELLER_DEFINE_HANDLE (ImpellerPath)
| IMPELLER_DEFINE_HANDLE (ImpellerPathBuilder)
| IMPELLER_DEFINE_HANDLE (ImpellerSurface)
| IMPELLER_DEFINE_HANDLE (ImpellerTexture)
IMPELLER_EXPORT uint32_t | ImpellerGetVersion ()
| Get the version of Impeller standalone API. This is the API that will be accepted for validity checks when provided to the context creation methods. More...
IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerContext IMPELLER_NULLABLE | ImpellerContextCreateOpenGLESNew (uint32_t version, ImpellerProcAddressCallback IMPELLER_NONNULL gl_proc_address_callback, void *IMPELLER_NULLABLE gl_proc_address_callback_user_data)
| Create an OpenGL(ES) Impeller context. More...
IMPELLER_EXPORT void | ImpellerContextRetain (ImpellerContext IMPELLER_NULLABLE context)
| Retain a strong reference to the object. The object can be NULL in which case this method is a no-op. More...
IMPELLER_EXPORT void | ImpellerContextRelease (ImpellerContext IMPELLER_NULLABLE context)
| Release a previously retained reference to the object. The object can be NULL in which case this method is a no-op. More...
IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerSurface IMPELLER_NULLABLE | ImpellerSurfaceCreateWrappedFBONew (ImpellerContext IMPELLER_NULLABLE context, uint64_t fbo, ImpellerPixelFormat format, const ImpellerISize *IMPELLER_NULLABLE size)
| Create a new surface by wrapping an existing framebuffer object. The framebuffer must be complete as determined by `glCheckFramebufferStatus`. The framebuffer is still owned by the caller and it must be collected once the surface is collected. More...
IMPELLER_EXPORT void | ImpellerSurfaceRetain (ImpellerSurface IMPELLER_NULLABLE surface)
| Retain a strong reference to the object. The object can be NULL in which case this method is a no-op. More...
IMPELLER_EXPORT void | ImpellerSurfaceRelease (ImpellerSurface IMPELLER_NULLABLE surface)
| Release a previously retained reference to the object. The object can be NULL in which case this method is a no-op. More...
IMPELLER_EXPORT bool | ImpellerSurfaceDrawDisplayList (ImpellerSurface IMPELLER_NULLABLE surface, ImpellerDisplayList IMPELLER_NONNULL display_list)
| Draw a display list onto the surface. The same display list can be drawn multiple times to different surfaces. More...
IMPELLER_EXPORT void | ImpellerPathRetain (ImpellerPath IMPELLER_NULLABLE path)
| Retain a strong reference to the object. The object can be NULL in which case this method is a no-op. More...
IMPELLER_EXPORT void | ImpellerPathRelease (ImpellerPath IMPELLER_NULLABLE path)
| Release a previously retained reference to the object. The object can be NULL in which case this method is a no-op. More...
IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerPathBuilder IMPELLER_NULLABLE | ImpellerPathBuilderNew ()
| Create a new path builder. Paths themselves are immutable. A builder builds these immutable paths. More...
IMPELLER_EXPORT void | ImpellerPathBuilderRetain (ImpellerPathBuilder IMPELLER_NULLABLE builder)
| Retain a strong reference to the object. The object can be NULL in which case this method is a no-op. More...
IMPELLER_EXPORT void | ImpellerPathBuilderRelease (ImpellerPathBuilder IMPELLER_NULLABLE builder)
| Release a previously retained reference to the object. The object can be NULL in which case this method is a no-op. More...
IMPELLER_EXPORT void | ImpellerPathBuilderMoveTo (ImpellerPathBuilder IMPELLER_NONNULL builder, const ImpellerPoint *IMPELLER_NONNULL location)
| Move the cursor to the specified location. More...
IMPELLER_EXPORT void | ImpellerPathBuilderLineTo (ImpellerPathBuilder IMPELLER_NONNULL builder, const ImpellerPoint *IMPELLER_NONNULL location)
| Add a line segment from the current cursor location to the given location. The cursor location is updated to be at the endpoint. More...
IMPELLER_EXPORT void | ImpellerPathBuilderQuadraticCurveTo (ImpellerPathBuilder IMPELLER_NONNULL builder, const ImpellerPoint *IMPELLER_NONNULL control_point, const ImpellerPoint *IMPELLER_NONNULL end_point)
| Add a quadratic curve from whose start point is the cursor to the specified end point using the a single control point. More...
IMPELLER_EXPORT void | ImpellerPathBuilderCubicCurveTo (ImpellerPathBuilder IMPELLER_NONNULL builder, const ImpellerPoint *IMPELLER_NONNULL control_point_1, const ImpellerPoint *IMPELLER_NONNULL control_point_2, const ImpellerPoint *IMPELLER_NONNULL end_point)
| Add a cubic curve whose start point is current cursor location to the specified end point using the two specified control points. More...
IMPELLER_EXPORT void | ImpellerPathBuilderAddRect (ImpellerPathBuilder IMPELLER_NONNULL builder, const ImpellerRect *IMPELLER_NONNULL rect)
| Adds a rectangle to the path. More...
IMPELLER_EXPORT void | ImpellerPathBuilderAddArc (ImpellerPathBuilder IMPELLER_NONNULL builder, const ImpellerRect *IMPELLER_NONNULL oval_bounds, float start_angle_degrees, float end_angle_degrees)
| Add an arc to the path. More...
IMPELLER_EXPORT void | ImpellerPathBuilderAddOval (ImpellerPathBuilder IMPELLER_NONNULL builder, const ImpellerRect *IMPELLER_NONNULL oval_bounds)
| Add an oval to the path. More...
IMPELLER_EXPORT void | ImpellerPathBuilderAddRoundedRect (ImpellerPathBuilder IMPELLER_NONNULL builder, const ImpellerRect *IMPELLER_NONNULL rect, const ImpellerRoundingRadii *IMPELLER_NONNULL rounding_radii)
| Add a rounded rect with potentially non-uniform radii to the path. More...
IMPELLER_EXPORT void | ImpellerPathBuilderClose (ImpellerPathBuilder IMPELLER_NONNULL builder)
| Close the path. More...
IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerPath IMPELLER_NULLABLE | ImpellerPathBuilderCopyPathNew (ImpellerPathBuilder IMPELLER_NONNULL builder, ImpellerFillType fill)
| Create a new path by copying the existing built-up path. The existing path can continue being added to. More...
IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerPath IMPELLER_NULLABLE | ImpellerPathBuilderTakePathNew (ImpellerPathBuilder IMPELLER_NONNULL builder, ImpellerFillType fill)
| Create a new path using the existing built-up path. The existing path builder now contains an empty path. More...
IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerPaint IMPELLER_NULLABLE | ImpellerPaintNew ()
| Create a new paint with default values. More...
IMPELLER_EXPORT void | ImpellerPaintRetain (ImpellerPaint IMPELLER_NULLABLE paint)
| Retain a strong reference to the object. The object can be NULL in which case this method is a no-op. More...
IMPELLER_EXPORT void | ImpellerPaintRelease (ImpellerPaint IMPELLER_NULLABLE paint)
| Release a previously retained reference to the object. The object can be NULL in which case this method is a no-op. More...
IMPELLER_EXPORT void | ImpellerPaintSetColor (ImpellerPaint IMPELLER_NONNULL paint, const ImpellerColor *IMPELLER_NONNULL color)
| Set the paint color. More...
IMPELLER_EXPORT void | ImpellerPaintSetBlendMode (ImpellerPaint IMPELLER_NONNULL paint, ImpellerBlendMode mode)
| Set the paint blend mode. The blend mode controls how the new paints contents are mixed with the values already drawn using previous draw calls. More...
IMPELLER_EXPORT void | ImpellerPaintSetDrawStyle (ImpellerPaint IMPELLER_NONNULL paint, ImpellerDrawStyle style)
| Set the paint draw style. The style controls if the closed shapes are filled and/or stroked. More...
IMPELLER_EXPORT void | ImpellerPaintSetStrokeCap (ImpellerPaint IMPELLER_NONNULL paint, ImpellerStrokeCap cap)
| Sets how strokes rendered using this paint are capped. More...
IMPELLER_EXPORT void | ImpellerPaintSetStrokeJoin (ImpellerPaint IMPELLER_NONNULL paint, ImpellerStrokeJoin join)
| Sets how strokes rendered using this paint are joined. More...
IMPELLER_EXPORT void | ImpellerPaintSetStrokeWidth (ImpellerPaint IMPELLER_NONNULL paint, float width)
| Set the width of the strokes rendered using this paint. More...
IMPELLER_EXPORT void | ImpellerPaintSetStrokeMiter (ImpellerPaint IMPELLER_NONNULL paint, float miter)
| Set the miter limit of the strokes rendered using this paint. More...
IMPELLER_EXPORT void | ImpellerPaintSetColorFilter (ImpellerPaint IMPELLER_NONNULL paint, ImpellerColorFilter IMPELLER_NONNULL color_filter)
| Set the color filter of the paint. More...
IMPELLER_EXPORT void | ImpellerPaintSetColorSource (ImpellerPaint IMPELLER_NONNULL paint, ImpellerColorSource IMPELLER_NONNULL color_source)
| Set the color source of the paint. More...
IMPELLER_EXPORT void | ImpellerPaintSetImageFilter (ImpellerPaint IMPELLER_NONNULL paint, ImpellerImageFilter IMPELLER_NONNULL image_filter)
| Set the image filter of a paint. More...
IMPELLER_EXPORT void | ImpellerPaintSetMaskFilter (ImpellerPaint IMPELLER_NONNULL paint, ImpellerMaskFilter IMPELLER_NONNULL mask_filter)
| Set the mask filter of a paint. More...
IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerTexture IMPELLER_NULLABLE | ImpellerTextureCreateWithContentsNew (ImpellerContext IMPELLER_NONNULL context, const ImpellerTextureDescriptor *IMPELLER_NONNULL descriptor, const ImpellerMapping *IMPELLER_NONNULL contents, void *IMPELLER_NULLABLE contents_on_release_user_data)
| Create a texture with decompressed bytes. More...
IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerTexture IMPELLER_NULLABLE | ImpellerTextureCreateWithOpenGLTextureHandleNew (ImpellerContext IMPELLER_NONNULL context, const ImpellerTextureDescriptor *IMPELLER_NONNULL descriptor, uint64_t handle)
| Create a texture with an externally created OpenGL texture handle. More...
IMPELLER_EXPORT void | ImpellerTextureRetain (ImpellerTexture IMPELLER_NULLABLE texture)
| Retain a strong reference to the object. The object can be NULL in which case this method is a no-op. More...
IMPELLER_EXPORT void | ImpellerTextureRelease (ImpellerTexture IMPELLER_NULLABLE texture)
| Release a previously retained reference to the object. The object can be NULL in which case this method is a no-op. More...
IMPELLER_EXPORT uint64_t | ImpellerTextureGetOpenGLHandle (ImpellerTexture IMPELLER_NONNULL texture)
| Get the OpenGL handle associated with this texture. If this is not an OpenGL texture, this method will always return 0. More...
IMPELLER_EXPORT void | ImpellerColorSourceRetain (ImpellerColorSource IMPELLER_NULLABLE color_source)
| Retain a strong reference to the object. The object can be NULL in which case this method is a no-op. More...
IMPELLER_EXPORT void | ImpellerColorSourceRelease (ImpellerColorSource IMPELLER_NULLABLE color_source)
| Release a previously retained reference to the object. The object can be NULL in which case this method is a no-op. More...
IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerColorSource IMPELLER_NULLABLE | ImpellerColorSourceCreateLinearGradientNew (const ImpellerPoint *IMPELLER_NONNULL start_point, const ImpellerPoint *IMPELLER_NONNULL end_point, uint32_t stop_count, const ImpellerColor *IMPELLER_NONNULL colors, const float *IMPELLER_NONNULL stops, ImpellerTileMode tile_mode, const ImpellerMatrix *IMPELLER_NULLABLE transformation)
| Create a color source that forms a linear gradient. More...
IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerColorSource IMPELLER_NULLABLE | ImpellerColorSourceCreateRadialGradientNew (const ImpellerPoint *IMPELLER_NONNULL center, float radius, uint32_t stop_count, const ImpellerColor *IMPELLER_NONNULL colors, const float *IMPELLER_NONNULL stops, ImpellerTileMode tile_mode, const ImpellerMatrix *IMPELLER_NULLABLE transformation)
| Create a color source that forms a radial gradient. More...
IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerColorSource IMPELLER_NULLABLE | ImpellerColorSourceCreateConicalGradientNew (const ImpellerPoint *IMPELLER_NONNULL start_center, float start_radius, const ImpellerPoint *IMPELLER_NONNULL end_center, float end_radius, uint32_t stop_count, const ImpellerColor *IMPELLER_NONNULL colors, const float *IMPELLER_NONNULL stops, ImpellerTileMode tile_mode, const ImpellerMatrix *IMPELLER_NULLABLE transformation)
| Create a color source that forms a conical gradient. More...
IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerColorSource IMPELLER_NULLABLE | ImpellerColorSourceCreateSweepGradientNew (const ImpellerPoint *IMPELLER_NONNULL center, float start, float end, uint32_t stop_count, const ImpellerColor *IMPELLER_NONNULL colors, const float *IMPELLER_NONNULL stops, ImpellerTileMode tile_mode, const ImpellerMatrix *IMPELLER_NULLABLE transformation)
| Create a color source that forms a sweep gradient. More...
IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerColorSource IMPELLER_NULLABLE | ImpellerColorSourceCreateImageNew (ImpellerTexture IMPELLER_NONNULL image, ImpellerTileMode horizontal_tile_mode, ImpellerTileMode vertical_tile_mode, ImpellerTextureSampling sampling, const ImpellerMatrix *IMPELLER_NULLABLE transformation)
| Create a color source that samples from an image. More...
IMPELLER_EXPORT void | ImpellerColorFilterRetain (ImpellerColorFilter IMPELLER_NULLABLE color_filter)
| Retain a strong reference to the object. The object can be NULL in which case this method is a no-op. More...
IMPELLER_EXPORT void | ImpellerColorFilterRelease (ImpellerColorFilter IMPELLER_NULLABLE color_filter)
| Release a previously retained reference to the object. The object can be NULL in which case this method is a no-op. More...
IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerColorFilter IMPELLER_NULLABLE | ImpellerColorFilterCreateBlendNew (const ImpellerColor *IMPELLER_NONNULL color, ImpellerBlendMode blend_mode)
| Create a color filter that performs blending of pixel values independently. More...
IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerColorFilter IMPELLER_NULLABLE | ImpellerColorFilterCreateColorMatrixNew (const ImpellerColorMatrix *IMPELLER_NONNULL color_matrix)
| Create a color filter that transforms pixel color values independently. More...
IMPELLER_EXPORT void | ImpellerMaskFilterRetain (ImpellerMaskFilter IMPELLER_NULLABLE mask_filter)
| Retain a strong reference to the object. The object can be NULL in which case this method is a no-op. More...
IMPELLER_EXPORT void | ImpellerMaskFilterRelease (ImpellerMaskFilter IMPELLER_NULLABLE mask_filter)
| Release a previously retained reference to the object. The object can be NULL in which case this method is a no-op. More...
IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerMaskFilter IMPELLER_NULLABLE | ImpellerMaskFilterCreateBlurNew (ImpellerBlurStyle style, float sigma)
| Create a mask filter that blurs contents in the masked shape. More...
IMPELLER_EXPORT void | ImpellerImageFilterRetain (ImpellerImageFilter IMPELLER_NULLABLE image_filter)
| Retain a strong reference to the object. The object can be NULL in which case this method is a no-op. More...
IMPELLER_EXPORT void | ImpellerImageFilterRelease (ImpellerImageFilter IMPELLER_NULLABLE image_filter)
| Release a previously retained reference to the object. The object can be NULL in which case this method is a no-op. More...
IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerImageFilter IMPELLER_NULLABLE | ImpellerImageFilterCreateBlurNew (float x_sigma, float y_sigma, ImpellerTileMode tile_mode)
| Creates an image filter that applies a Gaussian blur. More...
IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerImageFilter IMPELLER_NULLABLE | ImpellerImageFilterCreateDilateNew (float x_radius, float y_radius)
| Creates an image filter that enhances the per-channel pixel values to the maximum value in a circle around the pixel. More...
IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerImageFilter IMPELLER_NULLABLE | ImpellerImageFilterCreateErodeNew (float x_radius, float y_radius)
| Creates an image filter that dampens the per-channel pixel values to the minimum value in a circle around the pixel. More...
IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerImageFilter IMPELLER_NULLABLE | ImpellerImageFilterCreateMatrixNew (const ImpellerMatrix *IMPELLER_NONNULL matrix, ImpellerTextureSampling sampling)
| Creates an image filter that applies a transformation matrix to the underlying image. More...
IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerImageFilter IMPELLER_NULLABLE | ImpellerImageFilterCreateComposeNew (ImpellerImageFilter IMPELLER_NONNULL outer, ImpellerImageFilter IMPELLER_NONNULL inner)
| Creates a composed filter that when applied is identical to subsequently applying the inner and then the outer filters. More...
IMPELLER_EXPORT void | ImpellerDisplayListRetain (ImpellerDisplayList IMPELLER_NULLABLE display_list)
| Retain a strong reference to the object. The object can be NULL in which case this method is a no-op. More...
IMPELLER_EXPORT void | ImpellerDisplayListRelease (ImpellerDisplayList IMPELLER_NULLABLE display_list)
| Release a previously retained reference to the object. The object can be NULL in which case this method is a no-op. More...
IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerDisplayListBuilder IMPELLER_NULLABLE | ImpellerDisplayListBuilderNew (const ImpellerRect *IMPELLER_NULLABLE cull_rect)
| Create a new display list builder. More...
IMPELLER_EXPORT void | ImpellerDisplayListBuilderRetain (ImpellerDisplayListBuilder IMPELLER_NULLABLE builder)
| Retain a strong reference to the object. The object can be NULL in which case this method is a no-op. More...
IMPELLER_EXPORT void | ImpellerDisplayListBuilderRelease (ImpellerDisplayListBuilder IMPELLER_NULLABLE builder)
| Release a previously retained reference to the object. The object can be NULL in which case this method is a no-op. More...
IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerDisplayList IMPELLER_NULLABLE | ImpellerDisplayListBuilderCreateDisplayListNew (ImpellerDisplayListBuilder IMPELLER_NONNULL builder)
| Create a new display list using the rendering intent already encoded in the builder. The builder is reset after this call. More...
IMPELLER_EXPORT void | ImpellerDisplayListBuilderSave (ImpellerDisplayListBuilder IMPELLER_NONNULL builder)
| Stashes the current transformation and clip state onto a save stack. More...
IMPELLER_EXPORT void | ImpellerDisplayListBuilderSaveLayer (ImpellerDisplayListBuilder IMPELLER_NONNULL builder, const ImpellerRect *IMPELLER_NONNULL bounds, ImpellerPaint IMPELLER_NULLABLE paint, ImpellerImageFilter IMPELLER_NULLABLE backdrop)
| Stashes the current transformation and clip state onto a save stack and creates and creates an offscreen layer onto which subsequent rendering intent will be directed to. More...
IMPELLER_EXPORT void | ImpellerDisplayListBuilderRestore (ImpellerDisplayListBuilder IMPELLER_NONNULL builder)
| Pops the last entry pushed onto the save stack using a call to `ImpellerDisplayListBuilderSave` or `ImpellerDisplayListBuilderSaveLayer`. More...
IMPELLER_EXPORT void | ImpellerDisplayListBuilderScale (ImpellerDisplayListBuilder IMPELLER_NONNULL builder, float x_scale, float y_scale)
| Apply a scale to the transformation matrix currently on top of the save stack. More...
IMPELLER_EXPORT void | ImpellerDisplayListBuilderRotate (ImpellerDisplayListBuilder IMPELLER_NONNULL builder, float angle_degrees)
| Apply a clockwise rotation to the transformation matrix currently on top of the save stack. More...
IMPELLER_EXPORT void | ImpellerDisplayListBuilderTranslate (ImpellerDisplayListBuilder IMPELLER_NONNULL builder, float x_translation, float y_translation)
| Apply a translation to the transformation matrix currently on top of the save stack. More...
IMPELLER_EXPORT void | ImpellerDisplayListBuilderTransform (ImpellerDisplayListBuilder IMPELLER_NONNULL builder, const ImpellerMatrix *IMPELLER_NONNULL transform)
| Appends the the provided transformation to the transformation already on the save stack. More...
IMPELLER_EXPORT void | ImpellerDisplayListBuilderSetTransform (ImpellerDisplayListBuilder IMPELLER_NONNULL builder, const ImpellerMatrix *IMPELLER_NONNULL transform)
| Clear the transformation on top of the save stack and replace it with a new value. More...
IMPELLER_EXPORT void | ImpellerDisplayListBuilderGetTransform (ImpellerDisplayListBuilder IMPELLER_NONNULL builder, ImpellerMatrix *IMPELLER_NONNULL out_transform)
| Get the transformation currently built up on the top of the transformation stack. More...
IMPELLER_EXPORT void | ImpellerDisplayListBuilderResetTransform (ImpellerDisplayListBuilder IMPELLER_NONNULL builder)
| Reset the transformation on top of the transformation stack to identity. More...
IMPELLER_EXPORT uint32_t | ImpellerDisplayListBuilderGetSaveCount (ImpellerDisplayListBuilder IMPELLER_NONNULL builder)
| Get the current size of the save stack. More...
IMPELLER_EXPORT void | ImpellerDisplayListBuilderRestoreToCount (ImpellerDisplayListBuilder IMPELLER_NONNULL builder, uint32_t count)
| Effectively calls ImpellerDisplayListBuilderRestore till the size of the save stack becomes a specified count. More...
IMPELLER_EXPORT void | ImpellerDisplayListBuilderClipRect (ImpellerDisplayListBuilder IMPELLER_NONNULL builder, const ImpellerRect *IMPELLER_NONNULL rect, ImpellerClipOperation op)
| Reduces the clip region to the intersection of the current clip and the given rectangle taking into account the clip operation. More...
IMPELLER_EXPORT void | ImpellerDisplayListBuilderClipOval (ImpellerDisplayListBuilder IMPELLER_NONNULL builder, const ImpellerRect *IMPELLER_NONNULL oval_bounds, ImpellerClipOperation op)
| Reduces the clip region to the intersection of the current clip and the given oval taking into account the clip operation. More...
IMPELLER_EXPORT void | ImpellerDisplayListBuilderClipRoundedRect (ImpellerDisplayListBuilder IMPELLER_NONNULL builder, const ImpellerRect *IMPELLER_NONNULL rect, const ImpellerRoundingRadii *IMPELLER_NONNULL radii, ImpellerClipOperation op)
| Reduces the clip region to the intersection of the current clip and the given rounded rectangle taking into account the clip operation. More...
IMPELLER_EXPORT void | ImpellerDisplayListBuilderClipPath (ImpellerDisplayListBuilder IMPELLER_NONNULL builder, ImpellerPath IMPELLER_NONNULL path, ImpellerClipOperation op)
| Reduces the clip region to the intersection of the current clip and the given path taking into account the clip operation. More...
IMPELLER_EXPORT void | ImpellerDisplayListBuilderDrawPaint (ImpellerDisplayListBuilder IMPELLER_NONNULL builder, ImpellerPaint IMPELLER_NONNULL paint)
| Fills the current clip with the specified paint. More...
IMPELLER_EXPORT void | ImpellerDisplayListBuilderDrawLine (ImpellerDisplayListBuilder IMPELLER_NONNULL builder, const ImpellerPoint *IMPELLER_NONNULL from, const ImpellerPoint *IMPELLER_NONNULL to, ImpellerPaint IMPELLER_NONNULL paint)
| Draws a line segment. More...
IMPELLER_EXPORT void | ImpellerDisplayListBuilderDrawDashedLine (ImpellerDisplayListBuilder IMPELLER_NONNULL builder, const ImpellerPoint *IMPELLER_NONNULL from, const ImpellerPoint *IMPELLER_NONNULL to, float on_length, float off_length, ImpellerPaint IMPELLER_NONNULL paint)
| Draws a dash line segment. More...
IMPELLER_EXPORT void | ImpellerDisplayListBuilderDrawRect (ImpellerDisplayListBuilder IMPELLER_NONNULL builder, const ImpellerRect *IMPELLER_NONNULL rect, ImpellerPaint IMPELLER_NONNULL paint)
| Draws a rectangle. More...
IMPELLER_EXPORT void | ImpellerDisplayListBuilderDrawOval (ImpellerDisplayListBuilder IMPELLER_NONNULL builder, const ImpellerRect *IMPELLER_NONNULL oval_bounds, ImpellerPaint IMPELLER_NONNULL paint)
| Draws an oval. More...
IMPELLER_EXPORT void | ImpellerDisplayListBuilderDrawRoundedRect (ImpellerDisplayListBuilder IMPELLER_NONNULL builder, const ImpellerRect *IMPELLER_NONNULL rect, const ImpellerRoundingRadii *IMPELLER_NONNULL radii, ImpellerPaint IMPELLER_NONNULL paint)
| Draws a rounded rect. More...
IMPELLER_EXPORT void | ImpellerDisplayListBuilderDrawRoundedRectDifference (ImpellerDisplayListBuilder IMPELLER_NONNULL builder, const ImpellerRect *IMPELLER_NONNULL outer_rect, const ImpellerRoundingRadii *IMPELLER_NONNULL outer_radii, const ImpellerRect *IMPELLER_NONNULL inner_rect, const ImpellerRoundingRadii *IMPELLER_NONNULL inner_radii, ImpellerPaint IMPELLER_NONNULL paint)
| Draws a shape that is the different between the specified rectangles (each with configurable corner radii). More...
IMPELLER_EXPORT void | ImpellerDisplayListBuilderDrawPath (ImpellerDisplayListBuilder IMPELLER_NONNULL builder, ImpellerPath IMPELLER_NONNULL path, ImpellerPaint IMPELLER_NONNULL paint)
| Draws the specified shape. More...
IMPELLER_EXPORT void | ImpellerDisplayListBuilderDrawDisplayList (ImpellerDisplayListBuilder IMPELLER_NONNULL builder, ImpellerDisplayList IMPELLER_NONNULL display_list, float opacity)
| Flattens the contents of another display list into the one currently being built. More...
IMPELLER_EXPORT void | ImpellerDisplayListBuilderDrawParagraph (ImpellerDisplayListBuilder IMPELLER_NONNULL builder, ImpellerParagraph IMPELLER_NONNULL paragraph, const ImpellerPoint *IMPELLER_NONNULL point)
| Draw a paragraph at the specified point. More...
IMPELLER_EXPORT void | ImpellerDisplayListBuilderDrawTexture (ImpellerDisplayListBuilder IMPELLER_NONNULL builder, ImpellerTexture IMPELLER_NONNULL texture, const ImpellerPoint *IMPELLER_NONNULL point, ImpellerTextureSampling sampling, ImpellerPaint IMPELLER_NULLABLE paint)
| Draw a texture at the specified point. More...
IMPELLER_EXPORT void | ImpellerDisplayListBuilderDrawTextureRect (ImpellerDisplayListBuilder IMPELLER_NONNULL builder, ImpellerTexture IMPELLER_NONNULL texture, const ImpellerRect *IMPELLER_NONNULL src_rect, const ImpellerRect *IMPELLER_NONNULL dst_rect, ImpellerTextureSampling sampling, ImpellerPaint IMPELLER_NULLABLE paint)
| Draw a portion of texture at the specified location. More...
IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerTypographyContext IMPELLER_NULLABLE | ImpellerTypographyContextNew ()
| Create a new typography contents. More...
IMPELLER_EXPORT void | ImpellerTypographyContextRetain (ImpellerTypographyContext IMPELLER_NULLABLE context)
| Retain a strong reference to the object. The object can be NULL in which case this method is a no-op. More...
IMPELLER_EXPORT void | ImpellerTypographyContextRelease (ImpellerTypographyContext IMPELLER_NULLABLE context)
| Release a previously retained reference to the object. The object can be NULL in which case this method is a no-op. More...
IMPELLER_EXPORT bool | ImpellerTypographyContextRegisterFont (ImpellerTypographyContext IMPELLER_NONNULL context, const ImpellerMapping *IMPELLER_NONNULL contents, void *IMPELLER_NULLABLE contents_on_release_user_data, const char *IMPELLER_NULLABLE family_name_alias)
| Register a custom font. More...
IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerParagraphStyle IMPELLER_NULLABLE | ImpellerParagraphStyleNew ()
| Create a new paragraph style. More...
IMPELLER_EXPORT void | ImpellerParagraphStyleRetain (ImpellerParagraphStyle IMPELLER_NULLABLE paragraph_style)
| Retain a strong reference to the object. The object can be NULL in which case this method is a no-op. More...
IMPELLER_EXPORT void | ImpellerParagraphStyleRelease (ImpellerParagraphStyle IMPELLER_NULLABLE paragraph_style)
| Release a previously retained reference to the object. The object can be NULL in which case this method is a no-op. More...
IMPELLER_EXPORT void | ImpellerParagraphStyleSetForeground (ImpellerParagraphStyle IMPELLER_NONNULL paragraph_style, ImpellerPaint IMPELLER_NONNULL paint)
| Set the paint used to render the text glyph contents. More...
IMPELLER_EXPORT void | ImpellerParagraphStyleSetBackground (ImpellerParagraphStyle IMPELLER_NONNULL paragraph_style, ImpellerPaint IMPELLER_NONNULL paint)
| Set the paint used to render the background of the text glyphs. More...
IMPELLER_EXPORT void | ImpellerParagraphStyleSetFontWeight (ImpellerParagraphStyle IMPELLER_NONNULL paragraph_style, ImpellerFontWeight weight)
| Set the weight of the font to select when rendering glyphs. More...
IMPELLER_EXPORT void | ImpellerParagraphStyleSetFontStyle (ImpellerParagraphStyle IMPELLER_NONNULL paragraph_style, ImpellerFontStyle style)
| Set whether the glyphs should be bolded or italicized. More...
IMPELLER_EXPORT void | ImpellerParagraphStyleSetFontFamily (ImpellerParagraphStyle IMPELLER_NONNULL paragraph_style, const char *IMPELLER_NONNULL family_name)
| Set the font family. More...
IMPELLER_EXPORT void | ImpellerParagraphStyleSetFontSize (ImpellerParagraphStyle IMPELLER_NONNULL paragraph_style, float size)
| Set the font size. More...
IMPELLER_EXPORT void | ImpellerParagraphStyleSetHeight (ImpellerParagraphStyle IMPELLER_NONNULL paragraph_style, float height)
| The height of the text as a multiple of text size. More...
IMPELLER_EXPORT void | ImpellerParagraphStyleSetTextAlignment (ImpellerParagraphStyle IMPELLER_NONNULL paragraph_style, ImpellerTextAlignment align)
| Set the alignment of text within the paragraph. More...
IMPELLER_EXPORT void | ImpellerParagraphStyleSetTextDirection (ImpellerParagraphStyle IMPELLER_NONNULL paragraph_style, ImpellerTextDirection direction)
| Set the directionality of the text within the paragraph. More...
IMPELLER_EXPORT void | ImpellerParagraphStyleSetMaxLines (ImpellerParagraphStyle IMPELLER_NONNULL paragraph_style, uint32_t max_lines)
| Set the maximum line count within the paragraph. More...
IMPELLER_EXPORT void | ImpellerParagraphStyleSetLocale (ImpellerParagraphStyle IMPELLER_NONNULL paragraph_style, const char *IMPELLER_NONNULL locale)
| Set the paragraph locale. More...
IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerParagraphBuilder IMPELLER_NULLABLE | ImpellerParagraphBuilderNew (ImpellerTypographyContext IMPELLER_NONNULL context)
| Create a new paragraph builder. More...
IMPELLER_EXPORT void | ImpellerParagraphBuilderRetain (ImpellerParagraphBuilder IMPELLER_NULLABLE paragraph_builder)
| Retain a strong reference to the object. The object can be NULL in which case this method is a no-op. More...
IMPELLER_EXPORT void | ImpellerParagraphBuilderRelease (ImpellerParagraphBuilder IMPELLER_NULLABLE paragraph_builder)
| Release a previously retained reference to the object. The object can be NULL in which case this method is a no-op. More...
IMPELLER_EXPORT void | ImpellerParagraphBuilderPushStyle (ImpellerParagraphBuilder IMPELLER_NONNULL paragraph_builder, ImpellerParagraphStyle IMPELLER_NONNULL style)
| Push a new paragraph style onto the paragraph style stack managed by the paragraph builder. More...
IMPELLER_EXPORT void | ImpellerParagraphBuilderPopStyle (ImpellerParagraphBuilder IMPELLER_NONNULL paragraph_builder)
| Pop a previously pushed paragraph style from the paragraph style stack. More...
IMPELLER_EXPORT void | ImpellerParagraphBuilderAddText (ImpellerParagraphBuilder IMPELLER_NONNULL paragraph_builder, const uint8_t *IMPELLER_NULLABLE data, uint32_t length)
| Add UTF-8 encoded text to the paragraph. The text will be styled according to the paragraph style already on top of the paragraph style stack. More...
IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerParagraph IMPELLER_NULLABLE | ImpellerParagraphBuilderBuildParagraphNew (ImpellerParagraphBuilder IMPELLER_NONNULL paragraph_builder, float width)
| Layout and build a new paragraph using the specified width. The resulting paragraph is immutable. The paragraph builder must be discarded and a new one created to build more paragraphs. More...
IMPELLER_EXPORT void | ImpellerParagraphRetain (ImpellerParagraph IMPELLER_NULLABLE paragraph)
| Retain a strong reference to the object. The object can be NULL in which case this method is a no-op. More...
IMPELLER_EXPORT void | ImpellerParagraphRelease (ImpellerParagraph IMPELLER_NULLABLE paragraph)
| Release a previously retained reference to the object. The object can be NULL in which case this method is a no-op. More...
IMPELLER_EXPORT float | ImpellerParagraphGetMaxWidth (ImpellerParagraph IMPELLER_NONNULL paragraph)
IMPELLER_EXPORT float | ImpellerParagraphGetHeight (ImpellerParagraph IMPELLER_NONNULL paragraph)
IMPELLER_EXPORT float | ImpellerParagraphGetLongestLineWidth (ImpellerParagraph IMPELLER_NONNULL paragraph)
IMPELLER_EXPORT float | ImpellerParagraphGetMinIntrinsicWidth (ImpellerParagraph IMPELLER_NONNULL paragraph)
IMPELLER_EXPORT float | ImpellerParagraphGetMaxIntrinsicWidth (ImpellerParagraph IMPELLER_NONNULL paragraph)
IMPELLER_EXPORT float | ImpellerParagraphGetIdeographicBaseline (ImpellerParagraph IMPELLER_NONNULL paragraph)
IMPELLER_EXPORT float | ImpellerParagraphGetAlphabeticBaseline (ImpellerParagraph IMPELLER_NONNULL paragraph)
IMPELLER_EXPORT uint32_t | ImpellerParagraphGetLineCount (ImpellerParagraph IMPELLER_NONNULL paragraph)

## Macro Definition Documentation

## ◆ IMPELLER_DEFINE_HANDLE

#define IMPELLER_DEFINE_HANDLE | ( |  | handle | ) | typedef struct IMPELLER_INTERNAL_HANDLE_NAME(handle) * handle;

Definition at line 140 of file impeller.h.

## ◆ IMPELLER_EXPORT

#define IMPELLER_EXPORT IMPELLER_EXPORT_DECORATION

Definition at line 46 of file impeller.h.

## ◆ IMPELLER_EXPORT_DECORATION

#define IMPELLER_EXPORT_DECORATION __attribute__((visibility("default")))

Definition at line 42 of file impeller.h.

## ◆ IMPELLER_EXTERN_C

#define IMPELLER_EXTERN_C

## --------------------------------------------------------------------------—

----— ___ _ _ _ ____ ___ -----— ----— |_ _|_ __ ___ _ __ ___| | | ___ _ __ / \ | _ _ _| -----— ----— | || '_ ‘ _ | ’_ \ / _ \ | |/ _ \ '__| / _ \ | |_) | | -----— ----— | || | | | | | |_) | __/ | | __/ | / ___ | __/| | -----— ----— |___|_| |_| |_| .__/ ___|_|_|___|_| /_/ __| |___| -----—

## ----— |_| -----—

This file describes a high-level, single-header, dependency-free, 2D graphics API.

The API fundamentals that include details about the object model, reference counting, and null-safety are described in the README.

Definition at line 34 of file impeller.h.

## ◆ IMPELLER_EXTERN_C_BEGIN

#define IMPELLER_EXTERN_C_BEGIN

Definition at line 35 of file impeller.h.

## ◆ IMPELLER_EXTERN_C_END

#define IMPELLER_EXTERN_C_END

Definition at line 36 of file impeller.h.

## ◆ IMPELLER_INTERNAL_HANDLE_NAME

#define IMPELLER_INTERNAL_HANDLE_NAME | ( |  | handle | ) | handle##_

Definition at line 139 of file impeller.h.

## ◆ IMPELLER_MAKE_VERSION

#define IMPELLER_MAKE_VERSION | ( |  | variant,
|  |  | major,
|  |  | minor,
|  |  | patch
| ) |  |

Value:
((((uint32_t)(variant)) << 29U) | (((uint32_t)(major)) << 22U) | \
(((uint32_t)(minor)) << 12U) | ((uint32_t)(patch)))

Pack a version in a uint32_t.

Parameters

  [in] | variant | The version variant.
  [in] | major | The major version.
  [in] | minor | The minor version.
  [in] | patch | The patch version.

Returns
  The packed version number.

Definition at line 77 of file impeller.h.

## ◆ IMPELLER_NODISCARD

#define IMPELLER_NODISCARD

Definition at line 62 of file impeller.h.

## ◆ IMPELLER_NONNULL

#define IMPELLER_NONNULL

Definition at line 56 of file impeller.h.

## ◆ IMPELLER_NULLABLE

#define IMPELLER_NULLABLE

Definition at line 55 of file impeller.h.

## ◆ IMPELLER_VERSION

#define IMPELLER_VERSION

Value:
IMPELLER_MAKE_VERSION(IMPELLER_VERSION_VARIANT, IMPELLER_VERSION_MAJOR, \
IMPELLER_VERSION_MINOR, IMPELLER_VERSION_PATCH)
IMPELLER_VERSION_VARIANT
#define IMPELLER_VERSION_VARIANT
Definition: impeller.h:81
IMPELLER_MAKE_VERSION
#define IMPELLER_MAKE_VERSION(variant, major, minor, patch)
Pack a version in a uint32_t.
Definition: impeller.h:77
IMPELLER_VERSION_PATCH
#define IMPELLER_VERSION_PATCH
Definition: impeller.h:84
IMPELLER_VERSION_MINOR
#define IMPELLER_VERSION_MINOR
Definition: impeller.h:83
IMPELLER_VERSION_MAJOR
#define IMPELLER_VERSION_MAJOR
Definition: impeller.h:82

The current Impeller API version.

This version must be passed to APIs that create top-level objects like graphics contexts. Construction of the context may fail if the API version expected by the caller is not supported by the library.

The version currently supported by the library is returned by a call to `ImpellerGetVersion`

Since there are no API stability guarantees today, passing a version that is different to the one returned by `ImpellerGetVersion` will always fail.

See also
  `ImpellerGetVersion`

Definition at line 101 of file impeller.h.

## ◆ IMPELLER_VERSION_GET_MAJOR

#define IMPELLER_VERSION_GET_MAJOR | ( |  | version | ) | (((uint32_t)(version) >> 22U) & 0x7FU)

Parameters

  [in] | version | The packed version.

Returns
  The major version.

Definition at line 117 of file impeller.h.

## ◆ IMPELLER_VERSION_GET_MINOR

#define IMPELLER_VERSION_GET_MINOR | ( |  | version | ) | (((uint32_t)(version) >> 12U) & 0x3FFU)

Parameters

  [in] | version | The packed version.

Returns
  The minor version.

Definition at line 125 of file impeller.h.

## ◆ IMPELLER_VERSION_GET_PATCH

#define IMPELLER_VERSION_GET_PATCH | ( |  | version | ) | ((uint32_t)(version) & 0xFFFU)

Parameters

  [in] | version | The packed version.

Returns
  The patch version.

Definition at line 133 of file impeller.h.

## ◆ IMPELLER_VERSION_GET_VARIANT

#define IMPELLER_VERSION_GET_VARIANT | ( |  | version | ) | ((uint32_t)(version) >> 29U)

Parameters

  [in] | version | The packed version.

Returns
  The version variant.

Definition at line 110 of file impeller.h.

## ◆ IMPELLER_VERSION_MAJOR

#define IMPELLER_VERSION_MAJOR 1

Definition at line 82 of file impeller.h.

## ◆ IMPELLER_VERSION_MINOR

#define IMPELLER_VERSION_MINOR 2

Definition at line 83 of file impeller.h.

## ◆ IMPELLER_VERSION_PATCH

#define IMPELLER_VERSION_PATCH 0

Definition at line 84 of file impeller.h.

## ◆ IMPELLER_VERSION_VARIANT

#define IMPELLER_VERSION_VARIANT 1

Definition at line 81 of file impeller.h.

## Typedef Documentation

## ◆ ImpellerBlendMode

typedef enum ImpellerBlendMode ImpellerBlendMode

## ◆ ImpellerBlurStyle

typedef enum ImpellerBlurStyle ImpellerBlurStyle

## ◆ ImpellerCallback

typedef void(* ImpellerCallback) (void *IMPELLER_NULLABLE user_data)

A callback invoked by Impeller that passes a user supplied baton back to the user. Impeller does not interpret the baton in any way. The way the baton is specified and the thread on which the callback is invoked depends on how the user supplies the callback to Impeller.

Definition at line 301 of file impeller.h.

## ◆ ImpellerClipOperation

typedef enum ImpellerClipOperation ImpellerClipOperation

## ◆ ImpellerColor

typedef struct ImpellerColor ImpellerColor

## ◆ ImpellerColorMatrix

typedef struct ImpellerColorMatrix ImpellerColorMatrix

A 4x5 matrix using row-major storage used for transforming color values.

To transform color values, a 5x5 matrix is constructed with the 5th row being identity. Then the following transformation is performed:

| R' | | m[0] m[1] m[2] m[3] m[4] | | R |
| G' | | m[5] m[6] m[7] m[8] m[9] | | G |
| B' | = | m[10] m[11] m[12] m[13] m[14] | * | B |
| A' | | m[15] m[16] m[17] m[18] m[19] | | A |
| 1 | | 0 0 0 0 1 | | 1 |

The translation column (m[4], m[9], m[14], m[19]) must be specified in non-normalized 8-bit unsigned integer space (0 to 255). Values outside this range will produce undefined results.

The identity transformation is thus:

1, 0, 0, 0, 0,
0, 1, 0, 0, 0,
0, 0, 1, 0, 0,
0, 0, 0, 1, 0,

Some examples:

To invert all colors:

-1, 0, 0, 0, 255,
0, -1, 0, 0, 255,
0, 0, -1, 0, 255,
0, 0, 0, 1, 0,

To apply a sepia filter:

0.393, 0.769, 0.189, 0, 0,
0.349, 0.686, 0.168, 0, 0,
0.272, 0.534, 0.131, 0, 0,
0, 0, 0, 1, 0,

To apply a grayscale conversion filter:

0.2126, 0.7152, 0.0722, 0, 0,
0.2126, 0.7152, 0.0722, 0, 0,
0.2126, 0.7152, 0.0722, 0, 0,
0, 0, 0, 1, 0,

See also
  ImpellerColorFilter

## ◆ ImpellerColorSpace

typedef enum ImpellerColorSpace ImpellerColorSpace

## ◆ ImpellerDrawStyle

typedef enum ImpellerDrawStyle ImpellerDrawStyle

## ◆ ImpellerFillType

typedef enum ImpellerFillType ImpellerFillType

## ◆ ImpellerFontStyle

typedef enum ImpellerFontStyle ImpellerFontStyle

## ◆ ImpellerFontWeight

typedef enum ImpellerFontWeight ImpellerFontWeight

## ◆ ImpellerISize

typedef struct ImpellerISize ImpellerISize

## ◆ ImpellerMapping

typedef struct ImpellerMapping ImpellerMapping

## ◆ ImpellerMatrix

typedef struct ImpellerMatrix ImpellerMatrix

A 4x4 transformation matrix using column-major storage.

| m[0] m[4] m[8] m[12] |
| m[1] m[5] m[9] m[13] |
| m[2] m[6] m[10] m[14] |
| m[3] m[7] m[11] m[15] |

## ◆ ImpellerPixelFormat

typedef enum ImpellerPixelFormat ImpellerPixelFormat

## ◆ ImpellerPoint

typedef struct ImpellerPoint ImpellerPoint

## ◆ ImpellerProcAddressCallback

typedef void* IMPELLER_NULLABLE(* ImpellerProcAddressCallback) (const char *IMPELLER_NONNULL proc_name, void *IMPELLER_NULLABLE user_data)

A callback used by Impeller to allow the user to resolve function pointers. A user supplied baton that is uninterpreted by Impeller is passed back to the user in the callback. How the baton is specified to Impeller and the thread on which the callback is invoked depends on how the callback is specified to Impeller.

Definition at line 310 of file impeller.h.

## ◆ ImpellerRect

typedef struct ImpellerRect ImpellerRect

## ◆ ImpellerRoundingRadii

typedef struct ImpellerRoundingRadii ImpellerRoundingRadii

## ◆ ImpellerSize

typedef struct ImpellerSize ImpellerSize

## ◆ ImpellerStrokeCap

typedef enum ImpellerStrokeCap ImpellerStrokeCap

## ◆ ImpellerStrokeJoin

typedef enum ImpellerStrokeJoin ImpellerStrokeJoin

## ◆ ImpellerTextAlignment

typedef enum ImpellerTextAlignment ImpellerTextAlignment

## ◆ ImpellerTextDirection

typedef enum ImpellerTextDirection ImpellerTextDirection

## ◆ ImpellerTextureDescriptor

typedef struct ImpellerTextureDescriptor ImpellerTextureDescriptor

## ◆ ImpellerTextureSampling

typedef enum ImpellerTextureSampling ImpellerTextureSampling

## ◆ ImpellerTileMode

typedef enum ImpellerTileMode ImpellerTileMode

## Enumeration Type Documentation

## ◆ ImpellerBlendMode

enum ImpellerBlendMode

Enumerator
kImpellerBlendModeClear |
kImpellerBlendModeSource |
kImpellerBlendModeDestination |
kImpellerBlendModeSourceOver |
kImpellerBlendModeDestinationOver |
kImpellerBlendModeSourceIn |
kImpellerBlendModeDestinationIn |
kImpellerBlendModeSourceOut |
kImpellerBlendModeDestinationOut |
kImpellerBlendModeSourceATop |
kImpellerBlendModeDestinationATop |
kImpellerBlendModeXor |
kImpellerBlendModePlus |
kImpellerBlendModeModulate |
kImpellerBlendModeScreen |
kImpellerBlendModeOverlay |
kImpellerBlendModeDarken |
kImpellerBlendModeLighten |
kImpellerBlendModeColorDodge |
kImpellerBlendModeColorBurn |
kImpellerBlendModeHardLight |
kImpellerBlendModeSoftLight |
kImpellerBlendModeDifference |
kImpellerBlendModeExclusion |
kImpellerBlendModeMultiply |
kImpellerBlendModeHue |
kImpellerBlendModeSaturation |
kImpellerBlendModeColor |
kImpellerBlendModeLuminosity |

Definition at line 327 of file impeller.h.

327 {
328 kImpellerBlendModeClear,
329 kImpellerBlendModeSource,
330 kImpellerBlendModeDestination,
331 kImpellerBlendModeSourceOver,
332 kImpellerBlendModeDestinationOver,
333 kImpellerBlendModeSourceIn,
334 kImpellerBlendModeDestinationIn,
335 kImpellerBlendModeSourceOut,
336 kImpellerBlendModeDestinationOut,
337 kImpellerBlendModeSourceATop,
338 kImpellerBlendModeDestinationATop,
339 kImpellerBlendModeXor,
340 kImpellerBlendModePlus,
341 kImpellerBlendModeModulate,
342 kImpellerBlendModeScreen,
343 kImpellerBlendModeOverlay,
344 kImpellerBlendModeDarken,
345 kImpellerBlendModeLighten,
346 kImpellerBlendModeColorDodge,
347 kImpellerBlendModeColorBurn,
348 kImpellerBlendModeHardLight,
349 kImpellerBlendModeSoftLight,
350 kImpellerBlendModeDifference,
351 kImpellerBlendModeExclusion,
352 kImpellerBlendModeMultiply,
353 kImpellerBlendModeHue,
354 kImpellerBlendModeSaturation,
355 kImpellerBlendModeColor,
356 kImpellerBlendModeLuminosity,
357 } ImpellerBlendMode;
ImpellerBlendMode
ImpellerBlendMode
Definition: impeller.h:327
kImpellerBlendModeSaturation
@ kImpellerBlendModeSaturation
Definition: impeller.h:354
kImpellerBlendModeSoftLight
@ kImpellerBlendModeSoftLight
Definition: impeller.h:349
kImpellerBlendModeHardLight
@ kImpellerBlendModeHardLight
Definition: impeller.h:348
kImpellerBlendModeLuminosity
@ kImpellerBlendModeLuminosity
Definition: impeller.h:356
kImpellerBlendModeLighten
@ kImpellerBlendModeLighten
Definition: impeller.h:345
kImpellerBlendModeModulate
@ kImpellerBlendModeModulate
Definition: impeller.h:341
kImpellerBlendModeSourceIn
@ kImpellerBlendModeSourceIn
Definition: impeller.h:333
kImpellerBlendModeDifference
@ kImpellerBlendModeDifference
Definition: impeller.h:350
kImpellerBlendModeClear
@ kImpellerBlendModeClear
Definition: impeller.h:328
kImpellerBlendModeColor
@ kImpellerBlendModeColor
Definition: impeller.h:355
kImpellerBlendModeMultiply
@ kImpellerBlendModeMultiply
Definition: impeller.h:352
kImpellerBlendModeSourceATop
@ kImpellerBlendModeSourceATop
Definition: impeller.h:337
kImpellerBlendModeDestinationOut
@ kImpellerBlendModeDestinationOut
Definition: impeller.h:336
kImpellerBlendModeScreen
@ kImpellerBlendModeScreen
Definition: impeller.h:342
kImpellerBlendModeExclusion
@ kImpellerBlendModeExclusion
Definition: impeller.h:351
kImpellerBlendModeColorBurn
@ kImpellerBlendModeColorBurn
Definition: impeller.h:347
kImpellerBlendModeDarken
@ kImpellerBlendModeDarken
Definition: impeller.h:344
kImpellerBlendModePlus
@ kImpellerBlendModePlus
Definition: impeller.h:340
kImpellerBlendModeOverlay
@ kImpellerBlendModeOverlay
Definition: impeller.h:343
kImpellerBlendModeDestinationIn
@ kImpellerBlendModeDestinationIn
Definition: impeller.h:334
kImpellerBlendModeDestinationATop
@ kImpellerBlendModeDestinationATop
Definition: impeller.h:338
kImpellerBlendModeDestination
@ kImpellerBlendModeDestination
Definition: impeller.h:330
kImpellerBlendModeSourceOver
@ kImpellerBlendModeSourceOver
Definition: impeller.h:331
kImpellerBlendModeXor
@ kImpellerBlendModeXor
Definition: impeller.h:339
kImpellerBlendModeColorDodge
@ kImpellerBlendModeColorDodge
Definition: impeller.h:346
kImpellerBlendModeDestinationOver
@ kImpellerBlendModeDestinationOver
Definition: impeller.h:332
kImpellerBlendModeSource
@ kImpellerBlendModeSource
Definition: impeller.h:329
kImpellerBlendModeSourceOut
@ kImpellerBlendModeSourceOut
Definition: impeller.h:335
kImpellerBlendModeHue
@ kImpellerBlendModeHue
Definition: impeller.h:353

## ◆ ImpellerBlurStyle

enum ImpellerBlurStyle

Enumerator
kImpellerBlurStyleNormal |
kImpellerBlurStyleSolid |
kImpellerBlurStyleOuter |
kImpellerBlurStyleInner |

Definition at line 393 of file impeller.h.

393 {
394 kImpellerBlurStyleNormal,
395 kImpellerBlurStyleSolid,
396 kImpellerBlurStyleOuter,
397 kImpellerBlurStyleInner,
398 } ImpellerBlurStyle;
ImpellerBlurStyle
ImpellerBlurStyle
Definition: impeller.h:393
kImpellerBlurStyleNormal
@ kImpellerBlurStyleNormal
Definition: impeller.h:394
kImpellerBlurStyleOuter
@ kImpellerBlurStyleOuter
Definition: impeller.h:396
kImpellerBlurStyleInner
@ kImpellerBlurStyleInner
Definition: impeller.h:397
kImpellerBlurStyleSolid
@ kImpellerBlurStyleSolid
Definition: impeller.h:395

## ◆ ImpellerClipOperation

enum ImpellerClipOperation

Enumerator
kImpellerClipOperationDifference |
kImpellerClipOperationIntersect |

Definition at line 322 of file impeller.h.

322 {
323 kImpellerClipOperationDifference,
324 kImpellerClipOperationIntersect,
325 } ImpellerClipOperation;
ImpellerClipOperation
ImpellerClipOperation
Definition: impeller.h:322
kImpellerClipOperationIntersect
@ kImpellerClipOperationIntersect
Definition: impeller.h:324
kImpellerClipOperationDifference
@ kImpellerClipOperationDifference
Definition: impeller.h:323

## ◆ ImpellerColorSpace

enum ImpellerColorSpace

Enumerator
kImpellerColorSpaceSRGB |
kImpellerColorSpaceExtendedSRGB |
kImpellerColorSpaceDisplayP3 |

Definition at line 400 of file impeller.h.

400 {
401 kImpellerColorSpaceSRGB,
402 kImpellerColorSpaceExtendedSRGB,
403 kImpellerColorSpaceDisplayP3,
404 } ImpellerColorSpace;
ImpellerColorSpace
ImpellerColorSpace
Definition: impeller.h:400
kImpellerColorSpaceExtendedSRGB
@ kImpellerColorSpaceExtendedSRGB
Definition: impeller.h:402
kImpellerColorSpaceSRGB
@ kImpellerColorSpaceSRGB
Definition: impeller.h:401
kImpellerColorSpaceDisplayP3
@ kImpellerColorSpaceDisplayP3
Definition: impeller.h:403

## ◆ ImpellerDrawStyle

enum ImpellerDrawStyle

Enumerator
kImpellerDrawStyleFill |
kImpellerDrawStyleStroke |
kImpellerDrawStyleStrokeAndFill |

Definition at line 359 of file impeller.h.

359 {
360 kImpellerDrawStyleFill,
361 kImpellerDrawStyleStroke,
362 kImpellerDrawStyleStrokeAndFill,
363 } ImpellerDrawStyle;
ImpellerDrawStyle
ImpellerDrawStyle
Definition: impeller.h:359
kImpellerDrawStyleStroke
@ kImpellerDrawStyleStroke
Definition: impeller.h:361
kImpellerDrawStyleFill
@ kImpellerDrawStyleFill
Definition: impeller.h:360
kImpellerDrawStyleStrokeAndFill
@ kImpellerDrawStyleStrokeAndFill
Definition: impeller.h:362

## ◆ ImpellerFillType

enum ImpellerFillType

Enumerator
kImpellerFillTypeNonZero |
kImpellerFillTypeOdd |

Definition at line 317 of file impeller.h.

317 {
318 kImpellerFillTypeNonZero,
319 kImpellerFillTypeOdd,
320 } ImpellerFillType;
ImpellerFillType
ImpellerFillType
Definition: impeller.h:317
kImpellerFillTypeOdd
@ kImpellerFillTypeOdd
Definition: impeller.h:319
kImpellerFillTypeNonZero
@ kImpellerFillTypeNonZero
Definition: impeller.h:318

## ◆ ImpellerFontStyle

enum ImpellerFontStyle

Enumerator
kImpellerFontStyleNormal |
kImpellerFontStyleItalic |

Definition at line 418 of file impeller.h.

418 {
419 kImpellerFontStyleNormal,
420 kImpellerFontStyleItalic,
421 } ImpellerFontStyle;
ImpellerFontStyle
ImpellerFontStyle
Definition: impeller.h:418
kImpellerFontStyleItalic
@ kImpellerFontStyleItalic
Definition: impeller.h:420
kImpellerFontStyleNormal
@ kImpellerFontStyleNormal
Definition: impeller.h:419

## ◆ ImpellerFontWeight

enum ImpellerFontWeight

Enumerator
kImpellerFontWeight100 |
kImpellerFontWeight200 |
kImpellerFontWeight300 |
kImpellerFontWeight400 |
kImpellerFontWeight500 |
kImpellerFontWeight600 |
kImpellerFontWeight700 |
kImpellerFontWeight800 |
kImpellerFontWeight900 |

Definition at line 406 of file impeller.h.

406 {
407 kImpellerFontWeight100, // Thin
408 kImpellerFontWeight200, // Extra-Light
409 kImpellerFontWeight300, // Light
410 kImpellerFontWeight400, // Normal/Regular
411 kImpellerFontWeight500, // Medium
412 kImpellerFontWeight600, // Semi-bold
413 kImpellerFontWeight700, // Bold
414 kImpellerFontWeight800, // Extra-Bold
415 kImpellerFontWeight900, // Black
416 } ImpellerFontWeight;
ImpellerFontWeight
ImpellerFontWeight
Definition: impeller.h:406
kImpellerFontWeight400
@ kImpellerFontWeight400
Definition: impeller.h:410
kImpellerFontWeight500
@ kImpellerFontWeight500
Definition: impeller.h:411
kImpellerFontWeight700
@ kImpellerFontWeight700
Definition: impeller.h:413
kImpellerFontWeight200
@ kImpellerFontWeight200
Definition: impeller.h:408
kImpellerFontWeight300
@ kImpellerFontWeight300
Definition: impeller.h:409
kImpellerFontWeight900
@ kImpellerFontWeight900
Definition: impeller.h:415
kImpellerFontWeight800
@ kImpellerFontWeight800
Definition: impeller.h:414
kImpellerFontWeight600
@ kImpellerFontWeight600
Definition: impeller.h:412
kImpellerFontWeight100
@ kImpellerFontWeight100
Definition: impeller.h:407

## ◆ ImpellerPixelFormat

enum ImpellerPixelFormat

Enumerator
kImpellerPixelFormatRGBA8888 |

Definition at line 377 of file impeller.h.

377 {
378 kImpellerPixelFormatRGBA8888,
379 } ImpellerPixelFormat;
ImpellerPixelFormat
ImpellerPixelFormat
Definition: impeller.h:377
kImpellerPixelFormatRGBA8888
@ kImpellerPixelFormatRGBA8888
Definition: impeller.h:378

## ◆ ImpellerStrokeCap

enum ImpellerStrokeCap

Enumerator
kImpellerStrokeCapButt |
kImpellerStrokeCapRound |
kImpellerStrokeCapSquare |

Definition at line 365 of file impeller.h.

365 {
366 kImpellerStrokeCapButt,
367 kImpellerStrokeCapRound,
368 kImpellerStrokeCapSquare,
369 } ImpellerStrokeCap;
ImpellerStrokeCap
ImpellerStrokeCap
Definition: impeller.h:365
kImpellerStrokeCapButt
@ kImpellerStrokeCapButt
Definition: impeller.h:366
kImpellerStrokeCapRound
@ kImpellerStrokeCapRound
Definition: impeller.h:367
kImpellerStrokeCapSquare
@ kImpellerStrokeCapSquare
Definition: impeller.h:368

## ◆ ImpellerStrokeJoin

enum ImpellerStrokeJoin

Enumerator
kImpellerStrokeJoinMiter |
kImpellerStrokeJoinRound |
kImpellerStrokeJoinBevel |

Definition at line 371 of file impeller.h.

371 {
372 kImpellerStrokeJoinMiter,
373 kImpellerStrokeJoinRound,
374 kImpellerStrokeJoinBevel,
375 } ImpellerStrokeJoin;
ImpellerStrokeJoin
ImpellerStrokeJoin
Definition: impeller.h:371
kImpellerStrokeJoinRound
@ kImpellerStrokeJoinRound
Definition: impeller.h:373
kImpellerStrokeJoinBevel
@ kImpellerStrokeJoinBevel
Definition: impeller.h:374
kImpellerStrokeJoinMiter
@ kImpellerStrokeJoinMiter
Definition: impeller.h:372

## ◆ ImpellerTextAlignment

enum ImpellerTextAlignment

Enumerator
kImpellerTextAlignmentLeft |
kImpellerTextAlignmentRight |
kImpellerTextAlignmentCenter |
kImpellerTextAlignmentJustify |
kImpellerTextAlignmentStart |
kImpellerTextAlignmentEnd |

Definition at line 423 of file impeller.h.

423 {
424 kImpellerTextAlignmentLeft,
425 kImpellerTextAlignmentRight,
426 kImpellerTextAlignmentCenter,
427 kImpellerTextAlignmentJustify,
428 kImpellerTextAlignmentStart,
429 kImpellerTextAlignmentEnd,
430 } ImpellerTextAlignment;
ImpellerTextAlignment
ImpellerTextAlignment
Definition: impeller.h:423
kImpellerTextAlignmentJustify
@ kImpellerTextAlignmentJustify
Definition: impeller.h:427
kImpellerTextAlignmentLeft
@ kImpellerTextAlignmentLeft
Definition: impeller.h:424
kImpellerTextAlignmentCenter
@ kImpellerTextAlignmentCenter
Definition: impeller.h:426
kImpellerTextAlignmentRight
@ kImpellerTextAlignmentRight
Definition: impeller.h:425
kImpellerTextAlignmentStart
@ kImpellerTextAlignmentStart
Definition: impeller.h:428
kImpellerTextAlignmentEnd
@ kImpellerTextAlignmentEnd
Definition: impeller.h:429

## ◆ ImpellerTextDirection

enum ImpellerTextDirection

Enumerator
kImpellerTextDirectionRTL |
kImpellerTextDirectionLTR |

Definition at line 432 of file impeller.h.

432 {
433 kImpellerTextDirectionRTL,
434 kImpellerTextDirectionLTR,
435 } ImpellerTextDirection;
ImpellerTextDirection
ImpellerTextDirection
Definition: impeller.h:432
kImpellerTextDirectionLTR
@ kImpellerTextDirectionLTR
Definition: impeller.h:434
kImpellerTextDirectionRTL
@ kImpellerTextDirectionRTL
Definition: impeller.h:433

## ◆ ImpellerTextureSampling

enum ImpellerTextureSampling

Enumerator
kImpellerTextureSamplingNearestNeighbor |
kImpellerTextureSamplingLinear |

Definition at line 381 of file impeller.h.

381 {
382 kImpellerTextureSamplingNearestNeighbor,
383 kImpellerTextureSamplingLinear,
384 } ImpellerTextureSampling;
ImpellerTextureSampling
ImpellerTextureSampling
Definition: impeller.h:381
kImpellerTextureSamplingNearestNeighbor
@ kImpellerTextureSamplingNearestNeighbor
Definition: impeller.h:382
kImpellerTextureSamplingLinear
@ kImpellerTextureSamplingLinear
Definition: impeller.h:383

## ◆ ImpellerTileMode

enum ImpellerTileMode

Enumerator
kImpellerTileModeClamp |
kImpellerTileModeRepeat |
kImpellerTileModeMirror |
kImpellerTileModeDecal |

Definition at line 386 of file impeller.h.

386 {
387 kImpellerTileModeClamp,
388 kImpellerTileModeRepeat,
389 kImpellerTileModeMirror,
390 kImpellerTileModeDecal,
391 } ImpellerTileMode;
ImpellerTileMode
ImpellerTileMode
Definition: impeller.h:386
kImpellerTileModeMirror
@ kImpellerTileModeMirror
Definition: impeller.h:389
kImpellerTileModeClamp
@ kImpellerTileModeClamp
Definition: impeller.h:387
kImpellerTileModeRepeat
@ kImpellerTileModeRepeat
Definition: impeller.h:388
kImpellerTileModeDecal
@ kImpellerTileModeDecal
Definition: impeller.h:390

## Function Documentation

## ◆ IMPELLER_DEFINE_HANDLE() [1/16]

IMPELLER_DEFINE_HANDLE | ( | ImpellerColorFilter |  | ) |

Color filters are functions that take two colors and mix them to produce a single color. This color is then merged with the destination during blending.

## ◆ IMPELLER_DEFINE_HANDLE() [2/16]

IMPELLER_DEFINE_HANDLE | ( | ImpellerColorSource |  | ) |

Color sources are functions that generate colors for each texture element covered by a draw call. The colors for each element can be generated using a mathematical function (to produce gradients for example) or sampled from a texture.

## ◆ IMPELLER_DEFINE_HANDLE() [3/16]

IMPELLER_DEFINE_HANDLE | ( | ImpellerContext |  | ) |

An Impeller graphics context. Contexts are platform and client-rendering-API specific.

Contexts are thread-safe objects that are expensive to create. Most applications will only ever create a single context during their lifetimes. Once setup, Impeller is ready to render frames as performantly as possible.

During setup, context create the underlying graphics pipelines, allocators, worker threads, etc...

The general guidance is to create as few contexts as possible (typically just one) and share them as much as possible.

## ◆ IMPELLER_DEFINE_HANDLE() [4/16]

IMPELLER_DEFINE_HANDLE | ( | ImpellerDisplayList |  | ) |

Display lists represent encoded rendering intent. These objects are immutable, reusable, thread-safe, and context-agnostic.

While it is perfectly fine to create new display lists per frame, there may be opportunities for optimization when display lists are reused multiple times.

## ◆ IMPELLER_DEFINE_HANDLE() [5/16]

IMPELLER_DEFINE_HANDLE | ( | ImpellerDisplayListBuilder |  | ) |

Display list builders allow for the incremental creation of display lists.

Display list builders are context-agnostic.

## ◆ IMPELLER_DEFINE_HANDLE() [6/16]

IMPELLER_DEFINE_HANDLE | ( | ImpellerImageFilter |  | ) |

Image filters are functions that are applied regions of a texture to produce a single color. Contrast this with color filters that operate independently on a per-pixel basis. The generated color is then merged with the destination during blending.

## ◆ IMPELLER_DEFINE_HANDLE() [7/16]

IMPELLER_DEFINE_HANDLE | ( | ImpellerMaskFilter |  | ) |

Mask filters are functions that are applied over a shape after it has been drawn but before it has been blended into the final image.

## ◆ IMPELLER_DEFINE_HANDLE() [8/16]

IMPELLER_DEFINE_HANDLE | ( | ImpellerPaint |  | ) |

Paints control the behavior of draw calls encoded in a display list.

Like display lists, paints are context-agnostic.

## ◆ IMPELLER_DEFINE_HANDLE() [9/16]

IMPELLER_DEFINE_HANDLE | ( | ImpellerParagraph |  | ) |

An immutable, fully laid out paragraph.

## ◆ IMPELLER_DEFINE_HANDLE() [10/16]

IMPELLER_DEFINE_HANDLE | ( | ImpellerParagraphBuilder |  | ) |

Paragraph builders allow for the creation of fully laid out paragraphs (which themselves are immutable).

To build a paragraph, users push/pop paragraph styles onto a stack then add UTF-8 encoded text. The properties on the top of paragraph style stack when the text is added are used to layout and shape that subset of the paragraph.

See also
  `ImpellerParagraphStyle`

## ◆ IMPELLER_DEFINE_HANDLE() [11/16]

IMPELLER_DEFINE_HANDLE | ( | ImpellerParagraphStyle |  | ) |

Specified when building a paragraph, paragraph styles are managed in a stack with specify text properties to apply to text that is added to the paragraph builder.

## ◆ IMPELLER_DEFINE_HANDLE() [12/16]

IMPELLER_DEFINE_HANDLE | ( | ImpellerPath |  | ) |

Represents a two-dimensional path that is immutable and graphics context agnostic.

Paths in Impeller consist of linear, cubic Bézier curve, and quadratic Bézier curve segments. All other shapes are approximations using these building blocks.

Paths are created using path builder that allow for the configuration of the path segments, how they are filled, and/or stroked.

## ◆ IMPELLER_DEFINE_HANDLE() [13/16]

IMPELLER_DEFINE_HANDLE | ( | ImpellerPathBuilder |  | ) |

Path builders allow for the incremental building up of paths.

## ◆ IMPELLER_DEFINE_HANDLE() [14/16]

IMPELLER_DEFINE_HANDLE | ( | ImpellerSurface |  | ) |

A surface represents a render target for Impeller to direct the rendering intent specified the form of display lists to.

Render targets are how Impeller API users perform Window System Integration (WSI). Users wrap swapchain images as surfaces and draw display lists onto these surfaces to present content.

Creating surfaces is typically platform and client-rendering-API specific.

## ◆ IMPELLER_DEFINE_HANDLE() [15/16]

IMPELLER_DEFINE_HANDLE | ( | ImpellerTexture |  | ) |

A reference to a texture whose data is resident on the GPU. These can be referenced in draw calls and paints.

Creating textures is extremely expensive. Creating a single one can typically comfortably blow the frame budget of an application. Textures should be created on background threads.

Warning
  While textures themselves are thread safe, some context types (like OpenGL) may need extra configuration to be able to operate from multiple threads.

## ◆ IMPELLER_DEFINE_HANDLE() [16/16]

IMPELLER_DEFINE_HANDLE | ( | ImpellerTypographyContext |  | ) |

Typography contexts allow for the layout and rendering of text.

These are typically expensive to create and applications will only ever need to create a single one of these during their lifetimes.

Unlike graphics context, typograhy contexts are not thread-safe. These must be created, used, and collected on a single thread.

## ◆ ImpellerColorFilterCreateBlendNew()

IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerColorFilter IMPELLER_NULLABLE ImpellerColorFilterCreateBlendNew | ( | const ImpellerColor *IMPELLER_NONNULL | color,
|  | ImpellerBlendMode | blend_mode
| ) |  |

Create a color filter that performs blending of pixel values independently.

Parameters

  [in] | color | The color.
  [in] | blend_mode | The blend mode.

Returns
  The color filter.

## ◆ ImpellerColorFilterCreateColorMatrixNew()

IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerColorFilter IMPELLER_NULLABLE ImpellerColorFilterCreateColorMatrixNew | ( | const ImpellerColorMatrix *IMPELLER_NONNULL | color_matrix | ) |

Create a color filter that transforms pixel color values independently.

Parameters

  [in] | color_matrix | The color matrix.

Returns
  The color filter.

## ◆ ImpellerColorFilterRelease()

IMPELLER_EXPORT void ImpellerColorFilterRelease | ( | ImpellerColorFilter IMPELLER_NULLABLE | color_filter | ) |

Release a previously retained reference to the object. The object can be NULL in which case this method is a no-op.

Parameters

  [in] | color_filter | The color filter.

## ◆ ImpellerColorFilterRetain()

IMPELLER_EXPORT void ImpellerColorFilterRetain | ( | ImpellerColorFilter IMPELLER_NULLABLE | color_filter | ) |

Retain a strong reference to the object. The object can be NULL in which case this method is a no-op.

Parameters

  [in] | color_filter | The color filter.

## ◆ ImpellerColorSourceCreateConicalGradientNew()

IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerColorSource IMPELLER_NULLABLE ImpellerColorSourceCreateConicalGradientNew | ( | const ImpellerPoint *IMPELLER_NONNULL | start_center,
|  | float | start_radius,
|  | const ImpellerPoint *IMPELLER_NONNULL | end_center,
|  | float | end_radius,
|  | uint32_t | stop_count,
|  | const ImpellerColor *IMPELLER_NONNULL | colors,
|  | const float *IMPELLER_NONNULL | stops,
|  | ImpellerTileMode | tile_mode,
|  | const ImpellerMatrix *IMPELLER_NULLABLE | transformation
| ) |  |

Create a color source that forms a conical gradient.

Parameters

  [in] | start_center | The start center.
  [in] | start_radius | The start radius.
  [in] | end_center | The end center.
  [in] | end_radius | The end radius.
  [in] | stop_count | The stop count.
  [in] | colors | The colors.
  [in] | stops | The stops.
  [in] | tile_mode | The tile mode.
  [in] | transformation | The transformation.

Returns
  The color source.

## ◆ ImpellerColorSourceCreateImageNew()

IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerColorSource IMPELLER_NULLABLE ImpellerColorSourceCreateImageNew | ( | ImpellerTexture IMPELLER_NONNULL | image,
|  | ImpellerTileMode | horizontal_tile_mode,
|  | ImpellerTileMode | vertical_tile_mode,
|  | ImpellerTextureSampling | sampling,
|  | const ImpellerMatrix *IMPELLER_NULLABLE | transformation
| ) |  |

Create a color source that samples from an image.

Parameters

  [in] | image | The image.
  [in] | horizontal_tile_mode | The horizontal tile mode.
  [in] | vertical_tile_mode | The vertical tile mode.
  [in] | sampling | The sampling.
  [in] | transformation | The transformation.

Returns
  The color source.

## ◆ ImpellerColorSourceCreateLinearGradientNew()

IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerColorSource IMPELLER_NULLABLE ImpellerColorSourceCreateLinearGradientNew | ( | const ImpellerPoint *IMPELLER_NONNULL | start_point,
|  | const ImpellerPoint *IMPELLER_NONNULL | end_point,
|  | uint32_t | stop_count,
|  | const ImpellerColor *IMPELLER_NONNULL | colors,
|  | const float *IMPELLER_NONNULL | stops,
|  | ImpellerTileMode | tile_mode,
|  | const ImpellerMatrix *IMPELLER_NULLABLE | transformation
| ) |  |

Create a color source that forms a linear gradient.

Parameters

  [in] | start_point | The start point.
  [in] | end_point | The end point.
  [in] | stop_count | The stop count.
  [in] | colors | The colors.
  [in] | stops | The stops.
  [in] | tile_mode | The tile mode.
  [in] | transformation | The transformation.

Returns
  The color source.

## ◆ ImpellerColorSourceCreateRadialGradientNew()

IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerColorSource IMPELLER_NULLABLE ImpellerColorSourceCreateRadialGradientNew | ( | const ImpellerPoint *IMPELLER_NONNULL | center,
|  | float | radius,
|  | uint32_t | stop_count,
|  | const ImpellerColor *IMPELLER_NONNULL | colors,
|  | const float *IMPELLER_NONNULL | stops,
|  | ImpellerTileMode | tile_mode,
|  | const ImpellerMatrix *IMPELLER_NULLABLE | transformation
| ) |  |

Create a color source that forms a radial gradient.

Parameters

  [in] | center | The center.
  [in] | radius | The radius.
  [in] | stop_count | The stop count.
  [in] | colors | The colors.
  [in] | stops | The stops.
  [in] | tile_mode | The tile mode.
  [in] | transformation | The transformation.

Returns
  The color source.

## ◆ ImpellerColorSourceCreateSweepGradientNew()

IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerColorSource IMPELLER_NULLABLE ImpellerColorSourceCreateSweepGradientNew | ( | const ImpellerPoint *IMPELLER_NONNULL | center,
|  | float | start,
|  | float | end,
|  | uint32_t | stop_count,
|  | const ImpellerColor *IMPELLER_NONNULL | colors,
|  | const float *IMPELLER_NONNULL | stops,
|  | ImpellerTileMode | tile_mode,
|  | const ImpellerMatrix *IMPELLER_NULLABLE | transformation
| ) |  |

Create a color source that forms a sweep gradient.

Parameters

  [in] | center | The center.
  [in] | start | The start.
  [in] | end | The end.
  [in] | stop_count | The stop count.
  [in] | colors | The colors.
  [in] | stops | The stops.
  [in] | tile_mode | The tile mode.
  [in] | transformation | The transformation.

Returns
  The color source.

## ◆ ImpellerColorSourceRelease()

IMPELLER_EXPORT void ImpellerColorSourceRelease | ( | ImpellerColorSource IMPELLER_NULLABLE | color_source | ) |

Release a previously retained reference to the object. The object can be NULL in which case this method is a no-op.

Parameters

  [in] | color_source | The color source.

## ◆ ImpellerColorSourceRetain()

IMPELLER_EXPORT void ImpellerColorSourceRetain | ( | ImpellerColorSource IMPELLER_NULLABLE | color_source | ) |

Retain a strong reference to the object. The object can be NULL in which case this method is a no-op.

Parameters

  [in] | color_source | The color source.

## ◆ ImpellerContextCreateOpenGLESNew()

IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerContext IMPELLER_NULLABLE ImpellerContextCreateOpenGLESNew | ( | uint32_t | version,
|  | ImpellerProcAddressCallback IMPELLER_NONNULL | gl_proc_address_callback,
|  | void *IMPELLER_NULLABLE | gl_proc_address_callback_user_data
| ) |  |

Create an OpenGL(ES) Impeller context.

Warning
  Unlike other context types, the OpenGL ES context can only be created, used, and collected on the calling thread. This restriction may be lifted in the future once reactor workers are exposed in the API. No other context types have threading restrictions. Till reactor workers can be used, using the context on a background thread will cause a stall of OpenGL operations.

Parameters

  [in] | version | The version of the Impeller standalone API. See `ImpellerGetVersion`. If the specified here is not compatible with the version of the library, context creation will fail and NULL context returned from this call.
  [in] | gl_proc_address_callback | The gl proc address callback. For instance, `eglGetProcAddress`.
  [in] | gl_proc_address_callback_user_data | The gl proc address callback user data baton. This pointer is not interpreted by Impeller and will be returned as user data in the proc address callback. user data.

Returns
  The context or NULL if one cannot be created.

Referenced by main().

## ◆ ImpellerContextRelease()

IMPELLER_EXPORT void ImpellerContextRelease | ( | ImpellerContext IMPELLER_NULLABLE | context | ) |

Release a previously retained reference to the object. The object can be NULL in which case this method is a no-op.

Parameters

  [in] | context | The context.

Referenced by main().

## ◆ ImpellerContextRetain()

IMPELLER_EXPORT void ImpellerContextRetain | ( | ImpellerContext IMPELLER_NULLABLE | context | ) |

Retain a strong reference to the object. The object can be NULL in which case this method is a no-op.

Parameters

  [in] | context | The context.

## ◆ ImpellerDisplayListBuilderClipOval()

IMPELLER_EXPORT void ImpellerDisplayListBuilderClipOval | ( | ImpellerDisplayListBuilder IMPELLER_NONNULL | builder,
|  | const ImpellerRect *IMPELLER_NONNULL | oval_bounds,
|  | ImpellerClipOperation | op
| ) |  |

Reduces the clip region to the intersection of the current clip and the given oval taking into account the clip operation.

Parameters

  [in] | builder | The builder.
  [in] | oval_bounds | The oval bounds.
  [in] | op | The operation.

## ◆ ImpellerDisplayListBuilderClipPath()

IMPELLER_EXPORT void ImpellerDisplayListBuilderClipPath | ( | ImpellerDisplayListBuilder IMPELLER_NONNULL | builder,
|  | ImpellerPath IMPELLER_NONNULL | path,
|  | ImpellerClipOperation | op
| ) |  |

Reduces the clip region to the intersection of the current clip and the given path taking into account the clip operation.

Parameters

  [in] | builder | The builder.
  [in] | path | The path.
  [in] | op | The operation.

## ◆ ImpellerDisplayListBuilderClipRect()

IMPELLER_EXPORT void ImpellerDisplayListBuilderClipRect | ( | ImpellerDisplayListBuilder IMPELLER_NONNULL | builder,
|  | const ImpellerRect *IMPELLER_NONNULL | rect,
|  | ImpellerClipOperation | op
| ) |  |

Reduces the clip region to the intersection of the current clip and the given rectangle taking into account the clip operation.

Parameters

  [in] | builder | The builder.
  [in] | rect | The rectangle.
  [in] | op | The operation.

## ◆ ImpellerDisplayListBuilderClipRoundedRect()

IMPELLER_EXPORT void ImpellerDisplayListBuilderClipRoundedRect | ( | ImpellerDisplayListBuilder IMPELLER_NONNULL | builder,
|  | const ImpellerRect *IMPELLER_NONNULL | rect,
|  | const ImpellerRoundingRadii *IMPELLER_NONNULL | radii,
|  | ImpellerClipOperation | op
| ) |  |

Reduces the clip region to the intersection of the current clip and the given rounded rectangle taking into account the clip operation.

Parameters

  [in] | builder | The builder.
  [in] | rect | The rectangle.
  [in] | radii | The radii.
  [in] | op | The operation.

## ◆ ImpellerDisplayListBuilderCreateDisplayListNew()

IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerDisplayList IMPELLER_NULLABLE ImpellerDisplayListBuilderCreateDisplayListNew | ( | ImpellerDisplayListBuilder IMPELLER_NONNULL | builder | ) |

Create a new display list using the rendering intent already encoded in the builder. The builder is reset after this call.

Parameters

  [in] | builder | The builder.

Returns
  The display list.

Referenced by main().

## ◆ ImpellerDisplayListBuilderDrawDashedLine()

IMPELLER_EXPORT void ImpellerDisplayListBuilderDrawDashedLine | ( | ImpellerDisplayListBuilder IMPELLER_NONNULL | builder,
|  | const ImpellerPoint *IMPELLER_NONNULL | from,
|  | const ImpellerPoint *IMPELLER_NONNULL | to,
|  | float | on_length,
|  | float | off_length,
|  | ImpellerPaint IMPELLER_NONNULL | paint
| ) |  |

Draws a dash line segment.

Parameters

  [in] | builder | The builder.
  [in] | from | The starting point of the line.
  [in] | to | The end point of the line.
  [in] | on_length | On length.
  [in] | off_length | Off length.
  [in] | paint | The paint.

## ◆ ImpellerDisplayListBuilderDrawDisplayList()

IMPELLER_EXPORT void ImpellerDisplayListBuilderDrawDisplayList | ( | ImpellerDisplayListBuilder IMPELLER_NONNULL | builder,
|  | ImpellerDisplayList IMPELLER_NONNULL | display_list,
|  | float | opacity
| ) |  |

Flattens the contents of another display list into the one currently being built.

Parameters

  [in] | builder | The builder.
  [in] | display_list | The display list.
  [in] | opacity | The opacity.

## ◆ ImpellerDisplayListBuilderDrawLine()

IMPELLER_EXPORT void ImpellerDisplayListBuilderDrawLine | ( | ImpellerDisplayListBuilder IMPELLER_NONNULL | builder,
|  | const ImpellerPoint *IMPELLER_NONNULL | from,
|  | const ImpellerPoint *IMPELLER_NONNULL | to,
|  | ImpellerPaint IMPELLER_NONNULL | paint
| ) |  |

Draws a line segment.

Parameters

  [in] | builder | The builder.
  [in] | from | The starting point of the line.
  [in] | to | The end point of the line.
  [in] | paint | The paint.

## ◆ ImpellerDisplayListBuilderDrawOval()

IMPELLER_EXPORT void ImpellerDisplayListBuilderDrawOval | ( | ImpellerDisplayListBuilder IMPELLER_NONNULL | builder,
|  | const ImpellerRect *IMPELLER_NONNULL | oval_bounds,
|  | ImpellerPaint IMPELLER_NONNULL | paint
| ) |  |

Draws an oval.

Parameters

  [in] | builder | The builder.
  [in] | oval_bounds | The oval bounds.
  [in] | paint | The paint.

## ◆ ImpellerDisplayListBuilderDrawPaint()

IMPELLER_EXPORT void ImpellerDisplayListBuilderDrawPaint | ( | ImpellerDisplayListBuilder IMPELLER_NONNULL | builder,
|  | ImpellerPaint IMPELLER_NONNULL | paint
| ) |  |

Fills the current clip with the specified paint.

Parameters

  [in] | builder | The builder.
  [in] | paint | The paint.

Referenced by main().

## ◆ ImpellerDisplayListBuilderDrawParagraph()

IMPELLER_EXPORT void ImpellerDisplayListBuilderDrawParagraph | ( | ImpellerDisplayListBuilder IMPELLER_NONNULL | builder,
|  | ImpellerParagraph IMPELLER_NONNULL | paragraph,
|  | const ImpellerPoint *IMPELLER_NONNULL | point
| ) |  |

Draw a paragraph at the specified point.

Parameters

  [in] | builder | The builder.
  [in] | paragraph | The paragraph.
  [in] | point | The point.

## ◆ ImpellerDisplayListBuilderDrawPath()

IMPELLER_EXPORT void ImpellerDisplayListBuilderDrawPath | ( | ImpellerDisplayListBuilder IMPELLER_NONNULL | builder,
|  | ImpellerPath IMPELLER_NONNULL | path,
|  | ImpellerPaint IMPELLER_NONNULL | paint
| ) |  |

Draws the specified shape.

Parameters

  [in] | builder | The builder.
  [in] | path | The path.
  [in] | paint | The paint.

## ◆ ImpellerDisplayListBuilderDrawRect()

IMPELLER_EXPORT void ImpellerDisplayListBuilderDrawRect | ( | ImpellerDisplayListBuilder IMPELLER_NONNULL | builder,
|  | const ImpellerRect *IMPELLER_NONNULL | rect,
|  | ImpellerPaint IMPELLER_NONNULL | paint
| ) |  |

Draws a rectangle.

Parameters

  [in] | builder | The builder.
  [in] | rect | The rectangle.
  [in] | paint | The paint.

Referenced by main().

## ◆ ImpellerDisplayListBuilderDrawRoundedRect()

IMPELLER_EXPORT void ImpellerDisplayListBuilderDrawRoundedRect | ( | ImpellerDisplayListBuilder IMPELLER_NONNULL | builder,
|  | const ImpellerRect *IMPELLER_NONNULL | rect,
|  | const ImpellerRoundingRadii *IMPELLER_NONNULL | radii,
|  | ImpellerPaint IMPELLER_NONNULL | paint
| ) |  |

Draws a rounded rect.

Parameters

  [in] | builder | The builder.
  [in] | rect | The rectangle.
  [in] | radii | The radii.
  [in] | paint | The paint.

## ◆ ImpellerDisplayListBuilderDrawRoundedRectDifference()

IMPELLER_EXPORT void ImpellerDisplayListBuilderDrawRoundedRectDifference | ( | ImpellerDisplayListBuilder IMPELLER_NONNULL | builder,
|  | const ImpellerRect *IMPELLER_NONNULL | outer_rect,
|  | const ImpellerRoundingRadii *IMPELLER_NONNULL | outer_radii,
|  | const ImpellerRect *IMPELLER_NONNULL | inner_rect,
|  | const ImpellerRoundingRadii *IMPELLER_NONNULL | inner_radii,
|  | ImpellerPaint IMPELLER_NONNULL | paint
| ) |  |

Draws a shape that is the different between the specified rectangles (each with configurable corner radii).

Parameters

  [in] | builder | The builder.
  [in] | outer_rect | The outer rectangle.
  [in] | outer_radii | The outer radii.
  [in] | inner_rect | The inner rectangle.
  [in] | inner_radii | The inner radii.
  [in] | paint | The paint.

## ◆ ImpellerDisplayListBuilderDrawTexture()

IMPELLER_EXPORT void ImpellerDisplayListBuilderDrawTexture | ( | ImpellerDisplayListBuilder IMPELLER_NONNULL | builder,
|  | ImpellerTexture IMPELLER_NONNULL | texture,
|  | const ImpellerPoint *IMPELLER_NONNULL | point,
|  | ImpellerTextureSampling | sampling,
|  | ImpellerPaint IMPELLER_NULLABLE | paint
| ) |  |

Draw a texture at the specified point.

Parameters

  [in] | builder | The builder.
  [in] | texture | The texture.
  [in] | point | The point.
  [in] | sampling | The sampling.
  [in] | paint | The paint.

## ◆ ImpellerDisplayListBuilderDrawTextureRect()

IMPELLER_EXPORT void ImpellerDisplayListBuilderDrawTextureRect | ( | ImpellerDisplayListBuilder IMPELLER_NONNULL | builder,
|  | ImpellerTexture IMPELLER_NONNULL | texture,
|  | const ImpellerRect *IMPELLER_NONNULL | src_rect,
|  | const ImpellerRect *IMPELLER_NONNULL | dst_rect,
|  | ImpellerTextureSampling | sampling,
|  | ImpellerPaint IMPELLER_NULLABLE | paint
| ) |  |

Draw a portion of texture at the specified location.

Parameters

  [in] | builder | The builder.
  [in] | texture | The texture.
  [in] | src_rect | The source rectangle.
  [in] | dst_rect | The destination rectangle.
  [in] | sampling | The sampling.
  [in] | paint | The paint.

## ◆ ImpellerDisplayListBuilderGetSaveCount()

IMPELLER_EXPORT uint32_t ImpellerDisplayListBuilderGetSaveCount | ( | ImpellerDisplayListBuilder IMPELLER_NONNULL | builder | ) |

Get the current size of the save stack.

Parameters

  [in] | builder | The builder.

Returns
  The save stack size.

## ◆ ImpellerDisplayListBuilderGetTransform()

IMPELLER_EXPORT void ImpellerDisplayListBuilderGetTransform | ( | ImpellerDisplayListBuilder IMPELLER_NONNULL | builder,
|  | ImpellerMatrix *IMPELLER_NONNULL | out_transform
| ) |  |

Get the transformation currently built up on the top of the transformation stack.

Parameters

  [in] | builder | The builder.
  [out] | out_transform | The transform.

## ◆ ImpellerDisplayListBuilderNew()

IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerDisplayListBuilder IMPELLER_NULLABLE ImpellerDisplayListBuilderNew | ( | const ImpellerRect *IMPELLER_NULLABLE | cull_rect | ) |

Create a new display list builder.

            An optional cull rectangle may be specified. Impeller is allowed
            to treat the contents outside this rectangle as being undefined.
            This may aid performance optimizations.

Parameters

  [in] | cull_rect | The cull rectangle or NULL.

Returns
  The display list builder.

Referenced by main().

## ◆ ImpellerDisplayListBuilderRelease()

IMPELLER_EXPORT void ImpellerDisplayListBuilderRelease | ( | ImpellerDisplayListBuilder IMPELLER_NULLABLE | builder | ) |

Release a previously retained reference to the object. The object can be NULL in which case this method is a no-op.

Parameters

  [in] | builder | The display list builder.

Referenced by main().

## ◆ ImpellerDisplayListBuilderResetTransform()

IMPELLER_EXPORT void ImpellerDisplayListBuilderResetTransform | ( | ImpellerDisplayListBuilder IMPELLER_NONNULL | builder | ) |

Reset the transformation on top of the transformation stack to identity.

Parameters

  [in] | builder | The builder.

## ◆ ImpellerDisplayListBuilderRestore()

IMPELLER_EXPORT void ImpellerDisplayListBuilderRestore | ( | ImpellerDisplayListBuilder IMPELLER_NONNULL | builder | ) |

Pops the last entry pushed onto the save stack using a call to `ImpellerDisplayListBuilderSave` or `ImpellerDisplayListBuilderSaveLayer`.

Parameters

  [in] | builder | The builder.

## ◆ ImpellerDisplayListBuilderRestoreToCount()

IMPELLER_EXPORT void ImpellerDisplayListBuilderRestoreToCount | ( | ImpellerDisplayListBuilder IMPELLER_NONNULL | builder,
|  | uint32_t | count
| ) |  |

Effectively calls ImpellerDisplayListBuilderRestore till the size of the save stack becomes a specified count.

Parameters

  [in] | builder | The builder.
  [in] | count | The count.

## ◆ ImpellerDisplayListBuilderRetain()

IMPELLER_EXPORT void ImpellerDisplayListBuilderRetain | ( | ImpellerDisplayListBuilder IMPELLER_NULLABLE | builder | ) |

Retain a strong reference to the object. The object can be NULL in which case this method is a no-op.

Parameters

  [in] | builder | The display list builder.

## ◆ ImpellerDisplayListBuilderRotate()

IMPELLER_EXPORT void ImpellerDisplayListBuilderRotate | ( | ImpellerDisplayListBuilder IMPELLER_NONNULL | builder,
|  | float | angle_degrees
| ) |  |

Apply a clockwise rotation to the transformation matrix currently on top of the save stack.

Parameters

  [in] | builder | The builder.
  [in] | angle_degrees | The angle in degrees.

## ◆ ImpellerDisplayListBuilderSave()

IMPELLER_EXPORT void ImpellerDisplayListBuilderSave | ( | ImpellerDisplayListBuilder IMPELLER_NONNULL | builder | ) |

Stashes the current transformation and clip state onto a save stack.

Parameters

  [in] | builder | The builder.

## ◆ ImpellerDisplayListBuilderSaveLayer()

IMPELLER_EXPORT void ImpellerDisplayListBuilderSaveLayer | ( | ImpellerDisplayListBuilder IMPELLER_NONNULL | builder,
|  | const ImpellerRect *IMPELLER_NONNULL | bounds,
|  | ImpellerPaint IMPELLER_NULLABLE | paint,
|  | ImpellerImageFilter IMPELLER_NULLABLE | backdrop
| ) |  |

Stashes the current transformation and clip state onto a save stack and creates and creates an offscreen layer onto which subsequent rendering intent will be directed to.

On the balancing call to restore, the supplied paints filters and blend modes will be used to composite the offscreen contents back onto the display display list.

Parameters

  [in] | builder | The builder.
  [in] | bounds | The bounds.
  [in] | paint | The paint.
  [in] | backdrop | The backdrop.

## ◆ ImpellerDisplayListBuilderScale()

IMPELLER_EXPORT void ImpellerDisplayListBuilderScale | ( | ImpellerDisplayListBuilder IMPELLER_NONNULL | builder,
|  | float | x_scale,
|  | float | y_scale
| ) |  |

Apply a scale to the transformation matrix currently on top of the save stack.

Parameters

  [in] | builder | The builder.
  [in] | x_scale | The x scale.
  [in] | y_scale | The y scale.

## ◆ ImpellerDisplayListBuilderSetTransform()

IMPELLER_EXPORT void ImpellerDisplayListBuilderSetTransform | ( | ImpellerDisplayListBuilder IMPELLER_NONNULL | builder,
|  | const ImpellerMatrix *IMPELLER_NONNULL | transform
| ) |  |

Clear the transformation on top of the save stack and replace it with a new value.

Parameters

  [in] | builder | The builder.
  [in] | transform | The new transform.

## ◆ ImpellerDisplayListBuilderTransform()

IMPELLER_EXPORT void ImpellerDisplayListBuilderTransform | ( | ImpellerDisplayListBuilder IMPELLER_NONNULL | builder,
|  | const ImpellerMatrix *IMPELLER_NONNULL | transform
| ) |  |

Appends the the provided transformation to the transformation already on the save stack.

Parameters

  [in] | builder | The builder.
  [in] | transform | The transform to append.

## ◆ ImpellerDisplayListBuilderTranslate()

IMPELLER_EXPORT void ImpellerDisplayListBuilderTranslate | ( | ImpellerDisplayListBuilder IMPELLER_NONNULL | builder,
|  | float | x_translation,
|  | float | y_translation
| ) |  |

Apply a translation to the transformation matrix currently on top of the save stack.

Parameters

  [in] | builder | The builder.
  [in] | x_translation | The x translation.
  [in] | y_translation | The y translation.

## ◆ ImpellerDisplayListRelease()

IMPELLER_EXPORT void ImpellerDisplayListRelease | ( | ImpellerDisplayList IMPELLER_NULLABLE | display_list | ) |

Release a previously retained reference to the object. The object can be NULL in which case this method is a no-op.

Parameters

  [in] | display_list | The display list.

Referenced by main().

## ◆ ImpellerDisplayListRetain()

IMPELLER_EXPORT void ImpellerDisplayListRetain | ( | ImpellerDisplayList IMPELLER_NULLABLE | display_list | ) |

Retain a strong reference to the object. The object can be NULL in which case this method is a no-op.

Parameters

  [in] | display_list | The display list.

## ◆ ImpellerGetVersion()

IMPELLER_EXPORT uint32_t ImpellerGetVersion | ( |  | ) |

Get the version of Impeller standalone API. This is the API that will be accepted for validity checks when provided to the context creation methods.

The current version of the API is denoted by the `IMPELLER_VERSION` macro. This version must be passed to APIs that create top-level objects like graphics contexts. Construction of the context may fail if the API version expected by the caller is not supported by the library.

Since there are no API stability guarantees today, passing a version that is different to the one returned by `ImpellerGetVersion` will always fail.

See also
  `ImpellerContextCreateOpenGLESNew`

Returns
  The version of the standalone API.

## ◆ ImpellerImageFilterCreateBlurNew()

IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerImageFilter IMPELLER_NULLABLE ImpellerImageFilterCreateBlurNew | ( | float | x_sigma,
|  | float | y_sigma,
|  | ImpellerTileMode | tile_mode
| ) |  |

Creates an image filter that applies a Gaussian blur.

            The Gaussian blur applied may be an approximation for
            performance.

Parameters

  [in] | x_sigma | The x sigma.
  [in] | y_sigma | The y sigma.
  [in] | tile_mode | The tile mode.

Returns
  The image filter.

## ◆ ImpellerImageFilterCreateComposeNew()

IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerImageFilter IMPELLER_NULLABLE ImpellerImageFilterCreateComposeNew | ( | ImpellerImageFilter IMPELLER_NONNULL | outer,
|  | ImpellerImageFilter IMPELLER_NONNULL | inner
| ) |  |

Creates a composed filter that when applied is identical to subsequently applying the inner and then the outer filters.

``` destination = outer_filter(inner_filter(source)) ```

Parameters

  [in] | outer | The outer image filter.
  [in] | inner | The inner image filter.

Returns
  The combined image filter.

## ◆ ImpellerImageFilterCreateDilateNew()

IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerImageFilter IMPELLER_NULLABLE ImpellerImageFilterCreateDilateNew | ( | float | x_radius,
|  | float | y_radius
| ) |  |

Creates an image filter that enhances the per-channel pixel values to the maximum value in a circle around the pixel.

Parameters

  [in] | x_radius | The x radius.
  [in] | y_radius | The y radius.

Returns
  The image filter.

## ◆ ImpellerImageFilterCreateErodeNew()

IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerImageFilter IMPELLER_NULLABLE ImpellerImageFilterCreateErodeNew | ( | float | x_radius,
|  | float | y_radius
| ) |  |

Creates an image filter that dampens the per-channel pixel values to the minimum value in a circle around the pixel.

Parameters

  [in] | x_radius | The x radius.
  [in] | y_radius | The y radius.

Returns
  The image filter.

## ◆ ImpellerImageFilterCreateMatrixNew()

IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerImageFilter IMPELLER_NULLABLE ImpellerImageFilterCreateMatrixNew | ( | const ImpellerMatrix *IMPELLER_NONNULL | matrix,
|  | ImpellerTextureSampling | sampling
| ) |  |

Creates an image filter that applies a transformation matrix to the underlying image.

Parameters

  [in] | matrix | The transformation matrix.
  [in] | sampling | The image sampling mode.

Returns
  The image filter.

## ◆ ImpellerImageFilterRelease()

IMPELLER_EXPORT void ImpellerImageFilterRelease | ( | ImpellerImageFilter IMPELLER_NULLABLE | image_filter | ) |

Release a previously retained reference to the object. The object can be NULL in which case this method is a no-op.

Parameters

  [in] | image_filter | The image filter.

## ◆ ImpellerImageFilterRetain()

IMPELLER_EXPORT void ImpellerImageFilterRetain | ( | ImpellerImageFilter IMPELLER_NULLABLE | image_filter | ) |

Retain a strong reference to the object. The object can be NULL in which case this method is a no-op.

Parameters

  [in] | image_filter | The image filter.

## ◆ ImpellerMaskFilterCreateBlurNew()

IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerMaskFilter IMPELLER_NULLABLE ImpellerMaskFilterCreateBlurNew | ( | ImpellerBlurStyle | style,
|  | float | sigma
| ) |  |

Create a mask filter that blurs contents in the masked shape.

Parameters

  [in] | style | The style.
  [in] | sigma | The sigma.

Returns
  The mask filter.

## ◆ ImpellerMaskFilterRelease()

IMPELLER_EXPORT void ImpellerMaskFilterRelease | ( | ImpellerMaskFilter IMPELLER_NULLABLE | mask_filter | ) |

Release a previously retained reference to the object. The object can be NULL in which case this method is a no-op.

Parameters

  [in] | mask_filter | The mask filter.

## ◆ ImpellerMaskFilterRetain()

IMPELLER_EXPORT void ImpellerMaskFilterRetain | ( | ImpellerMaskFilter IMPELLER_NULLABLE | mask_filter | ) |

Retain a strong reference to the object. The object can be NULL in which case this method is a no-op.

Parameters

  [in] | mask_filter | The mask filter.

## ◆ ImpellerPaintNew()

IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerPaint IMPELLER_NULLABLE ImpellerPaintNew | ( |  | ) |

Create a new paint with default values.

Returns
  The impeller paint.

Referenced by main().

## ◆ ImpellerPaintRelease()

IMPELLER_EXPORT void ImpellerPaintRelease | ( | ImpellerPaint IMPELLER_NULLABLE | paint | ) |

Release a previously retained reference to the object. The object can be NULL in which case this method is a no-op.

Parameters

  [in] | paint | The paint.

Referenced by main().

## ◆ ImpellerPaintRetain()

IMPELLER_EXPORT void ImpellerPaintRetain | ( | ImpellerPaint IMPELLER_NULLABLE | paint | ) |

Retain a strong reference to the object. The object can be NULL in which case this method is a no-op.

Parameters

  [in] | paint | The paint.

## ◆ ImpellerPaintSetBlendMode()

IMPELLER_EXPORT void ImpellerPaintSetBlendMode | ( | ImpellerPaint IMPELLER_NONNULL | paint,
|  | ImpellerBlendMode | mode
| ) |  |

Set the paint blend mode. The blend mode controls how the new paints contents are mixed with the values already drawn using previous draw calls.

Parameters

  [in] | paint | The paint.
  [in] | mode | The mode.

## ◆ ImpellerPaintSetColor()

IMPELLER_EXPORT void ImpellerPaintSetColor | ( | ImpellerPaint IMPELLER_NONNULL | paint,
|  | const ImpellerColor *IMPELLER_NONNULL | color
| ) |  |

Set the paint color.

Parameters

  [in] | paint | The paint.
  [in] | color | The color.

Referenced by main().

## ◆ ImpellerPaintSetColorFilter()

IMPELLER_EXPORT void ImpellerPaintSetColorFilter | ( | ImpellerPaint IMPELLER_NONNULL | paint,
|  | ImpellerColorFilter IMPELLER_NONNULL | color_filter
| ) |  |

Set the color filter of the paint.

            Color filters are functions that take two colors and mix them to
            produce a single color. This color is then usually merged with
            the destination during blending.

Parameters

  [in] | paint | The paint.
  [in] | color_filter | The color filter.

## ◆ ImpellerPaintSetColorSource()

IMPELLER_EXPORT void ImpellerPaintSetColorSource | ( | ImpellerPaint IMPELLER_NONNULL | paint,
|  | ImpellerColorSource IMPELLER_NONNULL | color_source
| ) |  |

Set the color source of the paint.

            Color sources are functions that generate colors for each
            texture element covered by a draw call.

Parameters

  [in] | paint | The paint.
  [in] | color_source | The color source.

## ◆ ImpellerPaintSetDrawStyle()

IMPELLER_EXPORT void ImpellerPaintSetDrawStyle | ( | ImpellerPaint IMPELLER_NONNULL | paint,
|  | ImpellerDrawStyle | style
| ) |  |

Set the paint draw style. The style controls if the closed shapes are filled and/or stroked.

Parameters

  [in] | paint | The paint.
  [in] | style | The style.

## ◆ ImpellerPaintSetImageFilter()

IMPELLER_EXPORT void ImpellerPaintSetImageFilter | ( | ImpellerPaint IMPELLER_NONNULL | paint,
|  | ImpellerImageFilter IMPELLER_NONNULL | image_filter
| ) |  |

Set the image filter of a paint.

            Image filters are functions that are applied to regions of a
            texture to produce a single color.

Parameters

  [in] | paint | The paint.
  [in] | image_filter | The image filter.

## ◆ ImpellerPaintSetMaskFilter()

IMPELLER_EXPORT void ImpellerPaintSetMaskFilter | ( | ImpellerPaint IMPELLER_NONNULL | paint,
|  | ImpellerMaskFilter IMPELLER_NONNULL | mask_filter
| ) |  |

Set the mask filter of a paint.

Parameters

  [in] | paint | The paint.
  [in] | mask_filter | The mask filter.

## ◆ ImpellerPaintSetStrokeCap()

IMPELLER_EXPORT void ImpellerPaintSetStrokeCap | ( | ImpellerPaint IMPELLER_NONNULL | paint,
|  | ImpellerStrokeCap | cap
| ) |  |

Sets how strokes rendered using this paint are capped.

Parameters

  [in] | paint | The paint.
  [in] | cap | The stroke cap style.

## ◆ ImpellerPaintSetStrokeJoin()

IMPELLER_EXPORT void ImpellerPaintSetStrokeJoin | ( | ImpellerPaint IMPELLER_NONNULL | paint,
|  | ImpellerStrokeJoin | join
| ) |  |

Sets how strokes rendered using this paint are joined.

Parameters

  [in] | paint | The paint.
  [in] | join | The join.

## ◆ ImpellerPaintSetStrokeMiter()

IMPELLER_EXPORT void ImpellerPaintSetStrokeMiter | ( | ImpellerPaint IMPELLER_NONNULL | paint,
|  | float | miter
| ) |  |

Set the miter limit of the strokes rendered using this paint.

Parameters

  [in] | paint | The paint.
  [in] | miter | The miter limit.

## ◆ ImpellerPaintSetStrokeWidth()

IMPELLER_EXPORT void ImpellerPaintSetStrokeWidth | ( | ImpellerPaint IMPELLER_NONNULL | paint,
|  | float | width
| ) |  |

Set the width of the strokes rendered using this paint.

Parameters

  [in] | paint | The paint.
  [in] | width | The width.

## ◆ ImpellerParagraphBuilderAddText()

IMPELLER_EXPORT void ImpellerParagraphBuilderAddText | ( | ImpellerParagraphBuilder IMPELLER_NONNULL | paragraph_builder,
|  | const uint8_t *IMPELLER_NULLABLE | data,
|  | uint32_t | length
| ) |  |

Add UTF-8 encoded text to the paragraph. The text will be styled according to the paragraph style already on top of the paragraph style stack.

Parameters

  [in] | paragraph_builder | The paragraph builder.
  [in] | data | The data.
  [in] | length | The length.

## ◆ ImpellerParagraphBuilderBuildParagraphNew()

IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerParagraph IMPELLER_NULLABLE ImpellerParagraphBuilderBuildParagraphNew | ( | ImpellerParagraphBuilder IMPELLER_NONNULL | paragraph_builder,
|  | float | width
| ) |  |

Layout and build a new paragraph using the specified width. The resulting paragraph is immutable. The paragraph builder must be discarded and a new one created to build more paragraphs.

Parameters

  [in] | paragraph_builder | The paragraph builder.
  [in] | width | The paragraph width.

Returns
  The paragraph if one can be created, NULL otherwise.

## ◆ ImpellerParagraphBuilderNew()

IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerParagraphBuilder IMPELLER_NULLABLE ImpellerParagraphBuilderNew | ( | ImpellerTypographyContext IMPELLER_NONNULL | context | ) |

Create a new paragraph builder.

Parameters

  [in] | context | The context.

Returns
  The paragraph builder.

## ◆ ImpellerParagraphBuilderPopStyle()

IMPELLER_EXPORT void ImpellerParagraphBuilderPopStyle | ( | ImpellerParagraphBuilder IMPELLER_NONNULL | paragraph_builder | ) |

Pop a previously pushed paragraph style from the paragraph style stack.

Parameters

  [in] | paragraph_builder | The paragraph builder.

## ◆ ImpellerParagraphBuilderPushStyle()

IMPELLER_EXPORT void ImpellerParagraphBuilderPushStyle | ( | ImpellerParagraphBuilder IMPELLER_NONNULL | paragraph_builder,
|  | ImpellerParagraphStyle IMPELLER_NONNULL | style
| ) |  |

Push a new paragraph style onto the paragraph style stack managed by the paragraph builder.

Not all paragraph styles can be combined. For instance, it does not make sense to mix text alignment for different text runs within a paragraph. In such cases, the preference of the the first paragraph style on the style stack will take hold.

If text is pushed onto the paragraph builder without a style previously pushed onto the stack, a default paragraph text style will be used. This may not always be desirable because some style element cannot be overridden. It is recommended that a default paragraph style always be pushed onto the stack before the addition of any text.

Parameters

  [in] | paragraph_builder | The paragraph builder.
  [in] | style | The style.

## ◆ ImpellerParagraphBuilderRelease()

IMPELLER_EXPORT void ImpellerParagraphBuilderRelease | ( | ImpellerParagraphBuilder IMPELLER_NULLABLE | paragraph_builder | ) |

Release a previously retained reference to the object. The object can be NULL in which case this method is a no-op.

Parameters

  [in] | paragraph_builder | The paragraph_builder.

## ◆ ImpellerParagraphBuilderRetain()

IMPELLER_EXPORT void ImpellerParagraphBuilderRetain | ( | ImpellerParagraphBuilder IMPELLER_NULLABLE | paragraph_builder | ) |

Retain a strong reference to the object. The object can be NULL in which case this method is a no-op.

Parameters

  [in] | paragraph_builder | The paragraph builder.

## ◆ ImpellerParagraphGetAlphabeticBaseline()

IMPELLER_EXPORT float ImpellerParagraphGetAlphabeticBaseline | ( | ImpellerParagraph IMPELLER_NONNULL | paragraph | ) |

Parameters

  [in] | paragraph | The paragraph.

Returns
  The distance from the top of the paragraph to the alphabetic baseline of the first line when using alphabetic fonts (A-Z, a-z, Greek, etc...).

## ◆ ImpellerParagraphGetHeight()

IMPELLER_EXPORT float ImpellerParagraphGetHeight | ( | ImpellerParagraph IMPELLER_NONNULL | paragraph | ) |

Parameters

  [in] | paragraph | The paragraph.

Returns
  The height of the laid out paragraph. This is not a tight bounding box and some glyphs may not reach the minimum location they are allowed to reach.

## ◆ ImpellerParagraphGetIdeographicBaseline()

IMPELLER_EXPORT float ImpellerParagraphGetIdeographicBaseline | ( | ImpellerParagraph IMPELLER_NONNULL | paragraph | ) |

Parameters

  [in] | paragraph | The paragraph.

Returns
  The distance from the top of the paragraph to the ideographic baseline of the first line when using ideographic fonts (Japanese, Korean, etc...).

## ◆ ImpellerParagraphGetLineCount()

IMPELLER_EXPORT uint32_t ImpellerParagraphGetLineCount | ( | ImpellerParagraph IMPELLER_NONNULL | paragraph | ) |

Parameters

  [in] | paragraph | The paragraph.

Returns
  The number of lines visible in the paragraph after line breaking.

## ◆ ImpellerParagraphGetLongestLineWidth()

IMPELLER_EXPORT float ImpellerParagraphGetLongestLineWidth | ( | ImpellerParagraph IMPELLER_NONNULL | paragraph | ) |

Parameters

  [in] | paragraph | The paragraph.

Returns
  The length of the longest line in the paragraph. This is the horizontal distance between the left edge of the leftmost glyph and the right edge of the rightmost glyph, in the longest line in the paragraph.

## ◆ ImpellerParagraphGetMaxIntrinsicWidth()

IMPELLER_EXPORT float ImpellerParagraphGetMaxIntrinsicWidth | ( | ImpellerParagraph IMPELLER_NONNULL | paragraph | ) |

Parameters

  [in] | paragraph | The paragraph.

Returns
  The width of the paragraph without line breaking.

## ◆ ImpellerParagraphGetMaxWidth()

IMPELLER_EXPORT float ImpellerParagraphGetMaxWidth | ( | ImpellerParagraph IMPELLER_NONNULL | paragraph | ) |

See also
  `ImpellerParagraphGetMinIntrinsicWidth`

Parameters

  [in] | paragraph | The paragraph.

Returns
  The width provided to the paragraph builder during the call to layout. This is the maximum width any line in the laid out paragraph can occupy. But, it is not necessarily the actual width of the paragraph after layout.

## ◆ ImpellerParagraphGetMinIntrinsicWidth()

IMPELLER_EXPORT float ImpellerParagraphGetMinIntrinsicWidth | ( | ImpellerParagraph IMPELLER_NONNULL | paragraph | ) |

See also
  `ImpellerParagraphGetMaxWidth`

Parameters

  [in] | paragraph | The paragraph.

Returns
  The actual width of the longest line in the paragraph after layout. This is expected to be less than or equal to `ImpellerParagraphGetMaxWidth`.

## ◆ ImpellerParagraphRelease()

IMPELLER_EXPORT void ImpellerParagraphRelease | ( | ImpellerParagraph IMPELLER_NULLABLE | paragraph | ) |

Release a previously retained reference to the object. The object can be NULL in which case this method is a no-op.

Parameters

  [in] | paragraph | The paragraph.

## ◆ ImpellerParagraphRetain()

IMPELLER_EXPORT void ImpellerParagraphRetain | ( | ImpellerParagraph IMPELLER_NULLABLE | paragraph | ) |

Retain a strong reference to the object. The object can be NULL in which case this method is a no-op.

Parameters

  [in] | paragraph | The paragraph.

## ◆ ImpellerParagraphStyleNew()

IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerParagraphStyle IMPELLER_NULLABLE ImpellerParagraphStyleNew | ( |  | ) |

Create a new paragraph style.

Returns
  The paragraph style.

## ◆ ImpellerParagraphStyleRelease()

IMPELLER_EXPORT void ImpellerParagraphStyleRelease | ( | ImpellerParagraphStyle IMPELLER_NULLABLE | paragraph_style | ) |

Release a previously retained reference to the object. The object can be NULL in which case this method is a no-op.

Parameters

  [in] | paragraph_style | The paragraph style.

## ◆ ImpellerParagraphStyleRetain()

IMPELLER_EXPORT void ImpellerParagraphStyleRetain | ( | ImpellerParagraphStyle IMPELLER_NULLABLE | paragraph_style | ) |

Retain a strong reference to the object. The object can be NULL in which case this method is a no-op.

Parameters

  [in] | paragraph_style | The paragraph style.

## ◆ ImpellerParagraphStyleSetBackground()

IMPELLER_EXPORT void ImpellerParagraphStyleSetBackground | ( | ImpellerParagraphStyle IMPELLER_NONNULL | paragraph_style,
|  | ImpellerPaint IMPELLER_NONNULL | paint
| ) |  |

Set the paint used to render the background of the text glyphs.

Parameters

  [in] | paragraph_style | The paragraph style.
  [in] | paint | The paint.

## ◆ ImpellerParagraphStyleSetFontFamily()

IMPELLER_EXPORT void ImpellerParagraphStyleSetFontFamily | ( | ImpellerParagraphStyle IMPELLER_NONNULL | paragraph_style,
|  | const char *IMPELLER_NONNULL | family_name
| ) |  |

Set the font family.

Parameters

  [in] | paragraph_style | The paragraph style.
  [in] | family_name | The family name.

## ◆ ImpellerParagraphStyleSetFontSize()

IMPELLER_EXPORT void ImpellerParagraphStyleSetFontSize | ( | ImpellerParagraphStyle IMPELLER_NONNULL | paragraph_style,
|  | float | size
| ) |  |

Set the font size.

Parameters

  [in] | paragraph_style | The paragraph style.
  [in] | size | The size.

## ◆ ImpellerParagraphStyleSetFontStyle()

IMPELLER_EXPORT void ImpellerParagraphStyleSetFontStyle | ( | ImpellerParagraphStyle IMPELLER_NONNULL | paragraph_style,
|  | ImpellerFontStyle | style
| ) |  |

Set whether the glyphs should be bolded or italicized.

Parameters

  [in] | paragraph_style | The paragraph style.
  [in] | style | The style.

## ◆ ImpellerParagraphStyleSetFontWeight()

IMPELLER_EXPORT void ImpellerParagraphStyleSetFontWeight | ( | ImpellerParagraphStyle IMPELLER_NONNULL | paragraph_style,
|  | ImpellerFontWeight | weight
| ) |  |

Set the weight of the font to select when rendering glyphs.

Parameters

  [in] | paragraph_style | The paragraph style.
  [in] | weight | The weight.

## ◆ ImpellerParagraphStyleSetForeground()

IMPELLER_EXPORT void ImpellerParagraphStyleSetForeground | ( | ImpellerParagraphStyle IMPELLER_NONNULL | paragraph_style,
|  | ImpellerPaint IMPELLER_NONNULL | paint
| ) |  |

Set the paint used to render the text glyph contents.

Parameters

  [in] | paragraph_style | The paragraph style.
  [in] | paint | The paint.

## ◆ ImpellerParagraphStyleSetHeight()

IMPELLER_EXPORT void ImpellerParagraphStyleSetHeight | ( | ImpellerParagraphStyle IMPELLER_NONNULL | paragraph_style,
|  | float | height
| ) |  |

The height of the text as a multiple of text size.

            When height is 0.0, the line height will be determined by the
            font's metrics directly, which may differ from the font size.
            Otherwise the line height of the text will be a multiple of font
            size, and be exactly fontSize * height logical pixels tall.

Parameters

  [in] | paragraph_style | The paragraph style.
  [in] | height | The height.

## ◆ ImpellerParagraphStyleSetLocale()

IMPELLER_EXPORT void ImpellerParagraphStyleSetLocale | ( | ImpellerParagraphStyle IMPELLER_NONNULL | paragraph_style,
|  | const char *IMPELLER_NONNULL | locale
| ) |  |

Set the paragraph locale.

Parameters

  [in] | paragraph_style | The paragraph style.
  [in] | locale | The locale.

## ◆ ImpellerParagraphStyleSetMaxLines()

IMPELLER_EXPORT void ImpellerParagraphStyleSetMaxLines | ( | ImpellerParagraphStyle IMPELLER_NONNULL | paragraph_style,
|  | uint32_t | max_lines
| ) |  |

Set the maximum line count within the paragraph.

Parameters

  [in] | paragraph_style | The paragraph style.
  [in] | max_lines | The maximum lines.

## ◆ ImpellerParagraphStyleSetTextAlignment()

IMPELLER_EXPORT void ImpellerParagraphStyleSetTextAlignment | ( | ImpellerParagraphStyle IMPELLER_NONNULL | paragraph_style,
|  | ImpellerTextAlignment | align
| ) |  |

Set the alignment of text within the paragraph.

Parameters

  [in] | paragraph_style | The paragraph style.
  [in] | align | The align.

## ◆ ImpellerParagraphStyleSetTextDirection()

IMPELLER_EXPORT void ImpellerParagraphStyleSetTextDirection | ( | ImpellerParagraphStyle IMPELLER_NONNULL | paragraph_style,
|  | ImpellerTextDirection | direction
| ) |  |

Set the directionality of the text within the paragraph.

Parameters

  [in] | paragraph_style | The paragraph style.
  [in] | direction | The direction.

## ◆ ImpellerPathBuilderAddArc()

IMPELLER_EXPORT void ImpellerPathBuilderAddArc | ( | ImpellerPathBuilder IMPELLER_NONNULL | builder,
|  | const ImpellerRect *IMPELLER_NONNULL | oval_bounds,
|  | float | start_angle_degrees,
|  | float | end_angle_degrees
| ) |  |

Add an arc to the path.

Parameters

  [in] | builder | The builder.
  [in] | oval_bounds | The oval bounds.
  [in] | start_angle_degrees | The start angle in degrees.
  [in] | end_angle_degrees | The end angle in degrees.

## ◆ ImpellerPathBuilderAddOval()

IMPELLER_EXPORT void ImpellerPathBuilderAddOval | ( | ImpellerPathBuilder IMPELLER_NONNULL | builder,
|  | const ImpellerRect *IMPELLER_NONNULL | oval_bounds
| ) |  |

Add an oval to the path.

Parameters

  [in] | builder | The builder.
  [in] | oval_bounds | The oval bounds.

## ◆ ImpellerPathBuilderAddRect()

IMPELLER_EXPORT void ImpellerPathBuilderAddRect | ( | ImpellerPathBuilder IMPELLER_NONNULL | builder,
|  | const ImpellerRect *IMPELLER_NONNULL | rect
| ) |  |

Adds a rectangle to the path.

Parameters

  [in] | builder | The builder.
  [in] | rect | The rectangle.

## ◆ ImpellerPathBuilderAddRoundedRect()

IMPELLER_EXPORT void ImpellerPathBuilderAddRoundedRect | ( | ImpellerPathBuilder IMPELLER_NONNULL | builder,
|  | const ImpellerRect *IMPELLER_NONNULL | rect,
|  | const ImpellerRoundingRadii *IMPELLER_NONNULL | rounding_radii
| ) |  |

Add a rounded rect with potentially non-uniform radii to the path.

Parameters

  [in] | builder | The builder.
  [in] | rect | The rectangle.
  [in] | rounding_radii | The rounding radii.

## ◆ ImpellerPathBuilderClose()

IMPELLER_EXPORT void ImpellerPathBuilderClose | ( | ImpellerPathBuilder IMPELLER_NONNULL | builder | ) |

Close the path.

Parameters

  [in] | builder | The builder.

## ◆ ImpellerPathBuilderCopyPathNew()

IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerPath IMPELLER_NULLABLE ImpellerPathBuilderCopyPathNew | ( | ImpellerPathBuilder IMPELLER_NONNULL | builder,
|  | ImpellerFillType | fill
| ) |  |

Create a new path by copying the existing built-up path. The existing path can continue being added to.

Parameters

  [in] | builder | The builder.
  [in] | fill | The fill.

Returns
  The impeller path.

## ◆ ImpellerPathBuilderCubicCurveTo()

IMPELLER_EXPORT void ImpellerPathBuilderCubicCurveTo | ( | ImpellerPathBuilder IMPELLER_NONNULL | builder,
|  | const ImpellerPoint *IMPELLER_NONNULL | control_point_1,
|  | const ImpellerPoint *IMPELLER_NONNULL | control_point_2,
|  | const ImpellerPoint *IMPELLER_NONNULL | end_point
| ) |  |

Add a cubic curve whose start point is current cursor location to the specified end point using the two specified control points.

The new location of the cursor after this call is the end point supplied.

Parameters

  [in] | builder | The builder
  [in] | control_point_1 | The control point 1
  [in] | control_point_2 | The control point 2
  [in] | end_point | The end point

## ◆ ImpellerPathBuilderLineTo()

IMPELLER_EXPORT void ImpellerPathBuilderLineTo | ( | ImpellerPathBuilder IMPELLER_NONNULL | builder,
|  | const ImpellerPoint *IMPELLER_NONNULL | location
| ) |  |

Add a line segment from the current cursor location to the given location. The cursor location is updated to be at the endpoint.

Parameters

  [in] | builder | The builder.
  [in] | location | The location.

## ◆ ImpellerPathBuilderMoveTo()

IMPELLER_EXPORT void ImpellerPathBuilderMoveTo | ( | ImpellerPathBuilder IMPELLER_NONNULL | builder,
|  | const ImpellerPoint *IMPELLER_NONNULL | location
| ) |  |

Move the cursor to the specified location.

Parameters

  [in] | builder | The builder.
  [in] | location | The location.

## ◆ ImpellerPathBuilderNew()

IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerPathBuilder IMPELLER_NULLABLE ImpellerPathBuilderNew | ( |  | ) |

Create a new path builder. Paths themselves are immutable. A builder builds these immutable paths.

Returns
  The path builder.

## ◆ ImpellerPathBuilderQuadraticCurveTo()

IMPELLER_EXPORT void ImpellerPathBuilderQuadraticCurveTo | ( | ImpellerPathBuilder IMPELLER_NONNULL | builder,
|  | const ImpellerPoint *IMPELLER_NONNULL | control_point,
|  | const ImpellerPoint *IMPELLER_NONNULL | end_point
| ) |  |

Add a quadratic curve from whose start point is the cursor to the specified end point using the a single control point.

The new location of the cursor after this call is the end point.

Parameters

  [in] | builder | The builder.
  [in] | control_point | The control point.
  [in] | end_point | The end point.

## ◆ ImpellerPathBuilderRelease()

IMPELLER_EXPORT void ImpellerPathBuilderRelease | ( | ImpellerPathBuilder IMPELLER_NULLABLE | builder | ) |

Release a previously retained reference to the object. The object can be NULL in which case this method is a no-op.

Parameters

  [in] | builder | The builder.

## ◆ ImpellerPathBuilderRetain()

IMPELLER_EXPORT void ImpellerPathBuilderRetain | ( | ImpellerPathBuilder IMPELLER_NULLABLE | builder | ) |

Retain a strong reference to the object. The object can be NULL in which case this method is a no-op.

Parameters

  [in] | builder | The builder.

## ◆ ImpellerPathBuilderTakePathNew()

IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerPath IMPELLER_NULLABLE ImpellerPathBuilderTakePathNew | ( | ImpellerPathBuilder IMPELLER_NONNULL | builder,
|  | ImpellerFillType | fill
| ) |  |

Create a new path using the existing built-up path. The existing path builder now contains an empty path.

Parameters

  [in] | builder | The builder.
  [in] | fill | The fill.

Returns
  The impeller path.

## ◆ ImpellerPathRelease()

IMPELLER_EXPORT void ImpellerPathRelease | ( | ImpellerPath IMPELLER_NULLABLE | path | ) |

Release a previously retained reference to the object. The object can be NULL in which case this method is a no-op.

Parameters

  [in] | path | The path.

## ◆ ImpellerPathRetain()

IMPELLER_EXPORT void ImpellerPathRetain | ( | ImpellerPath IMPELLER_NULLABLE | path | ) |

Retain a strong reference to the object. The object can be NULL in which case this method is a no-op.

Parameters

  [in] | path | The path.

## ◆ ImpellerSurfaceCreateWrappedFBONew()

IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerSurface IMPELLER_NULLABLE ImpellerSurfaceCreateWrappedFBONew | ( | ImpellerContext IMPELLER_NULLABLE | context,
|  | uint64_t | fbo,
|  | ImpellerPixelFormat | format,
|  | const ImpellerISize *IMPELLER_NULLABLE | size
| ) |  |

Create a new surface by wrapping an existing framebuffer object. The framebuffer must be complete as determined by `glCheckFramebufferStatus`. The framebuffer is still owned by the caller and it must be collected once the surface is collected.

Parameters

  [in] | context | The context.
  [in] | fbo | The framebuffer object handle.
  [in] | format | The format of the framebuffer.
  [in] | size | The size of the framebuffer is texels.

Returns
  The surface if once can be created, NULL otherwise.

Referenced by main().

## ◆ ImpellerSurfaceDrawDisplayList()

IMPELLER_EXPORT bool ImpellerSurfaceDrawDisplayList | ( | ImpellerSurface IMPELLER_NULLABLE | surface,
|  | ImpellerDisplayList IMPELLER_NONNULL | display_list
| ) |  |

Draw a display list onto the surface. The same display list can be drawn multiple times to different surfaces.

Warning
  In the OpenGL backend, Impeller will not make an effort to preserve the OpenGL state that is current in the context. Embedders that perform additional OpenGL operations in the context should expect the reset state after control transitions back to them. Key state to watch out for would be the viewports, stencil rects, test toggles, resource (texture, framebuffer, buffer) bindings, etc...

Parameters

  [in] | surface | The surface to draw the display list to.
  [in] | display_list | The display list to draw onto the surface.

Returns
  If the display list could be drawn onto the surface.

Referenced by main().

## ◆ ImpellerSurfaceRelease()

IMPELLER_EXPORT void ImpellerSurfaceRelease | ( | ImpellerSurface IMPELLER_NULLABLE | surface | ) |

Release a previously retained reference to the object. The object can be NULL in which case this method is a no-op.

Parameters

  [in] | surface | The surface.

Referenced by main().

## ◆ ImpellerSurfaceRetain()

IMPELLER_EXPORT void ImpellerSurfaceRetain | ( | ImpellerSurface IMPELLER_NULLABLE | surface | ) |

Retain a strong reference to the object. The object can be NULL in which case this method is a no-op.

Parameters

  [in] | surface | The surface.

## ◆ ImpellerTextureCreateWithContentsNew()

IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerTexture IMPELLER_NULLABLE ImpellerTextureCreateWithContentsNew | ( | ImpellerContext IMPELLER_NONNULL | context,
|  | const ImpellerTextureDescriptor *IMPELLER_NONNULL | descriptor,
|  | const ImpellerMapping *IMPELLER_NONNULL | contents,
|  | void *IMPELLER_NULLABLE | contents_on_release_user_data
| ) |  |

Create a texture with decompressed bytes.

            Impeller will do its best to perform the transfer of this data
            to GPU memory with a minimal number of copies. Towards this
            end, it may need to send this data to a different thread for
            preparation and transfer. To facilitate this transfer, it is
            recommended that the content mapping have a release callback
            attach to it. When there is a release callback, Impeller assumes
            that collection of the data can be deferred till texture upload
            is done and can happen on a background thread. When there is no
            release callback, Impeller may try to perform an eager copy of
            the data if it needs to perform data preparation and transfer on
            a background thread.

            Whether an extra data copy actually occurs will always depend on
            the rendering backend in use. But it is best practice to provide
            a release callback and be resilient to the data being released
            in a deferred manner on a background thread.

Warning
  Do not supply compressed image data directly (PNG, JPEG, etc...). This function only works with tightly packed decompressed data.

Parameters

  [in] | context | The context.
  [in] | descriptor | The texture descriptor.
  [in] | contents | The contents.
  [in] | contents_on_release_user_data | The baton passes to the contents release callback if one exists.

Returns
  The texture if one can be created using the provided data, NULL otherwise.

## ◆ ImpellerTextureCreateWithOpenGLTextureHandleNew()

IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerTexture IMPELLER_NULLABLE ImpellerTextureCreateWithOpenGLTextureHandleNew | ( | ImpellerContext IMPELLER_NONNULL | context,
|  | const ImpellerTextureDescriptor *IMPELLER_NONNULL | descriptor,
|  | uint64_t | handle
| ) |  |

Create a texture with an externally created OpenGL texture handle.

Ownership of the handle is transferred over to Impeller after a successful call to this method. Impeller is responsible for calling glDeleteTextures on this handle. Do not collect this handle yourself as this will lead to a double-free.

The handle must be created in the same context as the one used by Impeller. If a different context is used, that context must be in the same sharegroup as Impellers OpenGL context and all synchronization of texture contents must already be complete.

If the context is not an OpenGL context, this call will always fail.

Parameters

  [in] | context | The context
  [in] | descriptor | The descriptor
  [in] | handle | The handle

Returns
  The texture if one could be created by adopting the supplied texture handle, NULL otherwise.

## ◆ ImpellerTextureGetOpenGLHandle()

IMPELLER_EXPORT uint64_t ImpellerTextureGetOpenGLHandle | ( | ImpellerTexture IMPELLER_NONNULL | texture | ) |

Get the OpenGL handle associated with this texture. If this is not an OpenGL texture, this method will always return 0.

OpenGL handles are lazily created, this method will return GL_NONE is no OpenGL handle is available. To ensure that this call eagerly creates an OpenGL texture, call this on a thread where Impeller knows there is an OpenGL context available.

Parameters

  [in] | texture | The texture.

Returns
  The OpenGL handle if one is available, GL_NONE otherwise.

## ◆ ImpellerTextureRelease()

IMPELLER_EXPORT void ImpellerTextureRelease | ( | ImpellerTexture IMPELLER_NULLABLE | texture | ) |

Release a previously retained reference to the object. The object can be NULL in which case this method is a no-op.

Parameters

  [in] | texture | The texture.

## ◆ ImpellerTextureRetain()

IMPELLER_EXPORT void ImpellerTextureRetain | ( | ImpellerTexture IMPELLER_NULLABLE | texture | ) |

Retain a strong reference to the object. The object can be NULL in which case this method is a no-op.

Parameters

  [in] | texture | The texture.

## ◆ ImpellerTypographyContextNew()

IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerTypographyContext IMPELLER_NULLABLE ImpellerTypographyContextNew | ( |  | ) |

Create a new typography contents.

Returns
  The typography context.

## ◆ ImpellerTypographyContextRegisterFont()

IMPELLER_EXPORT bool ImpellerTypographyContextRegisterFont | ( | ImpellerTypographyContext IMPELLER_NONNULL | context,
|  | const ImpellerMapping *IMPELLER_NONNULL | contents,
|  | void *IMPELLER_NULLABLE | contents_on_release_user_data,
|  | const char *IMPELLER_NULLABLE | family_name_alias
| ) |  |

Register a custom font.

            The following font formats are supported:
            * OpenType font collections (.ttc extension)
            * TrueType fonts: (.ttf extension)
            * OpenType fonts: (.otf extension)

Warning
  Web Open Font Formats (.woff and .woff2 extensions) are not supported.

The font data is specified as a mapping. It is possible for the release callback of the mapping to not be called even past the destruction of the typography context. Care must be taken to not collect the mapping till the release callback is invoked by Impeller.

The family alias name can be NULL. In such cases, the font family specified in paragraph styles must match the family that is specified in the font data.

If the family name alias is not NULL, that family name must be used in the paragraph style to reference glyphs from this font instead of the one encoded in the font itself.

Multiple fonts (with glyphs for different styles) can be specified with the same family.

See also
  `ImpellerParagraphStyleSetFontFamily`

Parameters

  [in] | context | The context.
  [in] | contents | The contents.
  [in] | contents_on_release_user_data | The user data baton to be passed to the contents release callback.
  [in] | family_name_alias | The family name alias or NULL if the one specified in the font data is to be used.

Returns
  If the font could be successfully registered.

## ◆ ImpellerTypographyContextRelease()

IMPELLER_EXPORT void ImpellerTypographyContextRelease | ( | ImpellerTypographyContext IMPELLER_NULLABLE | context | ) |

Release a previously retained reference to the object. The object can be NULL in which case this method is a no-op.

Parameters

  [in] | context | The typography context.

## ◆ ImpellerTypographyContextRetain()

IMPELLER_EXPORT void ImpellerTypographyContextRetain | ( | ImpellerTypographyContext IMPELLER_NULLABLE | context | ) |

Retain a strong reference to the object. The object can be NULL in which case this method is a no-op.

Parameters

  [in] | context | The typography context.