Flutter Impeller
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
 
struct  ImpellerTextDecoration
 

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   4
 
#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 enum ImpellerTextDecorationType ImpellerTextDecorationType
 
typedef enum ImpellerTextDecorationStyle ImpellerTextDecorationStyle
 
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
 
typedef struct ImpellerTextDecoration ImpellerTextDecoration
 

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
}
 
enum  ImpellerTextDecorationType {
  kImpellerTextDecorationTypeNone = 0 << 0 ,
  kImpellerTextDecorationTypeUnderline = 1 << 0 ,
  kImpellerTextDecorationTypeOverline = 1 << 1 ,
  kImpellerTextDecorationTypeLineThrough = 1 << 2
}
 
enum  ImpellerTextDecorationStyle {
  kImpellerTextDecorationStyleSolid ,
  kImpellerTextDecorationStyleDouble ,
  kImpellerTextDecorationStyleDotted ,
  kImpellerTextDecorationStyleDashed ,
  kImpellerTextDecorationStyleWavy
}
 

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_DEFINE_HANDLE (ImpellerFragmentProgram)
 
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 void ImpellerPathGetBounds (ImpellerPath IMPELLER_NONNULL path, ImpellerRect *IMPELLER_NONNULL out_bounds)
 Get the bounds of the path. 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 IMPELLER_NODISCARD ImpellerFragmentProgram IMPELLER_NULLABLE ImpellerFragmentProgramNew (const ImpellerMapping *IMPELLER_NONNULL data, void *IMPELLER_NULLABLE data_release_user_data)
 Create a new fragment program using data obtained by compiling a GLSL shader with impellerc. More...
 
IMPELLER_EXPORT void ImpellerFragmentProgramRetain (ImpellerFragmentProgram IMPELLER_NULLABLE fragment_program)
 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 ImpellerFragmentProgramRelease (ImpellerFragmentProgram IMPELLER_NULLABLE fragment_program)
 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 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 IMPELLER_NODISCARD ImpellerColorSource IMPELLER_NULLABLE ImpellerColorSourceCreateFragmentProgramNew (ImpellerContext IMPELLER_NONNULL context, ImpellerFragmentProgram IMPELLER_NONNULL fragment_program, IMPELLER_NONNULL ImpellerTexture *IMPELLER_NULLABLE samplers, size_t samplers_count, const uint8_t *IMPELLER_NULLABLE data, size_t data_bytes_length)
 Create a color source whose pixels are shaded by a fragment program. 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 ImpellerImageFilterCreateFragmentProgramNew (ImpellerContext IMPELLER_NONNULL context, ImpellerFragmentProgram IMPELLER_NONNULL fragment_program, IMPELLER_NONNULL ImpellerTexture *IMPELLER_NULLABLE samplers, size_t samplers_count, const uint8_t *IMPELLER_NULLABLE data, size_t data_bytes_length)
 Create an image filter where each pixel is shaded by a fragment program. 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 ImpellerParagraphStyleSetTextDecoration (ImpellerParagraphStyle IMPELLER_NONNULL paragraph_style, const ImpellerTextDecoration *IMPELLER_NONNULL decoration)
 Set one of more text decorations on the paragraph. Decorations can be underlines, overlines, strikethroughs, etc.. The style of decorations can be set as well (dashed, dotted, wavy, etc..) 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 void ImpellerParagraphStyleSetEllipsis (ImpellerParagraphStyle IMPELLER_NONNULL paragraph_style, const char *IMPELLER_NULLABLE ellipsis)
 Set the UTF-8 string to use as the ellipsis. Pass nullptr to clear the setting to default. 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 void ImpellerParagraphGetWordBoundary (ImpellerParagraph IMPELLER_NONNULL paragraph, size_t code_unit_index, ImpellerRange *IMPELLER_NONNULL out_range)
 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 void ImpellerGlyphInfoGetGraphemeClusterBounds (ImpellerGlyphInfo IMPELLER_NONNULL glyph_info, ImpellerRect *IMPELLER_NONNULL out_bounds)
 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]variantThe version variant.
[in]majorThe major version.
[in]minorThe minor version.
[in]patchThe 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:
#define IMPELLER_VERSION_VARIANT
Definition: impeller.h:83
#define IMPELLER_MAKE_VERSION(variant, major, minor, patch)
Pack a version in a uint32_t.
Definition: impeller.h:79
#define IMPELLER_VERSION_PATCH
Definition: impeller.h:86
#define IMPELLER_VERSION_MINOR
Definition: impeller.h:85
#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]versionThe 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]versionThe 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]versionThe 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]versionThe 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   4

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

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

◆ ImpellerClipOperation

◆ ImpellerColor

typedef struct ImpellerColor ImpellerColor

◆ 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

◆ ImpellerContextVulkanInfo

◆ ImpellerContextVulkanSettings

◆ ImpellerDrawStyle

◆ ImpellerFillType

◆ ImpellerFontStyle

◆ ImpellerFontWeight

◆ ImpellerISize

typedef struct ImpellerISize ImpellerISize

◆ ImpellerMapping

◆ 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

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

◆ ImpellerRange

typedef struct ImpellerRange ImpellerRange

◆ ImpellerRect

typedef struct ImpellerRect ImpellerRect

◆ ImpellerRoundingRadii

◆ ImpellerSize

typedef struct ImpellerSize ImpellerSize

◆ ImpellerStrokeCap

◆ ImpellerStrokeJoin

◆ ImpellerTextAlignment

◆ ImpellerTextDecoration

◆ ImpellerTextDecorationStyle

◆ ImpellerTextDecorationType

◆ ImpellerTextDirection

◆ ImpellerTextureDescriptor

◆ ImpellerTextureSampling

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

Enumeration Type Documentation

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

374  {
ImpellerBlendMode
Definition: impeller.h:374
@ kImpellerBlendModeSaturation
Definition: impeller.h:401
@ kImpellerBlendModeSoftLight
Definition: impeller.h:396
@ kImpellerBlendModeHardLight
Definition: impeller.h:395
@ kImpellerBlendModeLuminosity
Definition: impeller.h:403
@ kImpellerBlendModeLighten
Definition: impeller.h:392
@ kImpellerBlendModeModulate
Definition: impeller.h:388
@ kImpellerBlendModeSourceIn
Definition: impeller.h:380
@ kImpellerBlendModeDifference
Definition: impeller.h:397
@ kImpellerBlendModeClear
Definition: impeller.h:375
@ kImpellerBlendModeColor
Definition: impeller.h:402
@ kImpellerBlendModeMultiply
Definition: impeller.h:399
@ kImpellerBlendModeSourceATop
Definition: impeller.h:384
@ kImpellerBlendModeDestinationOut
Definition: impeller.h:383
@ kImpellerBlendModeScreen
Definition: impeller.h:389
@ kImpellerBlendModeExclusion
Definition: impeller.h:398
@ kImpellerBlendModeColorBurn
Definition: impeller.h:394
@ kImpellerBlendModeDarken
Definition: impeller.h:391
@ kImpellerBlendModePlus
Definition: impeller.h:387
@ kImpellerBlendModeOverlay
Definition: impeller.h:390
@ kImpellerBlendModeDestinationIn
Definition: impeller.h:381
@ kImpellerBlendModeDestinationATop
Definition: impeller.h:385
@ kImpellerBlendModeDestination
Definition: impeller.h:377
@ kImpellerBlendModeSourceOver
Definition: impeller.h:378
@ kImpellerBlendModeXor
Definition: impeller.h:386
@ kImpellerBlendModeColorDodge
Definition: impeller.h:393
@ kImpellerBlendModeDestinationOver
Definition: impeller.h:379
@ kImpellerBlendModeSource
Definition: impeller.h:376
@ kImpellerBlendModeSourceOut
Definition: impeller.h:382
@ kImpellerBlendModeHue
Definition: impeller.h:400

◆ ImpellerBlurStyle

Enumerator
kImpellerBlurStyleNormal 
kImpellerBlurStyleSolid 
kImpellerBlurStyleOuter 
kImpellerBlurStyleInner 

Definition at line 440 of file impeller.h.

440  {
ImpellerBlurStyle
Definition: impeller.h:440
@ kImpellerBlurStyleNormal
Definition: impeller.h:441
@ kImpellerBlurStyleOuter
Definition: impeller.h:443
@ kImpellerBlurStyleInner
Definition: impeller.h:444
@ kImpellerBlurStyleSolid
Definition: impeller.h:442

◆ ImpellerClipOperation

Enumerator
kImpellerClipOperationDifference 
kImpellerClipOperationIntersect 

Definition at line 369 of file impeller.h.

369  {
ImpellerClipOperation
Definition: impeller.h:369
@ kImpellerClipOperationIntersect
Definition: impeller.h:371
@ kImpellerClipOperationDifference
Definition: impeller.h:370

◆ ImpellerColorSpace

Enumerator
kImpellerColorSpaceSRGB 
kImpellerColorSpaceExtendedSRGB 
kImpellerColorSpaceDisplayP3 

Definition at line 447 of file impeller.h.

447  {
ImpellerColorSpace
Definition: impeller.h:447
@ kImpellerColorSpaceExtendedSRGB
Definition: impeller.h:449
@ kImpellerColorSpaceSRGB
Definition: impeller.h:448
@ kImpellerColorSpaceDisplayP3
Definition: impeller.h:450

◆ ImpellerDrawStyle

Enumerator
kImpellerDrawStyleFill 
kImpellerDrawStyleStroke 
kImpellerDrawStyleStrokeAndFill 

Definition at line 406 of file impeller.h.

406  {
ImpellerDrawStyle
Definition: impeller.h:406
@ kImpellerDrawStyleStroke
Definition: impeller.h:408
@ kImpellerDrawStyleFill
Definition: impeller.h:407
@ kImpellerDrawStyleStrokeAndFill
Definition: impeller.h:409

◆ ImpellerFillType

Enumerator
kImpellerFillTypeNonZero 
kImpellerFillTypeOdd 

Definition at line 364 of file impeller.h.

364  {
ImpellerFillType
Definition: impeller.h:364
@ kImpellerFillTypeOdd
Definition: impeller.h:366
@ kImpellerFillTypeNonZero
Definition: impeller.h:365

◆ ImpellerFontStyle

Enumerator
kImpellerFontStyleNormal 
kImpellerFontStyleItalic 

Definition at line 465 of file impeller.h.

465  {
ImpellerFontStyle
Definition: impeller.h:465
@ kImpellerFontStyleItalic
Definition: impeller.h:467
@ kImpellerFontStyleNormal
Definition: impeller.h:466

◆ ImpellerFontWeight

Enumerator
kImpellerFontWeight100 
kImpellerFontWeight200 
kImpellerFontWeight300 
kImpellerFontWeight400 
kImpellerFontWeight500 
kImpellerFontWeight600 
kImpellerFontWeight700 
kImpellerFontWeight800 
kImpellerFontWeight900 

Definition at line 453 of file impeller.h.

453  {
454  kImpellerFontWeight100, // Thin
455  kImpellerFontWeight200, // Extra-Light
456  kImpellerFontWeight300, // Light
457  kImpellerFontWeight400, // Normal/Regular
458  kImpellerFontWeight500, // Medium
459  kImpellerFontWeight600, // Semi-bold
460  kImpellerFontWeight700, // Bold
461  kImpellerFontWeight800, // Extra-Bold
462  kImpellerFontWeight900, // Black
ImpellerFontWeight
Definition: impeller.h:453
@ kImpellerFontWeight400
Definition: impeller.h:457
@ kImpellerFontWeight500
Definition: impeller.h:458
@ kImpellerFontWeight700
Definition: impeller.h:460
@ kImpellerFontWeight200
Definition: impeller.h:455
@ kImpellerFontWeight300
Definition: impeller.h:456
@ kImpellerFontWeight900
Definition: impeller.h:462
@ kImpellerFontWeight800
Definition: impeller.h:461
@ kImpellerFontWeight600
Definition: impeller.h:459
@ kImpellerFontWeight100
Definition: impeller.h:454

◆ ImpellerPixelFormat

Enumerator
kImpellerPixelFormatRGBA8888 

Definition at line 424 of file impeller.h.

424  {
ImpellerPixelFormat
Definition: impeller.h:424
@ kImpellerPixelFormatRGBA8888
Definition: impeller.h:425

◆ ImpellerStrokeCap

Enumerator
kImpellerStrokeCapButt 
kImpellerStrokeCapRound 
kImpellerStrokeCapSquare 

Definition at line 412 of file impeller.h.

412  {
ImpellerStrokeCap
Definition: impeller.h:412
@ kImpellerStrokeCapButt
Definition: impeller.h:413
@ kImpellerStrokeCapRound
Definition: impeller.h:414
@ kImpellerStrokeCapSquare
Definition: impeller.h:415

◆ ImpellerStrokeJoin

Enumerator
kImpellerStrokeJoinMiter 
kImpellerStrokeJoinRound 
kImpellerStrokeJoinBevel 

Definition at line 418 of file impeller.h.

418  {
ImpellerStrokeJoin
Definition: impeller.h:418
@ kImpellerStrokeJoinRound
Definition: impeller.h:420
@ kImpellerStrokeJoinBevel
Definition: impeller.h:421
@ kImpellerStrokeJoinMiter
Definition: impeller.h:419

◆ ImpellerTextAlignment

Enumerator
kImpellerTextAlignmentLeft 
kImpellerTextAlignmentRight 
kImpellerTextAlignmentCenter 
kImpellerTextAlignmentJustify 
kImpellerTextAlignmentStart 
kImpellerTextAlignmentEnd 

Definition at line 470 of file impeller.h.

470  {
ImpellerTextAlignment
Definition: impeller.h:470
@ kImpellerTextAlignmentJustify
Definition: impeller.h:474
@ kImpellerTextAlignmentLeft
Definition: impeller.h:471
@ kImpellerTextAlignmentCenter
Definition: impeller.h:473
@ kImpellerTextAlignmentRight
Definition: impeller.h:472
@ kImpellerTextAlignmentStart
Definition: impeller.h:475
@ kImpellerTextAlignmentEnd
Definition: impeller.h:476

◆ ImpellerTextDecorationStyle

Enumerator
kImpellerTextDecorationStyleSolid 
kImpellerTextDecorationStyleDouble 
kImpellerTextDecorationStyleDotted 
kImpellerTextDecorationStyleDashed 
kImpellerTextDecorationStyleWavy 

Definition at line 491 of file impeller.h.

491  {
ImpellerTextDecorationStyle
Definition: impeller.h:491
@ kImpellerTextDecorationStyleSolid
Definition: impeller.h:492
@ kImpellerTextDecorationStyleWavy
Definition: impeller.h:496
@ kImpellerTextDecorationStyleDouble
Definition: impeller.h:493
@ kImpellerTextDecorationStyleDotted
Definition: impeller.h:494
@ kImpellerTextDecorationStyleDashed
Definition: impeller.h:495

◆ ImpellerTextDecorationType

Enumerator
kImpellerTextDecorationTypeNone 
kImpellerTextDecorationTypeUnderline 
kImpellerTextDecorationTypeOverline 
kImpellerTextDecorationTypeLineThrough 

Definition at line 484 of file impeller.h.

484  {
ImpellerTextDecorationType
Definition: impeller.h:484
@ kImpellerTextDecorationTypeLineThrough
Definition: impeller.h:488
@ kImpellerTextDecorationTypeNone
Definition: impeller.h:485
@ kImpellerTextDecorationTypeUnderline
Definition: impeller.h:486
@ kImpellerTextDecorationTypeOverline
Definition: impeller.h:487

◆ ImpellerTextDirection

Enumerator
kImpellerTextDirectionRTL 
kImpellerTextDirectionLTR 

Definition at line 479 of file impeller.h.

479  {
ImpellerTextDirection
Definition: impeller.h:479
@ kImpellerTextDirectionLTR
Definition: impeller.h:481
@ kImpellerTextDirectionRTL
Definition: impeller.h:480

◆ ImpellerTextureSampling

Enumerator
kImpellerTextureSamplingNearestNeighbor 
kImpellerTextureSamplingLinear 

Definition at line 428 of file impeller.h.

428  {
ImpellerTextureSampling
Definition: impeller.h:428
@ kImpellerTextureSamplingNearestNeighbor
Definition: impeller.h:429
@ kImpellerTextureSamplingLinear
Definition: impeller.h:430

◆ ImpellerTileMode

Enumerator
kImpellerTileModeClamp 
kImpellerTileModeRepeat 
kImpellerTileModeMirror 
kImpellerTileModeDecal 

Definition at line 433 of file impeller.h.

433  {
ImpellerTileMode
Definition: impeller.h:433
@ kImpellerTileModeMirror
Definition: impeller.h:436
@ kImpellerTileModeClamp
Definition: impeller.h:434
@ kImpellerTileModeRepeat
Definition: impeller.h:435
@ kImpellerTileModeDecal
Definition: impeller.h:437

Function Documentation

◆ IMPELLER_DEFINE_HANDLE() [1/20]

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

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

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

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

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

IMPELLER_DEFINE_HANDLE ( ImpellerFragmentProgram  )

A fragment shader is a small program that is authored in GLSL and compiled using impellerc that runs on each pixel covered by a polygon and allows the user to configure how it is shaded.

See also
https://docs.flutter.dev/ui/design/graphics/fragment-shaders

◆ IMPELLER_DEFINE_HANDLE() [7/20]

IMPELLER_DEFINE_HANDLE ( ImpellerGlyphInfo  )

Describes the metrics of glyphs in a paragraph line.

◆ IMPELLER_DEFINE_HANDLE() [8/20]

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() [9/20]

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

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

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() [12/20]

IMPELLER_DEFINE_HANDLE ( ImpellerParagraph  )

An immutable, fully laid out paragraph.

◆ IMPELLER_DEFINE_HANDLE() [13/20]

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

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

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() [16/20]

IMPELLER_DEFINE_HANDLE ( ImpellerPathBuilder  )

Path builders allow for the incremental building up of paths.

◆ IMPELLER_DEFINE_HANDLE() [17/20]

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

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

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

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]colorThe color.
[in]blend_modeThe 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_matrixThe 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_filterThe 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_filterThe 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_centerThe start center.
[in]start_radiusThe start radius.
[in]end_centerThe end center.
[in]end_radiusThe end radius.
[in]stop_countThe stop count.
[in]colorsThe colors.
[in]stopsThe stops.
[in]tile_modeThe tile mode.
[in]transformationThe transformation.
Returns
The color source.

◆ ImpellerColorSourceCreateFragmentProgramNew()

IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerColorSource IMPELLER_NULLABLE ImpellerColorSourceCreateFragmentProgramNew ( ImpellerContext IMPELLER_NONNULL  context,
ImpellerFragmentProgram IMPELLER_NONNULL  fragment_program,
IMPELLER_NONNULL ImpellerTexture *IMPELLER_NULLABLE  samplers,
size_t  samplers_count,
const uint8_t *IMPELLER_NULLABLE  data,
size_t  data_bytes_length 
)

Create a color source whose pixels are shaded by a fragment program.

See also
https://docs.flutter.dev/ui/design/graphics/fragment-shaders
Parameters
[in]contextThe context.
[in]fragment_programThe fragment program.
samplersThe samplers.
[in]samplers_countThe samplers count.
[in]dataThe data (copied).
[in]data_bytes_lengthThe data bytes length.
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]imageThe image.
[in]horizontal_tile_modeThe horizontal tile mode.
[in]vertical_tile_modeThe vertical tile mode.
[in]samplingThe sampling.
[in]transformationThe 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_pointThe start point.
[in]end_pointThe end point.
[in]stop_countThe stop count.
[in]colorsThe colors.
[in]stopsThe stops.
[in]tile_modeThe tile mode.
[in]transformationThe 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]centerThe center.
[in]radiusThe radius.
[in]stop_countThe stop count.
[in]colorsThe colors.
[in]stopsThe stops.
[in]tile_modeThe tile mode.
[in]transformationThe 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]centerThe center.
[in]startThe start.
[in]endThe end.
[in]stop_countThe stop count.
[in]colorsThe colors.
[in]stopsThe stops.
[in]tile_modeThe tile mode.
[in]transformationThe 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_sourceThe 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_sourceThe 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]versionThe 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]versionThe 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_callbackThe gl proc address callback. For instance, eglGetProcAddress.
[in]gl_proc_address_callback_user_dataThe 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]versionThe version specified in the IMPELLER_VERSION macro.
[in]settingsThe 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]contextThe context
[out]out_vulkan_infoThe 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]contextThe 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]contextThe 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]builderThe builder.
[in]oval_boundsThe oval bounds.
[in]opThe 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]builderThe builder.
[in]pathThe path.
[in]opThe 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]builderThe builder.
[in]rectThe rectangle.
[in]opThe 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]builderThe builder.
[in]rectThe rectangle.
[in]radiiThe radii.
[in]opThe 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]builderThe 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]builderThe builder.
[in]fromThe starting point of the line.
[in]toThe end point of the line.
[in]on_lengthOn length.
[in]off_lengthOff length.
[in]paintThe 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]builderThe builder.
[in]display_listThe display list.
[in]opacityThe 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]builderThe builder.
[in]fromThe starting point of the line.
[in]toThe end point of the line.
[in]paintThe 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]builderThe builder.
[in]oval_boundsThe oval bounds.
[in]paintThe paint.

◆ ImpellerDisplayListBuilderDrawPaint()

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

Fills the current clip with the specified paint.

Parameters
[in]builderThe builder.
[in]paintThe 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]builderThe builder.
[in]paragraphThe paragraph.
[in]pointThe point.

◆ ImpellerDisplayListBuilderDrawPath()

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

Draws the specified shape.

Parameters
[in]builderThe builder.
[in]pathThe path.
[in]paintThe paint.

◆ ImpellerDisplayListBuilderDrawRect()

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

Draws a rectangle.

Parameters
[in]builderThe builder.
[in]rectThe rectangle.
[in]paintThe 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]builderThe builder.
[in]rectThe rectangle.
[in]radiiThe radii.
[in]paintThe 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]builderThe builder.
[in]outer_rectThe outer rectangle.
[in]outer_radiiThe outer radii.
[in]inner_rectThe inner rectangle.
[in]inner_radiiThe inner radii.
[in]paintThe 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]builderThe builder.
[in]pathThe shadow path.
[in]colorThe shadow color.
[in]elevationThe material elevation.
[in]occluder_is_transparentIf the object casting the shadow is transparent.
[in]device_pixel_ratioThe 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]builderThe builder.
[in]textureThe texture.
[in]pointThe point.
[in]samplingThe sampling.
[in]paintThe 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]builderThe builder.
[in]textureThe texture.
[in]src_rectThe source rectangle.
[in]dst_rectThe destination rectangle.
[in]samplingThe sampling.
[in]paintThe paint.

◆ ImpellerDisplayListBuilderGetSaveCount()

IMPELLER_EXPORT uint32_t ImpellerDisplayListBuilderGetSaveCount ( ImpellerDisplayListBuilder IMPELLER_NONNULL  builder)

Get the current size of the save stack.

Parameters
[in]builderThe 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]builderThe builder.
[out]out_transformThe 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_rectThe 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]builderThe 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]builderThe 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]builderThe 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]builderThe builder.
[in]countThe 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]builderThe 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]builderThe builder.
[in]angle_degreesThe 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]builderThe 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]builderThe builder.
[in]boundsThe bounds.
[in]paintThe paint.
[in]backdropThe 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]builderThe builder.
[in]x_scaleThe x scale.
[in]y_scaleThe 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]builderThe builder.
[in]transformThe 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]builderThe builder.
[in]transformThe 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]builderThe builder.
[in]x_translationThe x translation.
[in]y_translationThe 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_listThe 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_listThe display list.

◆ ImpellerFragmentProgramNew()

IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerFragmentProgram IMPELLER_NULLABLE ImpellerFragmentProgramNew ( const ImpellerMapping *IMPELLER_NONNULL  data,
void *IMPELLER_NULLABLE  data_release_user_data 
)

Create a new fragment program using data obtained by compiling a GLSL shader with impellerc.

Warning
The data provided must be compiled by impellerc. Providing raw GLSL strings will lead to a nullptr return. Impeller does not compile shaders at runtime.
Parameters
[in]dataThe data compiled by impellerc.
data_release_user_dataA baton passed back to the caller on the invocation of the mappings release callback. This call can happen on any thread.
Returns
The fragment program if one can be created, nullptr otherwise.

◆ ImpellerFragmentProgramRelease()

IMPELLER_EXPORT void ImpellerFragmentProgramRelease ( ImpellerFragmentProgram IMPELLER_NULLABLE  fragment_program)

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

Parameters
[in]fragment_programThe fragment program.

◆ ImpellerFragmentProgramRetain()

IMPELLER_EXPORT void ImpellerFragmentProgramRetain ( ImpellerFragmentProgram IMPELLER_NULLABLE  fragment_program)

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

Parameters
[in]fragment_programThe fragment program.

◆ 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 void ImpellerGlyphInfoGetGraphemeClusterBounds ( ImpellerGlyphInfo IMPELLER_NONNULL  glyph_info,
ImpellerRect *IMPELLER_NONNULL  out_bounds 
)

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

Parameters
[in]glyph_infoThe glyph information.
[out]out_boundsThe 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_infoThe 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_infoThe glyph information.
Returns
The UTF-16 code units end index.

◆ ImpellerGlyphInfoGetTextDirection()

IMPELLER_EXPORT ImpellerTextDirection ImpellerGlyphInfoGetTextDirection ( ImpellerGlyphInfo IMPELLER_NONNULL  glyph_info)
Parameters
[in]glyph_infoThe 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_infoThe 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_infoThe 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_infoThe 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_sigmaThe x sigma.
[in]y_sigmaThe y sigma.
[in]tile_modeThe 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]outerThe outer image filter.
[in]innerThe 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_radiusThe x radius.
[in]y_radiusThe 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_radiusThe x radius.
[in]y_radiusThe y radius.
Returns
The image filter.

◆ ImpellerImageFilterCreateFragmentProgramNew()

IMPELLER_EXPORT IMPELLER_NODISCARD ImpellerImageFilter IMPELLER_NULLABLE ImpellerImageFilterCreateFragmentProgramNew ( ImpellerContext IMPELLER_NONNULL  context,
ImpellerFragmentProgram IMPELLER_NONNULL  fragment_program,
IMPELLER_NONNULL ImpellerTexture *IMPELLER_NULLABLE  samplers,
size_t  samplers_count,
const uint8_t *IMPELLER_NULLABLE  data,
size_t  data_bytes_length 
)

Create an image filter where each pixel is shaded by a fragment program.

See also
https://docs.flutter.dev/ui/design/graphics/fragment-shaders
Parameters
[in]contextThe context.
[in]fragment_programThe fragment program.
samplersThe samplers.
[in]samplers_countThe samplers count.
[in]dataThe data (copied).
[in]data_bytes_lengthThe data bytes length.
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]matrixThe transformation matrix.
[in]samplingThe 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_filterThe 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_filterThe 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]metricsThe metrics.
[in]lineThe 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]metricsThe metrics.
[in]lineThe 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]metricsThe metrics.
[in]lineThe 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]metricsThe metrics.
[in]lineThe 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]metricsThe metrics.
[in]lineThe 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]metricsThe metrics.
[in]lineThe 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]metricsThe metrics.
[in]lineThe 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]metricsThe metrics.
[in]lineThe 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]metricsThe metrics.
[in]lineThe 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]metricsThe metrics.
[in]lineThe 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]metricsThe metrics.
[in]lineThe 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]metricsThe metrics.
[in]lineThe 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_metricsThe 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_metricsThe 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]styleThe style.
[in]sigmaThe 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_filterThe 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_filterThe 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]paintThe 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]paintThe 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]paintThe paint.
[in]modeThe mode.

◆ ImpellerPaintSetColor()

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

Set the paint color.

Parameters
[in]paintThe paint.
[in]colorThe 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]paintThe paint.
[in]color_filterThe 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]paintThe paint.
[in]color_sourceThe 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]paintThe paint.
[in]styleThe 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]paintThe paint.
[in]image_filterThe 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]paintThe paint.
[in]mask_filterThe mask filter.

◆ ImpellerPaintSetStrokeCap()

IMPELLER_EXPORT void ImpellerPaintSetStrokeCap ( ImpellerPaint IMPELLER_NONNULL  paint,
ImpellerStrokeCap  cap 
)

Sets how strokes rendered using this paint are capped.

Parameters
[in]paintThe paint.
[in]capThe 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]paintThe paint.
[in]joinThe 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]paintThe paint.
[in]miterThe 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]paintThe paint.
[in]widthThe 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_builderThe paragraph builder.
[in]dataThe data.
[in]lengthThe 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_builderThe paragraph builder.
[in]widthThe 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]contextThe 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_builderThe 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_builderThe paragraph builder.
[in]styleThe 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_builderThe 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_builderThe 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]paragraphThe paragraph.
[in]code_unit_indexThe 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]paragraphThe paragraph.
[in]xThe x coordinate relative to paragraph origin.
[in]yThe 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]paragraphThe 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]paragraphThe 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]paragraphThe 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]paragraphThe 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]paragraphThe paragraph.
Returns
The line metrics.

◆ ImpellerParagraphGetLongestLineWidth()

IMPELLER_EXPORT float ImpellerParagraphGetLongestLineWidth ( ImpellerParagraph IMPELLER_NONNULL  paragraph)
Parameters
[in]paragraphThe 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]paragraphThe paragraph.
Returns
The width of the paragraph without line breaking.

◆ ImpellerParagraphGetMaxWidth()

IMPELLER_EXPORT float ImpellerParagraphGetMaxWidth ( ImpellerParagraph IMPELLER_NONNULL  paragraph)
See also
ImpellerParagraphGetMinIntrinsicWidth
Parameters
[in]paragraphThe 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]paragraphThe 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 void ImpellerParagraphGetWordBoundary ( ImpellerParagraph IMPELLER_NONNULL  paragraph,
size_t  code_unit_index,
ImpellerRange *IMPELLER_NONNULL  out_range 
)

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]paragraphThe paragraph
[in]code_unit_indexThe code unit index
[out]code_unit_indexThe 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]paragraphThe 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]paragraphThe 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_styleThe 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_styleThe 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_styleThe paragraph style.
[in]paintThe paint.

◆ ImpellerParagraphStyleSetEllipsis()

IMPELLER_EXPORT void ImpellerParagraphStyleSetEllipsis ( ImpellerParagraphStyle IMPELLER_NONNULL  paragraph_style,
const char *IMPELLER_NULLABLE  ellipsis 
)

Set the UTF-8 string to use as the ellipsis. Pass nullptr to clear the setting to default.

Parameters
[in]paragraph_styleThe paragraph style.
[in]dataThe ellipsis string UTF-8 data, or null.

◆ ImpellerParagraphStyleSetFontFamily()

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

Set the font family.

Parameters
[in]paragraph_styleThe paragraph style.
[in]family_nameThe family name.

◆ ImpellerParagraphStyleSetFontSize()

IMPELLER_EXPORT void ImpellerParagraphStyleSetFontSize ( ImpellerParagraphStyle IMPELLER_NONNULL  paragraph_style,
float  size 
)

Set the font size.

Parameters
[in]paragraph_styleThe paragraph style.
[in]sizeThe 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_styleThe paragraph style.
[in]styleThe 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_styleThe paragraph style.
[in]weightThe 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_styleThe paragraph style.
[in]paintThe 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_styleThe paragraph style.
[in]heightThe height.

◆ ImpellerParagraphStyleSetLocale()

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

Set the paragraph locale.

Parameters
[in]paragraph_styleThe paragraph style.
[in]localeThe 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_styleThe paragraph style.
[in]max_linesThe 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_styleThe paragraph style.
[in]alignThe align.

◆ ImpellerParagraphStyleSetTextDecoration()

IMPELLER_EXPORT void ImpellerParagraphStyleSetTextDecoration ( ImpellerParagraphStyle IMPELLER_NONNULL  paragraph_style,
const ImpellerTextDecoration *IMPELLER_NONNULL  decoration 
)

Set one of more text decorations on the paragraph. Decorations can be underlines, overlines, strikethroughs, etc.. The style of decorations can be set as well (dashed, dotted, wavy, etc..)

Parameters
[in]ImpellerParagraphStyleThe paragraph style.
[in]decorationThe text decoration.

◆ ImpellerParagraphStyleSetTextDirection()

IMPELLER_EXPORT void ImpellerParagraphStyleSetTextDirection ( ImpellerParagraphStyle IMPELLER_NONNULL  paragraph_style,
ImpellerTextDirection  direction 
)

Set the directionality of the text within the paragraph.

Parameters
[in]paragraph_styleThe paragraph style.
[in]directionThe 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]builderThe builder.
[in]oval_boundsThe oval bounds.
[in]start_angle_degreesThe start angle in degrees.
[in]end_angle_degreesThe 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]builderThe builder.
[in]oval_boundsThe oval bounds.

◆ ImpellerPathBuilderAddRect()

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

Adds a rectangle to the path.

Parameters
[in]builderThe builder.
[in]rectThe 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]builderThe builder.
[in]rectThe rectangle.
[in]rounding_radiiThe rounding radii.

◆ ImpellerPathBuilderClose()

IMPELLER_EXPORT void ImpellerPathBuilderClose ( ImpellerPathBuilder IMPELLER_NONNULL  builder)

Close the path.

Parameters
[in]builderThe 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]builderThe builder.
[in]fillThe 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]builderThe builder
[in]control_point_1The control point 1
[in]control_point_2The control point 2
[in]end_pointThe 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]builderThe builder.
[in]locationThe location.

◆ ImpellerPathBuilderMoveTo()

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

Move the cursor to the specified location.

Parameters
[in]builderThe builder.
[in]locationThe 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]builderThe builder.
[in]control_pointThe control point.
[in]end_pointThe 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]builderThe 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]builderThe 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]builderThe builder.
[in]fillThe fill.
Returns
The impeller path.

◆ ImpellerPathGetBounds()

IMPELLER_EXPORT void ImpellerPathGetBounds ( ImpellerPath IMPELLER_NONNULL  path,
ImpellerRect *IMPELLER_NONNULL  out_bounds 
)

Get the bounds of the path.

        The bounds are conservative. That is, they may be larger than
        the actual shape of the path and could include the control
        points and isolated calls to move the cursor.
Parameters
[in]pathThe path
[out]out_boundsThe conservative bounds of the 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]pathThe 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]pathThe 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]contextThe context.
[in]fboThe framebuffer object handle.
[in]formatThe format of the framebuffer.
[in]sizeThe 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]contextThe context. The Metal device managed by this context must be the same used to create the drawable that is being wrapped.
metal_drawableThe 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]surfaceThe surface to draw the display list to.
[in]display_listThe 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]surfaceThe 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]surfaceThe 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]surfaceThe 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]contextThe context.
[in]descriptorThe texture descriptor.
[in]contentsThe contents.
[in]contents_on_release_user_dataThe 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]contextThe context
[in]descriptorThe descriptor
[in]handleThe 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]textureThe 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]textureThe 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]textureThe 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]contextThe context.
[in]contentsThe contents.
[in]contents_on_release_user_dataThe user data baton to be passed to the contents release callback.
[in]family_name_aliasThe 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]contextThe 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]contextThe 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]swapchainThe 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]contextThe context. Must be a Vulkan context whose instance is the same used to create the surface passed into the next argument.
vulkan_surface_khrThe 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]swapchainThe 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]swapchainThe swapchain.