export class CropService { public canvas : HTMLCanvasElement ; public ctx : CanvasRenderingContext2D ; public init ( canvas ) { this . canvas = canvas ; this . ctx = < CanvasRenderingContext2D > this . canvas . getContext ( "2d" ) ; } }