Graphviz 12.0.1~dev.20240716.0800
Loading...
Searching...
No Matches
glutils.c File Reference
#include <glcomp/glutils.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <glcomp/glcompdefs.h>
#include <math.h>
Include dependency graph for glutils.c:

Go to the source code of this file.

Functions

int GetOGLPosRef (int x, int y, float *X, float *Y)
 
float GetOGLDistance (float l)
 
void to3D (int x, int y, float *X, float *Y, float *Z)
 
static glCompPoint sub (glCompPoint p, glCompPoint q)
 
static double dot (glCompPoint p, glCompPoint q)
 
static double len (glCompPoint p)
 
static glCompPoint blend (glCompPoint p, glCompPoint q, float m)
 
static double dist (glCompPoint p, glCompPoint q)
 
double point_to_lineseg_dist (glCompPoint p, glCompPoint a, glCompPoint b)
 
void glCompCalcWidget (glCompCommon *parent, glCompCommon *child, glCompCommon *ref)
 
static void glCompQuadVertex (glCompPoint *p0, glCompPoint *p1, glCompPoint *p2, glCompPoint *p3)
 
void glCompSetColor (glCompColor *c)
 
void glCompDrawRectangle (glCompRect *r)
 
void glCompDrawRectPrism (glCompPoint *p, float w, float h, float b, float d, glCompColor *c, bool bumped)
 
float distBetweenPts (glCompPoint A, glCompPoint B, float R)
 
int is_point_in_rectangle (float X, float Y, float RX, float RY, float RW, float RH)
 

Function Documentation

◆ blend()

static glCompPoint blend ( glCompPoint  p,
glCompPoint  q,
float  m 
)
static

Definition at line 155 of file glutils.c.

References glCompPoint::x, glCompPoint::y, and glCompPoint::z.

Referenced by point_to_lineseg_dist().

Here is the caller graph for this function:

◆ dist()

static double dist ( glCompPoint  p,
glCompPoint  q 
)
static

Definition at line 165 of file glutils.c.

References len(), and sub.

Referenced by point_to_lineseg_dist().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ distBetweenPts()

float distBetweenPts ( glCompPoint  A,
glCompPoint  B,
float  R 
)

Definition at line 363 of file glutils.c.

References A, and B.

Referenced by pick_object().

Here is the caller graph for this function:

◆ dot()

static double dot ( glCompPoint  p,
glCompPoint  q 
)
static

Definition at line 145 of file glutils.c.

References glCompPoint::x, glCompPoint::y, and glCompPoint::z.

◆ GetOGLDistance()

float GetOGLDistance ( float  l)

Definition at line 53 of file glutils.c.

Referenced by close_poly(), glmotion_pan(), and pick_object().

Here is the caller graph for this function:

◆ GetOGLPosRef()

int GetOGLPosRef ( int  x,
int  y,
float *  X,
float *  Y 
)

Definition at line 19 of file glutils.c.

References X, and Y.

Referenced by glupdatecamera().

Here is the caller graph for this function:

◆ glCompCalcWidget()

void glCompCalcWidget ( glCompCommon parent,
glCompCommon child,
glCompCommon ref 
)

Definition at line 195 of file glutils.c.

References glCompCommon::align, glCompCommon::anchor, glCompAnchor::bottom, glCompAnchor::bottomAnchor, glAlignBottom, glAlignCenter, glAlignLeft, glAlignNone, glAlignParent, glAlignRight, glAlignTop, glCompCommon::height, glCompAnchor::left, glCompAnchor::leftAnchor, parent, glCompCommon::pos, ref(), glCompCommon::refPos, glCompAnchor::right, glCompAnchor::rightAnchor, glCompAnchor::top, glCompAnchor::topAnchor, glCompCommon::width, glCompPoint::x, and glCompPoint::y.

Referenced by glCompButtonDraw(), glCompImageDraw(), glCompLabelDraw(), and glCompPanelDraw().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ glCompDrawRectangle()

void glCompDrawRectangle ( glCompRect r)

Definition at line 299 of file glutils.c.

References glCompRect::h, glCompRect::pos, glCompRect::w, glCompPoint::x, glCompPoint::y, and glCompPoint::z.

Referenced by glCompPanelDraw().

Here is the caller graph for this function:

◆ glCompDrawRectPrism()

void glCompDrawRectPrism ( glCompPoint p,
float  w,
float  h,
float  b,
float  d,
glCompColor c,
bool  bumped 
)

Definition at line 309 of file glutils.c.

References A, glCompColor::A, glCompColor::B, B, C, D, E, F, glCompColor::G, G, glCompQuadVertex(), glCompColor::R, glCompPoint::x, glCompPoint::y, and glCompPoint::z.

Referenced by glCompButtonDraw(), and glCompPanelDraw().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ glCompQuadVertex()

static void glCompQuadVertex ( glCompPoint p0,
glCompPoint p1,
glCompPoint p2,
glCompPoint p3 
)
static

Definition at line 285 of file glutils.c.

References glCompPoint::x, glCompPoint::y, and glCompPoint::z.

Referenced by glCompDrawRectPrism().

Here is the caller graph for this function:

◆ glCompSetColor()

void glCompSetColor ( glCompColor c)

Definition at line 294 of file glutils.c.

References glCompColor::A, glCompColor::B, glCompColor::G, and glCompColor::R.

Referenced by glCompLabelDraw(), and glCompRenderText().

Here is the caller graph for this function:

◆ is_point_in_rectangle()

int is_point_in_rectangle ( float  X,
float  Y,
float  RX,
float  RY,
float  RW,
float  RH 
)

Definition at line 371 of file glutils.c.

References X, and Y.

Referenced by pick_objects_in_rect().

Here is the caller graph for this function:

◆ len()

static double len ( glCompPoint  p)
static

Definition at line 150 of file glutils.c.

References dot.

Referenced by adjust(), agwrite(), agxbnext(), agxbpop(), agxbput_int(), agxbput_n(), agxbputc(), agxbuf_trim_zeros(), attach_edge_label_coordinates(), bbOf(), computeoffset_qr(), concat(), concat(), cvtAndAppend(), dist(), edge_compatibility_full(), exprintf(), exsubstr(), genBundleColors(), getlength(), getNum(), getoutputbuffer(), gLength(), gv_channel_writer(), gv_channel_writer(), gv_channel_writer(), gv_string_writer(), gv_string_writer(), gv_string_writer(), gvdevice_gd_putBuf(), gvplugin_library_load(), gvprintdouble(), gvprintf(), gvputs(), gvwrite(), gvwrite_no_z(), htmllex(), ideal_distance_matrix(), lasi_body_writer(), lasi_footer_writer(), lasi_head_writer(), Layout::Layout(), lua_tolstring(), make_aux_edge(), make_msg(), myagxget(), myagxset(), myagxset(), pedge_double(), pedge_export_gv(), power_iteration(), random_permutation(), record_init(), scanEntity(), setEdgeLen(), smooth_vec(), smyrnaPath(), splitBSpline(), storeFileName(), storeFileName(), str_and(), str_ior(), str_mod(), str_mpy(), str_xor(), stress_majorization_kD_mkernel(), sumLengths_avoid_bad_angle(), SWIG_AsCharPtrAndSize(), SWIG_AsCharPtrAndSize(), SWIG_AsCharPtrAndSize(), SWIG_Guile_scm2newstr(), Tcldot_channel_writer(), Tcldot_string_writer(), tclGdTextCmd(), toLower(), toUpper(), update(), vmstrdup(), and xyOf().

Here is the caller graph for this function:

◆ point_to_lineseg_dist()

double point_to_lineseg_dist ( glCompPoint  p,
glCompPoint  a,
glCompPoint  b 
)

Definition at line 176 of file glutils.c.

References blend(), dist(), dot, and sub.

Referenced by pick_object().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sub()

static glCompPoint sub ( glCompPoint  p,
glCompPoint  q 
)
static

Definition at line 137 of file glutils.c.

References glCompPoint::x, glCompPoint::y, and glCompPoint::z.

◆ to3D()

void to3D ( int  x,
int  y,
float *  X,
float *  Y,
float *  Z 
)

Definition at line 100 of file glutils.c.

References WIDTH, X, and Y.

Referenced by appmouse_down(), appmouse_drag(), appmouse_move(), appmouse_up(), and CBglCompMouseRightClick().

Here is the caller graph for this function: