import { ImageSource } from '@nativescript/core/image-source'; import { Canvas as ICanvas, Paint as IPaint } from './canvas'; import { CanvasBase } from './canvas.common'; import { Font, FontStyle, FontWeight } from '@nativescript/core/ui/styling/font'; export * from './canvas.common'; export declare function arrayoNativeArray(array: any, useInts?: boolean): any; export declare function parseDashEffect(value: string): DashPathEffect; declare class Canvas { _native: android.graphics.Canvas; getNative(): globalAndroid.graphics.Canvas; _bitmap: android.graphics.Bitmap; _shouldReleaseBitmap: boolean; constructor(imageOrWidth?: ImageSource | android.graphics.Bitmap | number, height?: number); get(target: Canvas, name: any, receiver: any): any; getImage(): globalAndroid.graphics.Bitmap; release(): void; } export declare class Paint { _native: android.graphics.Paint; fontInternal: Font; _needsFontUpdate: boolean; getNative(): globalAndroid.graphics.Paint; constructor(); get font(): Font; getFontFamily(): string; get fontFamily(): string; setFontFamily(familyName: string): void; set fontFamily(familyName: string); setFont(font: Font): void; set font(font: Font); set fontWeight(weight: FontWeight); setFontWeight(weight: FontWeight): void; set fontStyle(style: FontStyle); setFontStyle(style: FontStyle): void; set color(color: any); set strokeWidth(value: number); set strokeCap(value: number); set strokeJoin(value: number); set style(value: number); set textSize(value: number); setTypeface(font: Font | android.graphics.Typeface): Font; set typeface(typeface: any); } export declare class DashPathEffect { _native: android.graphics.DashPathEffect; getNative(): globalAndroid.graphics.DashPathEffect; constructor(intervals: number[], phase: number); get(target: any, name: any, receiver: any): any; } export declare class Path { _native: com.akylas.canvas.CanvasPath; getNative(): com.akylas.canvas.CanvasPath; constructor(path?: com.akylas.canvas.CanvasPath); get(target: any, name: any, receiver: any): any; } export declare class RadialGradient { _native: android.graphics.LinearGradient; constructor(param0: number, param1: number, param2: number, param3: any, param4: any, param5: any); get(target: any, name: any, receiver: any): any; } export declare class LinearGradient { _native: android.graphics.LinearGradient; getNative(): globalAndroid.graphics.LinearGradient; constructor(param0: number, param1: number, param2: number, param3: any, param4: any, param5: any, param6: any); get(target: any, name: any, receiver: any): any; } export declare class StaticLayout { _native: android.text.StaticLayout; getNative(): globalAndroid.text.StaticLayout; constructor(text: any, paint: android.graphics.Paint, width: number, align?: any, spacingmult?: number, spacingadd?: number, includepad?: boolean); get(target: any, name: any, receiver: any): any; } declare let Cap: any, Direction: any, DrawFilter: any, FillType: any, Join: any, Matrix: any, Op: any, PathEffect: any, Rect: any, RectF: any, Style: any, TileMode: any, FontMetrics: any, Align: any, LayoutAlignment: any; declare let PorterDuffMode: any, PorterDuffXfermode: any; declare class CanvasView extends CanvasBase { augmentedCanvas: Canvas; frameRatePaint: IPaint; shapePaint: IPaint; onDraw(canvas: ICanvas): void; nativeViewProtected: com.akylas.canvas.CanvasView; createNativeView(): com.akylas.canvas.CanvasView; initNativeView(): void; disposeNativeView(): void; redraw(): void; invalidate(): void; } export declare function createImage(options: { width: number; height: number; scale?: number; config?: android.graphics.Bitmap.Config; }): ImageSource; export declare function releaseImage(image: ImageSource): void; export { Canvas, CanvasView, Cap, Direction, DrawFilter, FillType, Join, Matrix, Op, PathEffect, Rect, RectF, Style, TileMode, FontMetrics, Align, LayoutAlignment, PorterDuffMode, PorterDuffXfermode, };