| 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 | ImpellerRange
struct | ImpellerMatrix
struct | ImpellerColorMatrix
struct | ImpellerRoundingRadii
struct | ImpellerColor
struct | ImpellerTextureDescriptor
struct | ImpellerMapping
struct | ImpellerContextVulkanSettings
struct | ImpellerContextVulkanInfo

## 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 3
#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 void *IMPELLER_NULLABLE(* | ImpellerVulkanProcAddressCallback) (void *IMPELLER_NULLABLE vulkan_instance, const char *IMPELLER_NONNULL vulkan_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 ImpellerRange | ImpellerRange
typedef struct ImpellerMatrix | ImpellerMatrix
typedef struct ImpellerColorMatrix | ImpellerColorMatrix
typedef struct ImpellerRoundingRadii | ImpellerRoundingRadii
typedef struct ImpellerColor | ImpellerColor
typedef struct ImpellerTextureDescriptor | ImpellerTextureDescriptor
typedef struct ImpellerMapping | ImpellerMapping
typedef struct ImpellerContextVulkanSettings | ImpellerContextVulkanSettings
typedef struct ImpellerContextVulkanInfo | ImpellerContextVulkanInfo

## 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 (ImpellerLineMetrics)
| IMPELLER_DEFINE_HANDLE (ImpellerGlyphInfo)
| IMPELLER_DEFINE_HANDLE (ImpellerPath)
| IMPELLER_DEFINE_HANDLE (ImpellerPathBuilder)
| IMPELLER_DEFINE_HANDLE (ImpellerSurface)
| IMPELLER_DEFINE_HANDLE (ImpellerTexture)
| IMPELLER_DEFINE_HANDLE (ImpellerVulkanSwapchain)
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 IMPELLER_NODISCARD ImpellerContext IMPELLER_NULLABLE | ImpellerContextCreateMetalNew (uint32_t version)
| Create a Metal context using the system default Metal device. More...
IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerContext IMPELLER_NULLABLE | ImpellerContextCreateVulkanNew (uint32_t version, const ImpellerContextVulkanSettings *IMPELLER_NONNULL settings)
| Create a Vulkan context using the provided Vulkan Settings. 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 bool | ImpellerContextGetVulkanInfo (ImpellerContext IMPELLER_NONNULL context, ImpellerContextVulkanInfo *IMPELLER_NONNULL out_vulkan_info)
| Get internal Vulkan handles managed by the given Vulkan context. Ownership of the handles is still maintained by Impeller. This accessor is just available so embedders can create resources using the same device and instance as Impeller for interop. More...
IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerVulkanSwapchain IMPELLER_NULLABLE | ImpellerVulkanSwapchainCreateNew (ImpellerContext IMPELLER_NONNULL context, void *IMPELLER_NONNULL vulkan_surface_khr)
| Create a new Vulkan swapchain using a VkSurfaceKHR instance. Ownership of the surface is transferred over to Impeller. The Vulkan instance the surface is created from must the same as the context provided. More...
IMPELLER_EXPORT void | ImpellerVulkanSwapchainRetain (ImpellerVulkanSwapchain IMPELLER_NULLABLE swapchain)
| 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 | ImpellerVulkanSwapchainRelease (ImpellerVulkanSwapchain IMPELLER_NULLABLE swapchain)
| 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 | ImpellerVulkanSwapchainAcquireNextSurfaceNew (ImpellerVulkanSwapchain IMPELLER_NONNULL swapchain)
| A potentially blocking operation, acquires the next surface to render to. Since this may block, surface acquisition must be delayed for as long as possible to avoid an idle wait on the CPU. More...
IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerSurface IMPELLER_NULLABLE | ImpellerSurfaceCreateWrappedFBONew (ImpellerContext IMPELLER_NONNULL context, uint64_t fbo, ImpellerPixelFormat format, const ImpellerISize *IMPELLER_NONNULL 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 IMPELLER_NODISCARD ImpellerSurface IMPELLER_NULLABLE | ImpellerSurfaceCreateWrappedMetalDrawableNew (ImpellerContext IMPELLER_NONNULL context, void *IMPELLER_NONNULL metal_drawable)
| Create a surface by wrapping a Metal drawable. This is useful during WSI when the drawable is the backing store of the Metal layer being drawn to. 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_NONNULL 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 bool | ImpellerSurfacePresent (ImpellerSurface IMPELLER_NONNULL surface)
| Present the surface to the underlying window system. 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 | ImpellerDisplayListBuilderDrawShadow (ImpellerDisplayListBuilder IMPELLER_NONNULL builder, ImpellerPath IMPELLER_NONNULL path, const ImpellerColor *IMPELLER_NONNULL color, float elevation, bool occluder_is_transparent, float device_pixel_ratio)
| Draw a shadow for a Path given a material elevation. If the occluding object is not opaque, additional hints (via the `occluder_is_transparent` argument) must be provided to render the shadow correctly. 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)
IMPELLER_EXPORT ImpellerRange | ImpellerParagraphGetWordBoundary (ImpellerParagraph IMPELLER_NONNULL paragraph, size_t code_unit_index)
| Get the range into the UTF-16 code unit buffer that represents the word at the specified caret location in the same buffer. More...
IMPELLER_EXPORT ImpellerLineMetrics IMPELLER_NULLABLE | ImpellerParagraphGetLineMetrics (ImpellerParagraph IMPELLER_NONNULL paragraph)
| Get the line metrics of this laid out paragraph. Calculating the line metrics is expensive. The first time line metrics are requested, they will be cached along with the paragraph (which is immutable). More...
IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerGlyphInfo IMPELLER_NULLABLE | ImpellerParagraphCreateGlyphInfoAtCodeUnitIndexNew (ImpellerParagraph IMPELLER_NONNULL paragraph, size_t code_unit_index)
| Create a new instance of glyph info that can be queried for information about the glyph at the given UTF-16 code unit index. The instance must be freed using `ImpellerGlyphInfoRelease`. More...
IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerGlyphInfo IMPELLER_NULLABLE | ImpellerParagraphCreateGlyphInfoAtParagraphCoordinatesNew (ImpellerParagraph IMPELLER_NONNULL paragraph, double x, double y)
| Create a new instance of glyph info that can be queried for information about the glyph closest to the specified coordinates relative to the origin of the paragraph. The instance must be freed using `ImpellerGlyphInfoRelease`. More...
IMPELLER_EXPORT void | ImpellerLineMetricsRetain (ImpellerLineMetrics IMPELLER_NULLABLE line_metrics)
| 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 | ImpellerLineMetricsRelease (ImpellerLineMetrics IMPELLER_NULLABLE line_metrics)
| 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 double | ImpellerLineMetricsGetUnscaledAscent (ImpellerLineMetrics IMPELLER_NONNULL metrics, size_t line)
| The rise from the baseline as calculated from the font and style for this line ignoring the height from the text style. More...
IMPELLER_EXPORT double | ImpellerLineMetricsGetAscent (ImpellerLineMetrics IMPELLER_NONNULL metrics, size_t line)
| The rise from the baseline as calculated from the font and style for this line. More...
IMPELLER_EXPORT double | ImpellerLineMetricsGetDescent (ImpellerLineMetrics IMPELLER_NONNULL metrics, size_t line)
| The drop from the baseline as calculated from the font and style for this line. More...
IMPELLER_EXPORT double | ImpellerLineMetricsGetBaseline (ImpellerLineMetrics IMPELLER_NONNULL metrics, size_t line)
| The y coordinate of the baseline for this line from the top of the paragraph. More...
IMPELLER_EXPORT bool | ImpellerLineMetricsIsHardbreak (ImpellerLineMetrics IMPELLER_NONNULL metrics, size_t line)
| Used to determine if this line ends with an explicit line break (e.g. ' ') or is the end of the paragraph. More...
IMPELLER_EXPORT double | ImpellerLineMetricsGetWidth (ImpellerLineMetrics IMPELLER_NONNULL metrics, size_t line)
| Width of the line from the left edge of the leftmost glyph to the right edge of the rightmost glyph. More...
IMPELLER_EXPORT double | ImpellerLineMetricsGetHeight (ImpellerLineMetrics IMPELLER_NONNULL metrics, size_t line)
| Total height of the line from the top edge to the bottom edge. More...
IMPELLER_EXPORT double | ImpellerLineMetricsGetLeft (ImpellerLineMetrics IMPELLER_NONNULL metrics, size_t line)
| The x coordinate of left edge of the line. More...
IMPELLER_EXPORT size_t | ImpellerLineMetricsGetCodeUnitStartIndex (ImpellerLineMetrics IMPELLER_NONNULL metrics, size_t line)
| Fetch the start index in the buffer of UTF-16 code units used to represent the paragraph line. More...
IMPELLER_EXPORT size_t | ImpellerLineMetricsGetCodeUnitEndIndex (ImpellerLineMetrics IMPELLER_NONNULL metrics, size_t line)
| Fetch the end index in the buffer of UTF-16 code units used to represent the paragraph line. More...
IMPELLER_EXPORT size_t | ImpellerLineMetricsGetCodeUnitEndIndexExcludingWhitespace (ImpellerLineMetrics IMPELLER_NONNULL metrics, size_t line)
| Fetch the end index (excluding whitespace) in the buffer of UTF-16 code units used to represent the paragraph line. More...
IMPELLER_EXPORT size_t | ImpellerLineMetricsGetCodeUnitEndIndexIncludingNewline (ImpellerLineMetrics IMPELLER_NONNULL metrics, size_t line)
| Fetch the end index (including newlines) in the buffer of UTF-16 code units used to represent the paragraph line. More...
IMPELLER_EXPORT void | ImpellerGlyphInfoRetain (ImpellerGlyphInfo IMPELLER_NULLABLE glyph_info)
| 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 | ImpellerGlyphInfoRelease (ImpellerGlyphInfo IMPELLER_NULLABLE glyph_info)
| 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 size_t | ImpellerGlyphInfoGetGraphemeClusterCodeUnitRangeBegin (ImpellerGlyphInfo IMPELLER_NONNULL glyph_info)
| Fetch the start index in the buffer of UTF-16 code units used to represent the grapheme cluster for a glyph. More...
IMPELLER_EXPORT size_t | ImpellerGlyphInfoGetGraphemeClusterCodeUnitRangeEnd (ImpellerGlyphInfo IMPELLER_NONNULL glyph_info)
| Fetch the end index in the buffer of UTF-16 code units used to represent the grapheme cluster for a glyph. More...
IMPELLER_EXPORT ImpellerRect | ImpellerGlyphInfoGetGraphemeClusterBounds (ImpellerGlyphInfo IMPELLER_NONNULL glyph_info)
| Fetch the bounds of the grapheme cluster for the glyph in the coordinate space of the paragraph. More...
IMPELLER_EXPORT bool | ImpellerGlyphInfoIsEllipsis (ImpellerGlyphInfo IMPELLER_NONNULL glyph_info)
IMPELLER_EXPORT ImpellerTextDirection | ImpellerGlyphInfoGetTextDirection (ImpellerGlyphInfo IMPELLER_NONNULL glyph_info)

## Macro Definition Documentation

## ◆ IMPELLER_DEFINE_HANDLE

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

Definition at line 142 of file impeller.h.

## ◆ IMPELLER_EXPORT

#define IMPELLER_EXPORT IMPELLER_EXPORT_DECORATION

Definition at line 48 of file impeller.h.

## ◆ IMPELLER_EXPORT_DECORATION

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

Definition at line 44 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 36 of file impeller.h.

## ◆ IMPELLER_EXTERN_C_BEGIN

#define IMPELLER_EXTERN_C_BEGIN

Definition at line 37 of file impeller.h.

## ◆ IMPELLER_EXTERN_C_END

#define IMPELLER_EXTERN_C_END

Definition at line 38 of file impeller.h.

## ◆ IMPELLER_INTERNAL_HANDLE_NAME

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

Definition at line 141 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 79 of file impeller.h.

## ◆ IMPELLER_NODISCARD

#define IMPELLER_NODISCARD

Definition at line 64 of file impeller.h.

## ◆ IMPELLER_NONNULL

#define IMPELLER_NONNULL

Definition at line 58 of file impeller.h.

## ◆ IMPELLER_NULLABLE

#define IMPELLER_NULLABLE

Definition at line 57 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:83
IMPELLER_MAKE_VERSION
#define IMPELLER_MAKE_VERSION(variant, major, minor, patch)
Pack a version in a uint32_t.
Definition: impeller.h:79
IMPELLER_VERSION_PATCH
#define IMPELLER_VERSION_PATCH
Definition: impeller.h:86
IMPELLER_VERSION_MINOR
#define IMPELLER_VERSION_MINOR
Definition: impeller.h:85
IMPELLER_VERSION_MAJOR
#define IMPELLER_VERSION_MAJOR
Definition: impeller.h:84

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 103 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 119 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 127 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 135 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 112 of file impeller.h.

## ◆ IMPELLER_VERSION_MAJOR

#define IMPELLER_VERSION_MAJOR 1

Definition at line 84 of file impeller.h.

## ◆ IMPELLER_VERSION_MINOR

#define IMPELLER_VERSION_MINOR 3

Definition at line 85 of file impeller.h.

## ◆ IMPELLER_VERSION_PATCH

#define IMPELLER_VERSION_PATCH 0

Definition at line 86 of file impeller.h.

## ◆ IMPELLER_VERSION_VARIANT

#define IMPELLER_VERSION_VARIANT 1

Definition at line 83 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 329 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

## ◆ ImpellerContextVulkanInfo

typedef struct ImpellerContextVulkanInfo ImpellerContextVulkanInfo

## ◆ ImpellerContextVulkanSettings

typedef struct ImpellerContextVulkanSettings ImpellerContextVulkanSettings

## ◆ 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 338 of file impeller.h.

## ◆ ImpellerRange

typedef struct ImpellerRange ImpellerRange

## ◆ 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

## ◆ ImpellerVulkanProcAddressCallback

typedef void* IMPELLER_NULLABLE(* ImpellerVulkanProcAddressCallback) (void *IMPELLER_NULLABLE vulkan_instance, const char *IMPELLER_NONNULL vulkan_proc_name, void *IMPELLER_NULLABLE user_data)

A callback used by Impeller to allow the user to resolve Vulkan function pointers. A user supplied baton that is uninterpreted by Impeller is passed back to the user in the callback.

Definition at line 347 of file impeller.h.

## 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 365 of file impeller.h.

365 {
366 kImpellerBlendModeClear,
367 kImpellerBlendModeSource,
368 kImpellerBlendModeDestination,
369 kImpellerBlendModeSourceOver,
370 kImpellerBlendModeDestinationOver,
371 kImpellerBlendModeSourceIn,
372 kImpellerBlendModeDestinationIn,
373 kImpellerBlendModeSourceOut,
374 kImpellerBlendModeDestinationOut,
375 kImpellerBlendModeSourceATop,
376 kImpellerBlendModeDestinationATop,
377 kImpellerBlendModeXor,
378 kImpellerBlendModePlus,
379 kImpellerBlendModeModulate,
380 kImpellerBlendModeScreen,
381 kImpellerBlendModeOverlay,
382 kImpellerBlendModeDarken,
383 kImpellerBlendModeLighten,
384 kImpellerBlendModeColorDodge,
385 kImpellerBlendModeColorBurn,
386 kImpellerBlendModeHardLight,
387 kImpellerBlendModeSoftLight,
388 kImpellerBlendModeDifference,
389 kImpellerBlendModeExclusion,
390 kImpellerBlendModeMultiply,
391 kImpellerBlendModeHue,
392 kImpellerBlendModeSaturation,
393 kImpellerBlendModeColor,
394 kImpellerBlendModeLuminosity,
395 } ImpellerBlendMode;
ImpellerBlendMode
ImpellerBlendMode
Definition: impeller.h:365
kImpellerBlendModeSaturation
@ kImpellerBlendModeSaturation
Definition: impeller.h:392
kImpellerBlendModeSoftLight
@ kImpellerBlendModeSoftLight
Definition: impeller.h:387
kImpellerBlendModeHardLight
@ kImpellerBlendModeHardLight
Definition: impeller.h:386
kImpellerBlendModeLuminosity
@ kImpellerBlendModeLuminosity
Definition: impeller.h:394
kImpellerBlendModeLighten
@ kImpellerBlendModeLighten
Definition: impeller.h:383
kImpellerBlendModeModulate
@ kImpellerBlendModeModulate
Definition: impeller.h:379
kImpellerBlendModeSourceIn
@ kImpellerBlendModeSourceIn
Definition: impeller.h:371
kImpellerBlendModeDifference
@ kImpellerBlendModeDifference
Definition: impeller.h:388
kImpellerBlendModeClear
@ kImpellerBlendModeClear
Definition: impeller.h:366
kImpellerBlendModeColor
@ kImpellerBlendModeColor
Definition: impeller.h:393
kImpellerBlendModeMultiply
@ kImpellerBlendModeMultiply
Definition: impeller.h:390
kImpellerBlendModeSourceATop
@ kImpellerBlendModeSourceATop
Definition: impeller.h:375
kImpellerBlendModeDestinationOut
@ kImpellerBlendModeDestinationOut
Definition: impeller.h:374
kImpellerBlendModeScreen
@ kImpellerBlendModeScreen
Definition: impeller.h:380
kImpellerBlendModeExclusion
@ kImpellerBlendModeExclusion
Definition: impeller.h:389
kImpellerBlendModeColorBurn
@ kImpellerBlendModeColorBurn
Definition: impeller.h:385
kImpellerBlendModeDarken
@ kImpellerBlendModeDarken
Definition: impeller.h:382
kImpellerBlendModePlus
@ kImpellerBlendModePlus
Definition: impeller.h:378
kImpellerBlendModeOverlay
@ kImpellerBlendModeOverlay
Definition: impeller.h:381
kImpellerBlendModeDestinationIn
@ kImpellerBlendModeDestinationIn
Definition: impeller.h:372
kImpellerBlendModeDestinationATop
@ kImpellerBlendModeDestinationATop
Definition: impeller.h:376
kImpellerBlendModeDestination
@ kImpellerBlendModeDestination
Definition: impeller.h:368
kImpellerBlendModeSourceOver
@ kImpellerBlendModeSourceOver
Definition: impeller.h:369
kImpellerBlendModeXor
@ kImpellerBlendModeXor
Definition: impeller.h:377
kImpellerBlendModeColorDodge
@ kImpellerBlendModeColorDodge
Definition: impeller.h:384
kImpellerBlendModeDestinationOver
@ kImpellerBlendModeDestinationOver
Definition: impeller.h:370
kImpellerBlendModeSource
@ kImpellerBlendModeSource
Definition: impeller.h:367
kImpellerBlendModeSourceOut
@ kImpellerBlendModeSourceOut
Definition: impeller.h:373
kImpellerBlendModeHue
@ kImpellerBlendModeHue
Definition: impeller.h:391

## ◆ ImpellerBlurStyle

enum ImpellerBlurStyle

Enumerator
kImpellerBlurStyleNormal |
kImpellerBlurStyleSolid |
kImpellerBlurStyleOuter |
kImpellerBlurStyleInner |

Definition at line 431 of file impeller.h.

431 {
432 kImpellerBlurStyleNormal,
433 kImpellerBlurStyleSolid,
434 kImpellerBlurStyleOuter,
435 kImpellerBlurStyleInner,
436 } ImpellerBlurStyle;
ImpellerBlurStyle
ImpellerBlurStyle
Definition: impeller.h:431
kImpellerBlurStyleNormal
@ kImpellerBlurStyleNormal
Definition: impeller.h:432
kImpellerBlurStyleOuter
@ kImpellerBlurStyleOuter
Definition: impeller.h:434
kImpellerBlurStyleInner
@ kImpellerBlurStyleInner
Definition: impeller.h:435
kImpellerBlurStyleSolid
@ kImpellerBlurStyleSolid
Definition: impeller.h:433

## ◆ ImpellerClipOperation

enum ImpellerClipOperation

Enumerator
kImpellerClipOperationDifference |
kImpellerClipOperationIntersect |

Definition at line 360 of file impeller.h.

360 {
361 kImpellerClipOperationDifference,
362 kImpellerClipOperationIntersect,
363 } ImpellerClipOperation;
ImpellerClipOperation
ImpellerClipOperation
Definition: impeller.h:360
kImpellerClipOperationIntersect
@ kImpellerClipOperationIntersect
Definition: impeller.h:362
kImpellerClipOperationDifference
@ kImpellerClipOperationDifference
Definition: impeller.h:361

## ◆ ImpellerColorSpace

enum ImpellerColorSpace

Enumerator
kImpellerColorSpaceSRGB |
kImpellerColorSpaceExtendedSRGB |
kImpellerColorSpaceDisplayP3 |

Definition at line 438 of file impeller.h.

438 {
439 kImpellerColorSpaceSRGB,
440 kImpellerColorSpaceExtendedSRGB,
441 kImpellerColorSpaceDisplayP3,
442 } ImpellerColorSpace;
ImpellerColorSpace
ImpellerColorSpace
Definition: impeller.h:438
kImpellerColorSpaceExtendedSRGB
@ kImpellerColorSpaceExtendedSRGB
Definition: impeller.h:440
kImpellerColorSpaceSRGB
@ kImpellerColorSpaceSRGB
Definition: impeller.h:439
kImpellerColorSpaceDisplayP3
@ kImpellerColorSpaceDisplayP3
Definition: impeller.h:441

## ◆ ImpellerDrawStyle

enum ImpellerDrawStyle

Enumerator
kImpellerDrawStyleFill |
kImpellerDrawStyleStroke |
kImpellerDrawStyleStrokeAndFill |

Definition at line 397 of file impeller.h.

397 {
398 kImpellerDrawStyleFill,
399 kImpellerDrawStyleStroke,
400 kImpellerDrawStyleStrokeAndFill,
401 } ImpellerDrawStyle;
ImpellerDrawStyle
ImpellerDrawStyle
Definition: impeller.h:397
kImpellerDrawStyleStroke
@ kImpellerDrawStyleStroke
Definition: impeller.h:399
kImpellerDrawStyleFill
@ kImpellerDrawStyleFill
Definition: impeller.h:398
kImpellerDrawStyleStrokeAndFill
@ kImpellerDrawStyleStrokeAndFill
Definition: impeller.h:400

## ◆ ImpellerFillType

enum ImpellerFillType

Enumerator
kImpellerFillTypeNonZero |
kImpellerFillTypeOdd |

Definition at line 355 of file impeller.h.

355 {
356 kImpellerFillTypeNonZero,
357 kImpellerFillTypeOdd,
358 } ImpellerFillType;
ImpellerFillType
ImpellerFillType
Definition: impeller.h:355
kImpellerFillTypeOdd
@ kImpellerFillTypeOdd
Definition: impeller.h:357
kImpellerFillTypeNonZero
@ kImpellerFillTypeNonZero
Definition: impeller.h:356

## ◆ ImpellerFontStyle

enum ImpellerFontStyle

Enumerator
kImpellerFontStyleNormal |
kImpellerFontStyleItalic |

Definition at line 456 of file impeller.h.

456 {
457 kImpellerFontStyleNormal,
458 kImpellerFontStyleItalic,
459 } ImpellerFontStyle;
ImpellerFontStyle
ImpellerFontStyle
Definition: impeller.h:456
kImpellerFontStyleItalic
@ kImpellerFontStyleItalic
Definition: impeller.h:458
kImpellerFontStyleNormal
@ kImpellerFontStyleNormal
Definition: impeller.h:457

## ◆ ImpellerFontWeight

enum ImpellerFontWeight

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

Definition at line 444 of file impeller.h.

444 {
445 kImpellerFontWeight100, // Thin
446 kImpellerFontWeight200, // Extra-Light
447 kImpellerFontWeight300, // Light
448 kImpellerFontWeight400, // Normal/Regular
449 kImpellerFontWeight500, // Medium
450 kImpellerFontWeight600, // Semi-bold
451 kImpellerFontWeight700, // Bold
452 kImpellerFontWeight800, // Extra-Bold
453 kImpellerFontWeight900, // Black
454 } ImpellerFontWeight;
ImpellerFontWeight
ImpellerFontWeight
Definition: impeller.h:444
kImpellerFontWeight400
@ kImpellerFontWeight400
Definition: impeller.h:448
kImpellerFontWeight500
@ kImpellerFontWeight500
Definition: impeller.h:449
kImpellerFontWeight700
@ kImpellerFontWeight700
Definition: impeller.h:451
kImpellerFontWeight200
@ kImpellerFontWeight200
Definition: impeller.h:446
kImpellerFontWeight300
@ kImpellerFontWeight300
Definition: impeller.h:447
kImpellerFontWeight900
@ kImpellerFontWeight900
Definition: impeller.h:453
kImpellerFontWeight800
@ kImpellerFontWeight800
Definition: impeller.h:452
kImpellerFontWeight600
@ kImpellerFontWeight600
Definition: impeller.h:450
kImpellerFontWeight100
@ kImpellerFontWeight100
Definition: impeller.h:445

## ◆ ImpellerPixelFormat

enum ImpellerPixelFormat

Enumerator
kImpellerPixelFormatRGBA8888 |

Definition at line 415 of file impeller.h.

415 {
416 kImpellerPixelFormatRGBA8888,
417 } ImpellerPixelFormat;
ImpellerPixelFormat
ImpellerPixelFormat
Definition: impeller.h:415
kImpellerPixelFormatRGBA8888
@ kImpellerPixelFormatRGBA8888
Definition: impeller.h:416

## ◆ ImpellerStrokeCap

enum ImpellerStrokeCap

Enumerator
kImpellerStrokeCapButt |
kImpellerStrokeCapRound |
kImpellerStrokeCapSquare |

Definition at line 403 of file impeller.h.

403 {
404 kImpellerStrokeCapButt,
405 kImpellerStrokeCapRound,
406 kImpellerStrokeCapSquare,
407 } ImpellerStrokeCap;
ImpellerStrokeCap
ImpellerStrokeCap
Definition: impeller.h:403
kImpellerStrokeCapButt
@ kImpellerStrokeCapButt
Definition: impeller.h:404
kImpellerStrokeCapRound
@ kImpellerStrokeCapRound
Definition: impeller.h:405
kImpellerStrokeCapSquare
@ kImpellerStrokeCapSquare
Definition: impeller.h:406

## ◆ ImpellerStrokeJoin

enum ImpellerStrokeJoin

Enumerator
kImpellerStrokeJoinMiter |
kImpellerStrokeJoinRound |
kImpellerStrokeJoinBevel |

Definition at line 409 of file impeller.h.

409 {
410 kImpellerStrokeJoinMiter,
411 kImpellerStrokeJoinRound,
412 kImpellerStrokeJoinBevel,
413 } ImpellerStrokeJoin;
ImpellerStrokeJoin
ImpellerStrokeJoin
Definition: impeller.h:409
kImpellerStrokeJoinRound
@ kImpellerStrokeJoinRound
Definition: impeller.h:411
kImpellerStrokeJoinBevel
@ kImpellerStrokeJoinBevel
Definition: impeller.h:412
kImpellerStrokeJoinMiter
@ kImpellerStrokeJoinMiter
Definition: impeller.h:410

## ◆ ImpellerTextAlignment

enum ImpellerTextAlignment

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

Definition at line 461 of file impeller.h.

461 {
462 kImpellerTextAlignmentLeft,
463 kImpellerTextAlignmentRight,
464 kImpellerTextAlignmentCenter,
465 kImpellerTextAlignmentJustify,
466 kImpellerTextAlignmentStart,
467 kImpellerTextAlignmentEnd,
468 } ImpellerTextAlignment;
ImpellerTextAlignment
ImpellerTextAlignment
Definition: impeller.h:461
kImpellerTextAlignmentJustify
@ kImpellerTextAlignmentJustify
Definition: impeller.h:465
kImpellerTextAlignmentLeft
@ kImpellerTextAlignmentLeft
Definition: impeller.h:462
kImpellerTextAlignmentCenter
@ kImpellerTextAlignmentCenter
Definition: impeller.h:464
kImpellerTextAlignmentRight
@ kImpellerTextAlignmentRight
Definition: impeller.h:463
kImpellerTextAlignmentStart
@ kImpellerTextAlignmentStart
Definition: impeller.h:466
kImpellerTextAlignmentEnd
@ kImpellerTextAlignmentEnd
Definition: impeller.h:467

## ◆ ImpellerTextDirection

enum ImpellerTextDirection

Enumerator
kImpellerTextDirectionRTL |
kImpellerTextDirectionLTR |

Definition at line 470 of file impeller.h.

470 {
471 kImpellerTextDirectionRTL,
472 kImpellerTextDirectionLTR,
473 } ImpellerTextDirection;
ImpellerTextDirection
ImpellerTextDirection
Definition: impeller.h:470
kImpellerTextDirectionLTR
@ kImpellerTextDirectionLTR
Definition: impeller.h:472
kImpellerTextDirectionRTL
@ kImpellerTextDirectionRTL
Definition: impeller.h:471

## ◆ ImpellerTextureSampling

enum ImpellerTextureSampling

Enumerator
kImpellerTextureSamplingNearestNeighbor |
kImpellerTextureSamplingLinear |

Definition at line 419 of file impeller.h.

419 {
420 kImpellerTextureSamplingNearestNeighbor,
421 kImpellerTextureSamplingLinear,
422 } ImpellerTextureSampling;
ImpellerTextureSampling
ImpellerTextureSampling
Definition: impeller.h:419
kImpellerTextureSamplingNearestNeighbor
@ kImpellerTextureSamplingNearestNeighbor
Definition: impeller.h:420
kImpellerTextureSamplingLinear
@ kImpellerTextureSamplingLinear
Definition: impeller.h:421

## ◆ ImpellerTileMode

enum ImpellerTileMode

Enumerator
kImpellerTileModeClamp |
kImpellerTileModeRepeat |
kImpellerTileModeMirror |
kImpellerTileModeDecal |

Definition at line 424 of file impeller.h.

424 {
425 kImpellerTileModeClamp,
426 kImpellerTileModeRepeat,
427 kImpellerTileModeMirror,
428 kImpellerTileModeDecal,
429 } ImpellerTileMode;
ImpellerTileMode
ImpellerTileMode
Definition: impeller.h:424
kImpellerTileModeMirror
@ kImpellerTileModeMirror
Definition: impeller.h:427
kImpellerTileModeClamp
@ kImpellerTileModeClamp
Definition: impeller.h:425
kImpellerTileModeRepeat
@ kImpellerTileModeRepeat
Definition: impeller.h:426
kImpellerTileModeDecal
@ kImpellerTileModeDecal
Definition: impeller.h:428

## Function Documentation

## ◆ IMPELLER_DEFINE_HANDLE() [1/19]

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/19]

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/19]

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/19]

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/19]

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/19]

IMPELLER_DEFINE_HANDLE | ( | ImpellerGlyphInfo |  | ) |

Describes the metrics of glyphs in a paragraph line.

## ◆ IMPELLER_DEFINE_HANDLE() [7/19]

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() [8/19]

IMPELLER_DEFINE_HANDLE | ( | ImpellerLineMetrics |  | ) |

Describes the metrics of lines in a fully laid out paragraph.

Regardless of how the string of text is specified to the paragraph builder, offsets into buffers that are returned by line metrics are always assumed to be into buffers of UTF-16 code units.

## ◆ IMPELLER_DEFINE_HANDLE() [9/19]

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() [10/19]

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() [11/19]

IMPELLER_DEFINE_HANDLE | ( | ImpellerParagraph |  | ) |

An immutable, fully laid out paragraph.

## ◆ IMPELLER_DEFINE_HANDLE() [12/19]

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() [13/19]

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() [14/19]

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() [15/19]

IMPELLER_DEFINE_HANDLE | ( | ImpellerPathBuilder |  | ) |

Path builders allow for the incremental building up of paths.

## ◆ IMPELLER_DEFINE_HANDLE() [16/19]

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() [17/19]

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() [18/19]

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.

## ◆ IMPELLER_DEFINE_HANDLE() [19/19]

IMPELLER_DEFINE_HANDLE | ( | ImpellerVulkanSwapchain |  | ) |

The primary form of WSI when using a Vulkan context, these swapchains use the `VK_KHR_surface` Vulkan extension.

Creating a swapchain is extremely expensive. One must be created at application startup and re-used throughout the application lifecycle.

Swapchains are resilient to the underlying surfaces being resized. The swapchain images will be re-created as necessary on-demand.

## ◆ 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.

## ◆ ImpellerContextCreateMetalNew()

IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerContext IMPELLER_NULLABLE ImpellerContextCreateMetalNew | ( | uint32_t | version | ) |

Create a Metal context using the system default Metal device.

Parameters

  [in] | version | The version specified in the IMPELLER_VERSION macro.

Returns
  The Metal context or NULL if one cannot be created.

Referenced by main().

## ◆ 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().

## ◆ ImpellerContextCreateVulkanNew()

IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerContext IMPELLER_NULLABLE ImpellerContextCreateVulkanNew | ( | uint32_t | version,
|  | const ImpellerContextVulkanSettings *IMPELLER_NONNULL | settings
| ) |  |

Create a Vulkan context using the provided Vulkan Settings.

Parameters

  [in] | version | The version specified in the IMPELLER_VERSION macro.
  [in] | settings | The Vulkan settings.

Returns
  The Vulkan context or NULL if one cannot be created.

Referenced by main().

## ◆ ImpellerContextGetVulkanInfo()

IMPELLER_EXPORT bool ImpellerContextGetVulkanInfo | ( | ImpellerContext IMPELLER_NONNULL | context,
|  | ImpellerContextVulkanInfo *IMPELLER_NONNULL | out_vulkan_info
| ) |  |

Get internal Vulkan handles managed by the given Vulkan context. Ownership of the handles is still maintained by Impeller. This accessor is just available so embedders can create resources using the same device and instance as Impeller for interop.

Warning
  If the context is not a Vulkan context, False is returned with the [out] argument unaffected.

Parameters

  [in] | context | The context
  [out] | out_vulkan_info | The out vulkan information

Returns
  If the Vulkan info could be fetched from the context.

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.

## ◆ ImpellerDisplayListBuilderDrawShadow()

IMPELLER_EXPORT void ImpellerDisplayListBuilderDrawShadow | ( | ImpellerDisplayListBuilder IMPELLER_NONNULL | builder,
|  | ImpellerPath IMPELLER_NONNULL | path,
|  | const ImpellerColor *IMPELLER_NONNULL | color,
|  | float | elevation,
|  | bool | occluder_is_transparent,
|  | float | device_pixel_ratio
| ) |  |

Draw a shadow for a Path given a material elevation. If the occluding object is not opaque, additional hints (via the `occluder_is_transparent` argument) must be provided to render the shadow correctly.

Parameters

  [in] | builder | The builder.
  [in] | path | The shadow path.
  [in] | color | The shadow color.
  [in] | elevation | The material elevation.
  [in] | occluder_is_transparent | If the object casting the shadow is transparent.
  [in] | device_pixel_ratio | The device pixel ratio.

## ◆ 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.

## ◆ ImpellerGlyphInfoGetGraphemeClusterBounds()

IMPELLER_EXPORT ImpellerRect ImpellerGlyphInfoGetGraphemeClusterBounds | ( | ImpellerGlyphInfo IMPELLER_NONNULL | glyph_info | ) |

Fetch the bounds of the grapheme cluster for the glyph in the coordinate space of the paragraph.

Parameters

  [in] | glyph_info | The glyph information.

Returns
  The grapheme cluster bounds.

## ◆ ImpellerGlyphInfoGetGraphemeClusterCodeUnitRangeBegin()

IMPELLER_EXPORT size_t ImpellerGlyphInfoGetGraphemeClusterCodeUnitRangeBegin | ( | ImpellerGlyphInfo IMPELLER_NONNULL | glyph_info | ) |

Fetch the start index in the buffer of UTF-16 code units used to represent the grapheme cluster for a glyph.

Parameters

  [in] | glyph_info | The glyph information.

Returns
  The UTF-16 code units start index.

## ◆ ImpellerGlyphInfoGetGraphemeClusterCodeUnitRangeEnd()

IMPELLER_EXPORT size_t ImpellerGlyphInfoGetGraphemeClusterCodeUnitRangeEnd | ( | ImpellerGlyphInfo IMPELLER_NONNULL | glyph_info | ) |

Fetch the end index in the buffer of UTF-16 code units used to represent the grapheme cluster for a glyph.

Parameters

  [in] | glyph_info | The glyph information.

Returns
  The UTF-16 code units end index.

## ◆ ImpellerGlyphInfoGetTextDirection()

IMPELLER_EXPORT ImpellerTextDirection ImpellerGlyphInfoGetTextDirection | ( | ImpellerGlyphInfo IMPELLER_NONNULL | glyph_info | ) |

Parameters

  [in] | glyph_info | The glyph information.

Returns
  The direction of the run that contains the glyph.

## ◆ ImpellerGlyphInfoIsEllipsis()

IMPELLER_EXPORT bool ImpellerGlyphInfoIsEllipsis | ( | ImpellerGlyphInfo IMPELLER_NONNULL | glyph_info | ) |

Parameters

  [in] | glyph_info | The glyph information.

Returns
  True if the glyph represents an ellipsis. False otherwise.

## ◆ ImpellerGlyphInfoRelease()

IMPELLER_EXPORT void ImpellerGlyphInfoRelease | ( | ImpellerGlyphInfo IMPELLER_NULLABLE | glyph_info | ) |

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

Parameters

  [in] | glyph_info | The glyph information.

## ◆ ImpellerGlyphInfoRetain()

IMPELLER_EXPORT void ImpellerGlyphInfoRetain | ( | ImpellerGlyphInfo IMPELLER_NULLABLE | glyph_info | ) |

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

Parameters

  [in] | glyph_info | The glyph information.

## ◆ 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.

## ◆ ImpellerLineMetricsGetAscent()

IMPELLER_EXPORT double ImpellerLineMetricsGetAscent | ( | ImpellerLineMetrics IMPELLER_NONNULL | metrics,
|  | size_t | line
| ) |  |

The rise from the baseline as calculated from the font and style for this line.

Parameters

  [in] | metrics | The metrics.
  [in] | line | The line index (zero based).

Returns
  The ascent.

## ◆ ImpellerLineMetricsGetBaseline()

IMPELLER_EXPORT double ImpellerLineMetricsGetBaseline | ( | ImpellerLineMetrics IMPELLER_NONNULL | metrics,
|  | size_t | line
| ) |  |

The y coordinate of the baseline for this line from the top of the paragraph.

Parameters

  [in] | metrics | The metrics.
  [in] | line | The line index (zero based).

Returns
  The baseline.

## ◆ ImpellerLineMetricsGetCodeUnitEndIndex()

IMPELLER_EXPORT size_t ImpellerLineMetricsGetCodeUnitEndIndex | ( | ImpellerLineMetrics IMPELLER_NONNULL | metrics,
|  | size_t | line
| ) |  |

Fetch the end index in the buffer of UTF-16 code units used to represent the paragraph line.

Parameters

  [in] | metrics | The metrics.
  [in] | line | The line index (zero based).

Returns
  The UTF-16 code units end index.

## ◆ ImpellerLineMetricsGetCodeUnitEndIndexExcludingWhitespace()

IMPELLER_EXPORT size_t ImpellerLineMetricsGetCodeUnitEndIndexExcludingWhitespace | ( | ImpellerLineMetrics IMPELLER_NONNULL | metrics,
|  | size_t | line
| ) |  |

Fetch the end index (excluding whitespace) in the buffer of UTF-16 code units used to represent the paragraph line.

Parameters

  [in] | metrics | The metrics.
  [in] | line | The line index (zero based).

Returns
  The UTF-16 code units end index excluding whitespace.

## ◆ ImpellerLineMetricsGetCodeUnitEndIndexIncludingNewline()

IMPELLER_EXPORT size_t ImpellerLineMetricsGetCodeUnitEndIndexIncludingNewline | ( | ImpellerLineMetrics IMPELLER_NONNULL | metrics,
|  | size_t | line
| ) |  |

Fetch the end index (including newlines) in the buffer of UTF-16 code units used to represent the paragraph line.

Parameters

  [in] | metrics | The metrics.
  [in] | line | The line index (zero based).

Returns
  The UTF-16 code units end index including newlines.

## ◆ ImpellerLineMetricsGetCodeUnitStartIndex()

IMPELLER_EXPORT size_t ImpellerLineMetricsGetCodeUnitStartIndex | ( | ImpellerLineMetrics IMPELLER_NONNULL | metrics,
|  | size_t | line
| ) |  |

Fetch the start index in the buffer of UTF-16 code units used to represent the paragraph line.

Parameters

  [in] | metrics | The metrics.
  [in] | line | The line index (zero based).

Returns
  The UTF-16 code units start index.

## ◆ ImpellerLineMetricsGetDescent()

IMPELLER_EXPORT double ImpellerLineMetricsGetDescent | ( | ImpellerLineMetrics IMPELLER_NONNULL | metrics,
|  | size_t | line
| ) |  |

The drop from the baseline as calculated from the font and style for this line.

Parameters

  [in] | metrics | The metrics.
  [in] | line | The line index (zero based).

Returns
  The descent.

## ◆ ImpellerLineMetricsGetHeight()

IMPELLER_EXPORT double ImpellerLineMetricsGetHeight | ( | ImpellerLineMetrics IMPELLER_NONNULL | metrics,
|  | size_t | line
| ) |  |

Total height of the line from the top edge to the bottom edge.

Parameters

  [in] | metrics | The metrics.
  [in] | line | The line index (zero based).

Returns
  The height.

## ◆ ImpellerLineMetricsGetLeft()

IMPELLER_EXPORT double ImpellerLineMetricsGetLeft | ( | ImpellerLineMetrics IMPELLER_NONNULL | metrics,
|  | size_t | line
| ) |  |

The x coordinate of left edge of the line.

Parameters

  [in] | metrics | The metrics.
  [in] | line | The line index (zero based).

Returns
  The left edge coordinate.

## ◆ ImpellerLineMetricsGetUnscaledAscent()

IMPELLER_EXPORT double ImpellerLineMetricsGetUnscaledAscent | ( | ImpellerLineMetrics IMPELLER_NONNULL | metrics,
|  | size_t | line
| ) |  |

The rise from the baseline as calculated from the font and style for this line ignoring the height from the text style.

Parameters

  [in] | metrics | The metrics.
  [in] | line | The line index (zero based).

Returns
  The unscaled ascent.

## ◆ ImpellerLineMetricsGetWidth()

IMPELLER_EXPORT double ImpellerLineMetricsGetWidth | ( | ImpellerLineMetrics IMPELLER_NONNULL | metrics,
|  | size_t | line
| ) |  |

Width of the line from the left edge of the leftmost glyph to the right edge of the rightmost glyph.

Parameters

  [in] | metrics | The metrics.
  [in] | line | The line index (zero based).

Returns
  The width.

## ◆ ImpellerLineMetricsIsHardbreak()

IMPELLER_EXPORT bool ImpellerLineMetricsIsHardbreak | ( | ImpellerLineMetrics IMPELLER_NONNULL | metrics,
|  | size_t | line
| ) |  |

Used to determine if this line ends with an explicit line break (e.g. '
') or is the end of the paragraph.

Parameters

  [in] | metrics | The metrics.
  [in] | line | The line index (zero based).

Returns
  True if the line is a hard break.

## ◆ ImpellerLineMetricsRelease()

IMPELLER_EXPORT void ImpellerLineMetricsRelease | ( | ImpellerLineMetrics IMPELLER_NULLABLE | line_metrics | ) |

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

Parameters

  [in] | line_metrics | The line metrics.

## ◆ ImpellerLineMetricsRetain()

IMPELLER_EXPORT void ImpellerLineMetricsRetain | ( | ImpellerLineMetrics IMPELLER_NULLABLE | line_metrics | ) |

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

Parameters

  [in] | line_metrics | The line metrics.

## ◆ 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.

## ◆ ImpellerParagraphCreateGlyphInfoAtCodeUnitIndexNew()

IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerGlyphInfo IMPELLER_NULLABLE ImpellerParagraphCreateGlyphInfoAtCodeUnitIndexNew | ( | ImpellerParagraph IMPELLER_NONNULL | paragraph,
|  | size_t | code_unit_index
| ) |  |

Create a new instance of glyph info that can be queried for information about the glyph at the given UTF-16 code unit index. The instance must be freed using `ImpellerGlyphInfoRelease`.

Parameters

  [in] | paragraph | The paragraph.
  [in] | code_unit_index | The UTF-16 code unit index.

Returns
  The glyph information.

## ◆ ImpellerParagraphCreateGlyphInfoAtParagraphCoordinatesNew()

IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerGlyphInfo IMPELLER_NULLABLE ImpellerParagraphCreateGlyphInfoAtParagraphCoordinatesNew | ( | ImpellerParagraph IMPELLER_NONNULL | paragraph,
|  | double | x,
|  | double | y
| ) |  |

Create a new instance of glyph info that can be queried for information about the glyph closest to the specified coordinates relative to the origin of the paragraph. The instance must be freed using `ImpellerGlyphInfoRelease`.

Parameters

  [in] | paragraph | The paragraph.
  [in] | x | The x coordinate relative to paragraph origin.
  [in] | y | The x coordinate relative to paragraph origin.

Returns
  The glyph information.

Referenced by IMPELLER_HPP_NAMESPACE::Paragraph::GlyphInfoAtParagraphCoordinates().

## ◆ 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.

## ◆ ImpellerParagraphGetLineMetrics()

IMPELLER_EXPORT ImpellerLineMetrics IMPELLER_NULLABLE ImpellerParagraphGetLineMetrics | ( | ImpellerParagraph IMPELLER_NONNULL | paragraph | ) |

Get the line metrics of this laid out paragraph. Calculating the line metrics is expensive. The first time line metrics are requested, they will be cached along with the paragraph (which is immutable).

Parameters

  [in] | paragraph | The paragraph.

Returns
  The line metrics.

## ◆ 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`.

## ◆ ImpellerParagraphGetWordBoundary()

IMPELLER_EXPORT ImpellerRange ImpellerParagraphGetWordBoundary | ( | ImpellerParagraph IMPELLER_NONNULL | paragraph,
|  | size_t | code_unit_index
| ) |  |

Get the range into the UTF-16 code unit buffer that represents the word at the specified caret location in the same buffer.

Word boundaries are defined more precisely in Unicode Standard Annex #29

Parameters

  [in] | paragraph | The paragraph
  [in] | code_unit_index | The code unit index

Returns
  The impeller range.

## ◆ 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_NONNULL | context,
|  | uint64_t | fbo,
|  | ImpellerPixelFormat | format,
|  | const ImpellerISize *IMPELLER_NONNULL | 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().

## ◆ ImpellerSurfaceCreateWrappedMetalDrawableNew()

IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerSurface IMPELLER_NULLABLE ImpellerSurfaceCreateWrappedMetalDrawableNew | ( | ImpellerContext IMPELLER_NONNULL | context,
|  | void *IMPELLER_NONNULL | metal_drawable
| ) |  |

Create a surface by wrapping a Metal drawable. This is useful during WSI when the drawable is the backing store of the Metal layer being drawn to.

The Metal layer must be using the same device managed by the underlying context.

Parameters

  [in] | context | The context. The Metal device managed by this context must be the same used to create the drawable that is being wrapped.
  | metal_drawable | The drawable to wrap as a surface.

Returns
  The surface if one could be wrapped, NULL otherwise.

Referenced by main().

## ◆ ImpellerSurfaceDrawDisplayList()

IMPELLER_EXPORT bool ImpellerSurfaceDrawDisplayList | ( | ImpellerSurface IMPELLER_NONNULL | 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().

## ◆ ImpellerSurfacePresent()

IMPELLER_EXPORT bool ImpellerSurfacePresent | ( | ImpellerSurface IMPELLER_NONNULL | surface | ) |

Present the surface to the underlying window system.

Parameters

  [in] | surface | The surface to present.

Returns
  True if the surface could be presented.

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.

## ◆ ImpellerVulkanSwapchainAcquireNextSurfaceNew()

IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerSurface IMPELLER_NULLABLE ImpellerVulkanSwapchainAcquireNextSurfaceNew | ( | ImpellerVulkanSwapchain IMPELLER_NONNULL | swapchain | ) |

A potentially blocking operation, acquires the next surface to render to. Since this may block, surface acquisition must be delayed for as long as possible to avoid an idle wait on the CPU.

Parameters

  [in] | swapchain | The swapchain.

Returns
  The surface if one could be obtained, NULL otherwise.

Referenced by main().

## ◆ ImpellerVulkanSwapchainCreateNew()

IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerVulkanSwapchain IMPELLER_NULLABLE ImpellerVulkanSwapchainCreateNew | ( | ImpellerContext IMPELLER_NONNULL | context,
|  | void *IMPELLER_NONNULL | vulkan_surface_khr
| ) |  |

Create a new Vulkan swapchain using a VkSurfaceKHR instance. Ownership of the surface is transferred over to Impeller. The Vulkan instance the surface is created from must the same as the context provided.

Parameters

  [in] | context | The context. Must be a Vulkan context whose instance is the same used to create the surface passed into the next argument.
  | vulkan_surface_khr | The vulkan surface.

Returns
  The vulkan swapchain.

Referenced by main().

## ◆ ImpellerVulkanSwapchainRelease()

IMPELLER_EXPORT void ImpellerVulkanSwapchainRelease | ( | ImpellerVulkanSwapchain IMPELLER_NULLABLE | swapchain | ) |

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

Parameters

  [in] | swapchain | The swapchain.

Referenced by main().

## ◆ ImpellerVulkanSwapchainRetain()

IMPELLER_EXPORT void ImpellerVulkanSwapchainRetain | ( | ImpellerVulkanSwapchain IMPELLER_NULLABLE | swapchain | ) |

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

Parameters

  [in] | swapchain | The swapchain.