0

Native script Drawing Pad - How to get signed data with the background image?

View code

<DrawingPad #DrawingPad1
                    height="400"    
                    id="drawingPad" 
                    penColor="#f70202" penWidth="3"  class="draw-pad"  style="background: url('~/images/deer.jpg')no-repeat center ;">
                    </DrawingPad>

angular ts code

let pad = this.DrawingPad1.nativeElement;
  // then get the drawing (Bitmap on Android) of the DrawingPad1
  let drawingImage;
  pad.getDrawing().then(
    (data)=> {
      console.log(data);
      drawingImage = data;
      this.userImage.nativeElement.src = data;
    },(err)=> {
      console.log(err);
    }
  );

I need to get data with the background. Pls suggest

Sankar
  • 652
  • 6
  • 13
  • 1
    A simple solution could be using the [nativescript-screenshot](https://market.nativescript.org/plugins/nativescript-screenshot) plugin and capture the image of DrawingPad view. – Manoj Dec 17 '18 at 12:24
  • Hi @Manoj, Thanks for your reply. Have you tried this? Do we have the option to mention the particular DOM on the page? – Sankar Dec 17 '18 at 12:54
  • Yes, it does as I mentioned in my previous comment generate image form DrawingPad view. – Manoj Dec 17 '18 at 14:42

0 Answers0