private void DrawPdfAnnotatedBaseSequence(PsmFromTsv psm, Canvas canvas, string path)
        {
            if (psm.CrossType == null)
            {
                DrawAnnotatedBaseSequence(psm);
            }

            string pathToBaseSeq = Path.Combine(Path.GetDirectoryName(path), "annotation.png");

            CustomPdfWriter.RenderImage((int)canvas.Width, 600, pathToBaseSeq, canvas);
        }
        private void DrawPdfCoverageMap(ProteinForTreeView protein, Grid mapGrid, string path)
        {
            // draw coverage map
            mapGrid.Width = 1000;
            DrawSequenceCoverageMap(protein);

            string pathToCoverageMap = Path.Combine(Path.GetDirectoryName(path), "map.png");

            CustomPdfWriter.RenderImage((int)mapGrid.Width, (int)mapGrid.Height, pathToCoverageMap, map);

            // draw legend
            SequenceCoverageMap.drawLegend(legend, proteaseByColor, proteases, legendGrid);
            string pathToLegend = Path.Combine(Path.GetDirectoryName(path), "legend.png");

            CustomPdfWriter.RenderImage((int)(legend.Width), 50, pathToLegend, legend);

            CustomPdfWriter.WriteToPdfMetaDraw(mapGrid.Width, mapGrid.Height, pathToCoverageMap, pathToLegend, path);
        }