UNPKG

react-canvaskit

Version:

A React implementation of the Skia-CanvasKit drawing library.

13 lines (12 loc) 925 B
import type { CanvasKit, Color as SkColor, Font as SkFont, FontStyle, Paint as SkPaint, ParagraphStyle as SkParagraphStyle, TextStyle as SkTextStyle, Typeface as SkTypeface } from 'canvaskit-wasm'; import type { CkFontStyle, Color, Font, Paint, ParagraphStyle, TextStyle, TypeFace } from './SkiaElementTypes'; export interface PropsConverter<IN, OUT> { (canvasKit: CanvasKit, propIn?: IN): OUT | undefined; } export declare const toSkTypeFace: PropsConverter<TypeFace, SkTypeface>; export declare const toSkFont: PropsConverter<Font, SkFont>; export declare const toSkColor: PropsConverter<Color | string, SkColor>; export declare const toSkPaint: PropsConverter<Paint, SkPaint>; export declare const toFontStyle: PropsConverter<CkFontStyle, FontStyle>; export declare const toSkTextStyle: PropsConverter<TextStyle, SkTextStyle>; export declare const toSkParagraphStyle: PropsConverter<ParagraphStyle, SkParagraphStyle>;