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) {
176 glBegin(GL_LINE_LOOP);
179 for (i = 0; i < 360; i = i + 1) {
181 float degInRad = (float) (i *
DEG2RAD);
182 glVertex3f((
float)(x + cos(degInRad) * xradius),
231 glBegin(GL_LINE_STRIP);
245 c.
R = (float) cl.
u.
RGBA[0];
246 c.
G = (float) cl.
u.
RGBA[1];
247 c.
B = (float) cl.
u.
RGBA[2];
248 c.
A = (float) cl.
u.
RGBA[3];
301 fprintf (stderr,
"Could not open file \"%s\" to read image.\n", o->
op.
u.
image.
name);
311static int put(
void *buffer,
const char *
s) {
314 for (; *
s !=
'\0'; ++
s) {
347 char *escaped = calloc(
sizeof(
char), strlen(o->
op.
u.
text.
text) *
348 sizeof(
"�") + 1);
354 char **ptr = &escaped;
373 glBegin(GL_LINE_STRIP);
390 for (i = 0; i < 360; i = i + 36) {
391 float degInRad = (float) (i *
DEG2RAD);
392 glVertex3f((
float)(x + cos(degInRad) * radius),
393 (
float)(y + sin(degInRad) * radius),
415 glBegin(GL_LINE_STRIP);
416 for (
size_t i = 0; i < glCompPoly_size(selPoly); ++i) {
418 glVertex3f(pt.
x, pt.
y, pt.
z);
421 if (!glCompPoly_is_empty(selPoly)) {
423 glBegin(GL_LINE_STRIP);
static agxbuf last
last message
void colorxlate(char *str, agxbuf *buf)
static void DrawBeziers(sdot_op *o, int param)
void draw_selpoly(glCompPoly_t *selPoly)
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)
static glCompColor GetglCompColor(const char *color)
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)
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, const 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)