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 +
130 for (
size_t i = 1; i < op->
u.
bezier.
cnt; i += 3) {
169 glBegin(GL_LINE_LOOP);
172 for (
int i = 0; i < 360; ++i) {
174 float degInRad = (float) (i *
DEG2RAD);
175 glVertex3f((
float)(x + cos(degInRad) * xradius),
221 glBegin(GL_LINE_STRIP);
235 c.
R = (float) cl.
u.
RGBA[0];
236 c.
G = (float) cl.
u.
RGBA[1];
237 c.
B = (float) cl.
u.
RGBA[2];
238 c.
A = (float) cl.
u.
RGBA[3];
278 fprintf (stderr,
"Could not open file \"%s\" to read image.\n", o->
op.
u.
image.
name);
288static int put(
void *buffer,
const char *
s) {
291 for (; *
s !=
'\0'; ++
s) {
324 char *escaped = calloc(
sizeof(
char), strlen(o->
op.
u.
text.
text) *
325 sizeof(
"�") + 1);
350 glBegin(GL_LINE_STRIP);
366 for (
int i = 0; i < 360; i += 36) {
367 float degInRad = (float) (i *
DEG2RAD);
368 glVertex3f(x + cosf(degInRad) * radius, y + sinf(degInRad) * radius,
392 glBegin(GL_LINE_STRIP);
393 for (
size_t i = 0; i < glCompPoly_size(selPoly); ++i) {
395 glVertex3f(pt.
x, pt.
y, pt.
z);
398 if (!glCompPoly_is_empty(selPoly)) {
400 glBegin(GL_LINE_STRIP);
static agxbuf last
last message
void colorxlate(char *str, agxbuf *buf)
static void SetFont(xdot_op *op, 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 EmbedText(xdot_op *op, int param)
static void DrawEllipse(xdot_op *op, int param)
void drawBorders(ViewInfo *vi)
static void SetPenColor(xdot_op *op, int param)
static glCompColor GetglCompColor(const char *color)
static void DrawPolyline(xdot_op *op, int param)
void drawCircle(float x, float y, float radius, float zdepth)
static void InsertImage(xdot_op *op, int param)
static void set_options(int param)
static void DrawBeziers(xdot_op *op, int param)
static void DrawPolygon(xdot_op *op, int param)
static void SetFillColor(xdot_op *op, int param)
#define X(prefix, name, str, type, subtype,...)
void glCompDrawText3D(glCompFont f, float x, float y, double z, float w, float h)
glCompFont glNewFont(glCompSet *s, const char *text, glCompColor *c, char *fontdesc, int fs, bool is2D)
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
options to tweak the behavior of XML escaping
parsing and deparsing of xdot operations
void(* drawfunc_t)(xdot_op *, int)
int gv_xml_escape(const char *s, xml_flags_t flags, int(*cb)(void *state, const char *s), void *state)
XML escaping functionality.