Commit 489ba1f4 authored by Mathieu Faverge's avatar Mathieu Faverge

Remove useless file

parent 42d91f60
/**
*
* @file treedraw.c
*
* All the functions required for drawing tree are here.
*
* @copyright 2017-2018 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
* Univ. Bordeaux. All rights reserved.
*
* @version 1.0.0
* @author Raphael Boucherie
* @author Mathieu Faverge
* @date 2017-04-04
*
*/
#include <string.h>
#include <stdio.h>
#include "libhqr_draw.h"
/*
* Global array for color
*/
char *colortree[4] = {"red", "blue", "green", "purple"};
/*
* functions writing in the svg file
*/
void libhqr_writeheader(FILE *file)
{
fprintf( file, "<?xml version=\"1.0\" standalone=\"no\"?>\n"
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n"
"<svg width=\"2000\" height=\"2000\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n" );
}
/*
* Common prameters to the 2 following functions:
* x - Parameter x for the x-axis
* y - Parameter y for the y-axis
* w - Parameter w for the width
* h - Parameter h for the height
* k - Factorization step for the color
*/
void libhqr_drawTT(int x, int y, int w, int h, int k, FILE *file)
{
fprintf( file, "<rect x=\"%d\" y=\"%d\" width=\"%d\" height=\"%d\" fill=\"%s\" />\n",
x, y, w, h, colortree[k%4] );
}
void libhqr_drawTS(int x, int y, int w, int h, int k, FILE *file)
{
int x2 = x + (w / 4);
int y2 = y + (h / 4);
int w2 = (w / 2);
int h2 = (h / 2);
fprintf( file, "<rect x=\"%d\" y=\"%d\" width=\"%d\" height=\"%d\" fill=\"%s\" />\n",
x, y, w, h, colortree[k%4] );
fprintf( file, "<rect x=\"%d\" y=\"%d\" width=\"%d\" height=\"%d\" fill =\"white\"/>\n",
x2, y2, w2, h2 );
}
void libhqr_drawline(int x1, int y1, int x2, int y2, int k, FILE *file)
{
fprintf( file, "<line x1=\"%d\" y1=\"%d\" x2=\"%d\" y2=\"%d\" style=\"fill:none;stroke:%s;stroke-width:2px;\"/>\n",
x1, y1, x2, y2, colortree[k%4] );
}
void libhqr_writeend(FILE *file)
{
fprintf(file, "</svg>");
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment