f3e15b8c8d
- aggiunti file della libreria e progetto visual studio.
105 lines
3.9 KiB
C
105 lines
3.9 KiB
C
/*****************************************************************************/
|
|
/* */
|
|
/* Copyright (C) 1996-2023 M. Held */
|
|
/* */
|
|
/* This code is not in the public domain. All rights reserved! Please make */
|
|
/* sure to read the full copyright statement contained in "README.txt" or in */
|
|
/* the "main" file of this code, such as "main.cc". */
|
|
/* */
|
|
/*****************************************************************************/
|
|
/* */
|
|
/* Purpose: This is an interface to Ipe. */
|
|
/* */
|
|
/* Acknowledgements: based on fragments written by Ch. Spielberger. */
|
|
/* */
|
|
/* E-Mail: held@cs.sbg.ac.at */
|
|
/* Fax Mail: (+43 662) 8044-172 */
|
|
/* Voice Mail: (+43 662) 6044-6304 */
|
|
/* Snail Mail: Martin Held */
|
|
/* Universitaet Salzburg */
|
|
/* FB Informatik */
|
|
/* A-5020 Salzburg, Austria */
|
|
/* */
|
|
/*****************************************************************************/
|
|
#ifndef IPE7_IO_H
|
|
#define IPE7_IO_H
|
|
|
|
#include "types.h"
|
|
|
|
|
|
|
|
#define XMIN 0.0
|
|
#define XMAX 452.0
|
|
#define YMIN 0.0
|
|
#define YMAX 568.0
|
|
|
|
#define LAYER0 "boundary"
|
|
#define LAYER1 "voronoi"
|
|
#define LAYER2 "MAT"
|
|
#define LAYER3 "delaunay"
|
|
#define LAYER4 "offset"
|
|
#define LAYER5 "MIC"
|
|
#define LAYER6 "bd_vertices"
|
|
#define LAYER7 "vd_nodes"
|
|
|
|
#define COLOR0 "seagreen"
|
|
#define COLOR1 "red"
|
|
#define COLOR2 "black"
|
|
#define COLOR3 "blue"
|
|
#define COLOR4 "lightgray"
|
|
#define COLOR5 "yellow"
|
|
#define COLOR6 "black"
|
|
#define COLOR7 "violet"
|
|
|
|
#define PEN0 "ultrafat"
|
|
#define PEN1 "normal"
|
|
#define PEN2 "fat"
|
|
#define PEN3 "normal"
|
|
#define PEN4 "normal"
|
|
#define PEN5 "normal"
|
|
#define PEN6 "normal"
|
|
#define PEN7 "normal"
|
|
|
|
|
|
FILE *InitIpeFile(char *filename);
|
|
|
|
FILE *InitIpe(char *filename, double_arg xl, double_arg xr, double_arg yl, double_arg yr);
|
|
|
|
void CloseIpeFile(FILE *ipe_file);
|
|
|
|
void WriteBeginPath(FILE *ipe_file, double x1, double y1);
|
|
|
|
void WriteBeginGroup(FILE *ipe_file, short int layer);
|
|
|
|
void WriteEndGroup(FILE *ipe_file);
|
|
|
|
|
|
void WriteArcCCW(FILE *ipe_file, double_arg xc, double_arg yc, double_arg r,
|
|
double_arg alpha, double_arg beta);
|
|
|
|
void WriteArcCW(FILE *ipe_file, double_arg xc, double_arg yc, double_arg r,
|
|
double_arg alpha, double_arg beta);
|
|
|
|
void WriteMark(FILE *ipe_file, int type, int size, double_arg x, double_arg y);
|
|
|
|
void SetIpeDimensions(double_arg xmin, double_arg xmax, double_arg ymin, double_arg ymax);
|
|
|
|
void SetWorldDimensions(double_arg xmin, double_arg xmax, double_arg ymin, double_arg ymax);
|
|
|
|
void SetScaleFactor(void);
|
|
|
|
void InitIpeDimensions(double_arg xmin, double_arg ymin, double_arg xmax, double_arg ymax,
|
|
double_arg ixmin, double_arg iymin, double_arg ixmax, double_arg iymax);
|
|
|
|
double scaleX(double x);
|
|
double scaleY(double y);
|
|
|
|
void WriteLineSegment(FILE *ipe_file,
|
|
double x1, double y1, double x2, double y2);
|
|
|
|
void WriteCircularArc(FILE *ipe_file, double_arg xc, double_arg yc,
|
|
double_arg x1, double_arg y1, double_arg x2, double_arg y2, vr_bool ccw);
|
|
|
|
|
|
#endif
|