1#ifndef RNAPUZZLER_SVG_ARCS
2#define RNAPUZZLER_SVG_ARCS
3
4/*
5 *      RNApuzzler Calculation of arc data for svg files
6 *
7 *      ViennaRNA package
8 */
9
10#include <stdlib.h>
11
12#include "ViennaRNA/utils/basic.h"
13
14#include "vector_math.inc"
15#include "../headers/tBaseInformation_struct.h"
16
17
18//Probably would be cleverer to move this method elsewhere and delete this file. It was planned that this File would have more methods but the transformation of the coords for the SVG Arc was easier than expected.
19PRIVATE void transformPSArcsToSVG(int n, double * oldArcs, double ** newArcs){
20	*newArcs = (double*)vrna_alloc(n*2*sizeof(double));
21	for(int i=0;i<n;i++){
22		//Arc exists
23		if(oldArcs[6*i + 2] > 0){	//radius
24			(*newArcs)[2*i] = oldArcs[6*i + 2];
25			(*newArcs)[2*i +1] = oldArcs[6*i + 5];  //goClockwise
26		} else{
27			(*newArcs)[2*i] = -1;
28			(*newArcs)[2*i+1] = -1;
29		}
30	}
31
32
33}
34
35#endif