38#define LAYER_DIFF 0.001
74 glBegin(GL_LINE_STRIP);
89 for (i = 0; i <= 20; i++) {
91 X = Ax * a * a * a + Bx * 3 * a * a * b + Cx * 3 * a * b * b +
93 Y = Ay * a * a * a + By * 3 * a * a * b + Cy * 3 * a * b * b +
95 Z = Az * a * a * a + Bz * 3 * a * a * b + Cz * 3 * a * b * b +
134 for (
size_t i = 1; i < op->
u.
bezier.
cnt; i += 3) {
175 glBegin(GL_LINE_LOOP);
178 for (i = 0; i < 360; i = i + 1) {
180 float degInRad = (float) (i *
DEG2RAD);
181 glVertex3f((
float)(x + cos(degInRad) * xradius),
230 glBegin(GL_LINE_STRIP);
244 c.
R = (float) cl.
u.
RGBA[0];
245 c.
G = (float) cl.
u.
RGBA[1];
246 c.
B = (float) cl.
u.
RGBA[2];
247 c.
A = (float) cl.
u.
RGBA[3];
300 fprintf (stderr,
"Could not open file \"%s\" to read image.\n", o->
op.
u.
image.
name);
310static int put(
void *buffer,
const char *
s) {
313 for (; *
s !=
'\0'; ++
s) {
346 char *escaped = calloc(
sizeof(
char), strlen(o->
op.
u.
text.
text) *
347 sizeof(
"�") + 1);
353 char **ptr = &escaped;
372 glBegin(GL_LINE_STRIP);
389 for (i = 0; i < 360; i = i + 36) {
390 float degInRad = (float) (i *
DEG2RAD);
391 glVertex3f((
float)(x + cos(degInRad) * radius),
392 (
float)(y + sin(degInRad) * radius),
414 glBegin(GL_LINE_STRIP);
415 for (
size_t i = 0; i < glCompPoly_size(selPoly); ++i) {
417 glVertex3f(pt.
x, pt.
y, pt.
z);
420 if (!glCompPoly_is_empty(selPoly)) {
422 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
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.