39#define LAYER_DIFF 0.001
75 glBegin(GL_LINE_STRIP);
90 for (i = 0; i <= 20; i++) {
92 X = Ax * a * a * a + Bx * 3 * a * a * b + Cx * 3 * a * b * b +
94 Y = Ay * a * a * a + By * 3 * a * a * b + Cy * 3 * a * b * b +
96 Z = Az * a * a * a + Bz * 3 * a * a * b + Cz * 3 * a * b * b +
135 for (
size_t i = 1; i < op->
u.
bezier.
cnt; i += 3) {
177 glBegin(GL_LINE_LOOP);
180 for (i = 0; i < 360; i = i + 1) {
182 float degInRad = (float) (i *
DEG2RAD);
183 glVertex3f((
float)(x + cos(degInRad) * xradius),
232 glBegin(GL_LINE_STRIP);
247 c.
R = (float) cl.
u.
RGBA[0];
248 c.
G = (float) cl.
u.
RGBA[1];
249 c.
B = (float) cl.
u.
RGBA[2];
250 c.
A = (float) cl.
u.
RGBA[3];
303 fprintf (stderr,
"Could not open file \"%s\" to read image.\n", o->
op.
u.
image.
name);
313static int put(
void *buffer,
const char *
s) {
316 for (; *
s !=
'\0'; ++
s) {
350 char *escaped = calloc(
sizeof(
char), strlen(o->
op.
u.
text.
text) *
351 sizeof(
"�") + 1);
357 char **ptr = &escaped;
376 glBegin(GL_LINE_STRIP);
393 for (i = 0; i < 360; i = i + 36) {
394 float degInRad = (float) (i *
DEG2RAD);
395 glVertex3f((
float)(x + cos(degInRad) * radius),
396 (
float)(y + sin(degInRad) * radius),
420 glBegin(GL_LINE_STRIP);
421 for (i = 0;i < selPoly->
cnt ; i++)
423 glVertex3f(selPoly->
pts[i].
x,selPoly->
pts[i].
y,selPoly->
pts[i].
z);
428 glBegin(GL_LINE_STRIP);
429 glVertex3f(selPoly->
pts[selPoly->
cnt-1].
x,selPoly->
pts[selPoly->
cnt-1].
y,selPoly->
pts[selPoly->
cnt-1].
z);
void colorxlate(char *str, agxbuf *buf)
static void DrawBeziers(sdot_op *o, int param)
static int put(void *buffer, const char *s)
static void DrawBezier(xdot_point *pts, int filled, int param)
static void SetStyle(sdot_op *o, int param)
static void EmbedText(sdot_op *o, int param)
void drawBorders(ViewInfo *vi)
static void DrawPolygon(sdot_op *o, int param)
void drawCircle(float x, float y, float radius, float zdepth)
static void set_options(int param)
static void SetFillColor(sdot_op *o, int param)
static void SetPenColor(sdot_op *o, int param)
static void InsertImage(sdot_op *o, int param)
static void SetFont(sdot_op *o, int param)
static void DrawPolyline(sdot_op *o, int param)
void draw_selpoly(glCompPoly *selPoly)
static glCompColor GetglCompColor(char *color)
static void DrawEllipse(sdot_op *o, int param)
#define X(prefix, name, str, type, subtype,...)
glCompFont * glNewFont(glCompSet *s, char *text, glCompColor *c, char *fontdesc, int fs, bool is2D)
void glCompDrawText3D(glCompFont *f, float x, float y, double z, float w, float h)
glCompImage * glCompImageNewFile(float x, float y, char *imgfile)
static void color(Agraph_t *g)
int get_mode(ViewInfo *v)
void drawTessPolygon(sdot_op *p)
glCompColor selectedNodeColor
glCompCallBacks functions
graphs, nodes and edges info: Agraphinfo_t, Agnodeinfo_t and Agedgeinfo_t
int xml_escape(const char *s, xml_flags_t flags, int(*cb)(void *state, const char *s), void *state)
parsing and deparsing of xdot operations
void(* drawfunc_t)(xdot_op *, int)