import { CanvasGradientBase } from './canvas-plugin.common' ; import { Color } from '@nativescript/core/color' ; export class CanvasGradient extends CanvasGradientBase { readonly nativeInstance ; protected constructor ( nativeInstance ) { super ( ) ; this . nativeInstance = nativeInstance ; } get native ( ) { return this . nativeInstance ; } static fromNative ( nativeInstance ) { return new CanvasGradient ( nativeInstance ) ; } public addColorStop ( offset , color ) { this . nativeInstance . addColorStop ( offset , new Color ( color ) . android ) ; } }