import { IQuestion , QuestionSignaturePadModel } from 'survey-core' ; import { SurveyPDF } from '../survey' ; import { FlatQuestion } from './flat_question' ; import { FlatRepository } from './flat_repository' ; import { IPoint , DocController } from '../doc_controller' ; import { IPdfBrick } from '../pdf_render/pdf_brick' ; import { SurveyHelper } from '../helper_survey' ; export class FlatSignaturePad extends FlatQuestion { protected question : QuestionSignaturePadModel ; public constructor ( protected survey , question , controller ) { super ( survey , question , controller ) ; this . question = < QuestionSignaturePadModel > question ; } public async generateFlatsContent ( point ) { let imageBrick = SurveyHelper . createImageFlat ( point , this . question , this . controller , this . question . value , SurveyHelper . pxToPt ( < any > this . question . width ) , SurveyHelper . pxToPt ( < any > this . question . height ) ) ; return [ imageBrick ] ; } } FlatRepository . getInstance ( ) . register ( 'signaturepad' , FlatSignaturePad ) ;