BRL-CAD
dm-ps.c File Reference
#include "common.h"
#include <string.h>
#include "tcl.h"
#include "vmath.h"
#include "bn.h"
#include "mater.h"
#include "raytrace.h"
#include "dm.h"
#include "dm-ps.h"
#include "dm-Null.h"
#include "solid.h"
#include "./dm_private.h"
Include dependency graph for dm-ps.c:

Go to the source code of this file.

Macros

#define EPSILON   0.0001
 
#define PLOTBOUND   1000.0 /* Max magnification in Rot matrix */
 

Functions

HIDDEN int ps_close (dm *dmp)
 
HIDDEN int ps_drawBegin (dm *dmp)
 
HIDDEN int ps_drawEnd (dm *dmp)
 
HIDDEN int ps_loadMatrix (dm *dmp, fastf_t *mat, int which_eye)
 
HIDDEN int ps_drawVList (dm *dmp, struct bn_vlist *vp)
 
HIDDEN int ps_draw (dm *dmp, struct bn_vlist *(*callback_function)(void *), void **data)
 
HIDDEN int ps_normal (dm *dmp)
 
HIDDEN int ps_drawString2D (dm *dmp, const char *str, fastf_t x, fastf_t y, int size, int use_aspect)
 
HIDDEN int ps_drawLine2D (dm *dmp, fastf_t xpos1, fastf_t ypos1, fastf_t xpos2, fastf_t ypos2)
 
HIDDEN int ps_drawLine3D (dm *dmp, point_t pt1, point_t pt2)
 
HIDDEN int ps_drawLines3D (dm *dmp, int npoints, point_t *points, int sflag)
 
HIDDEN int ps_drawPoint2D (dm *dmp, fastf_t x, fastf_t y)
 
HIDDEN int ps_setFGColor (dm *dmp, unsigned char r, unsigned char g, unsigned char b, int strict, fastf_t transparency)
 
HIDDEN int ps_setBGColor (dm *dmp, unsigned char r, unsigned char g, unsigned char b)
 
HIDDEN int ps_setLineAttr (dm *dmp, int width, int style)
 
HIDDEN int ps_debug (dm *dmp, int lvl)
 
HIDDEN int ps_logfile (dm *dmp, const char *filename)
 
HIDDEN int ps_setWinBounds (dm *dmp, fastf_t *w)
 
dmps_open (Tcl_Interp *interp, int argc, const char *argv[])
 

Variables

char ps_usage []
 
struct ps_vars head_ps_vars
 
dm dm_ps
 

Detailed Description

A useful hack to allow GED to generate PostScript files that not only contain the drawn objects, but also contain the faceplate display as well. Mostly, used for making viewgraphs and photographs of an editing session.

Definition in file dm-ps.c.

Macro Definition Documentation

#define EPSILON   0.0001

Definition at line 53 of file dm-ps.c.

#define PLOTBOUND   1000.0 /* Max magnification in Rot matrix */

Definition at line 57 of file dm-ps.c.

Function Documentation

HIDDEN int ps_close ( dm dmp)

Definition at line 70 of file dm-ps.c.

References bu_free(), bu_vls_free(), dm_internal::dm_pathName, dm_internal::dm_tkName, dm_internal::dm_vars, and dm_vars::priv_vars.

Referenced by ps_open().

Here is the call graph for this function:

HIDDEN int ps_drawBegin ( dm dmp)

Definition at line 95 of file dm-ps.c.

HIDDEN int ps_drawEnd ( dm dmp)

Definition at line 105 of file dm-ps.c.

References dm_internal::dm_vars, and dm_vars::priv_vars.

HIDDEN int ps_loadMatrix ( dm dmp,
fastf_t mat,
int  which_eye 
)

Definition at line 126 of file dm-ps.c.

References bu_vls_addr(), bu_vls_free(), BU_VLS_INIT_ZERO, bu_vls_printf(), dm_internal::dm_interp, dm_internal::dm_vars, and dm_vars::priv_vars.

Here is the call graph for this function:

HIDDEN int ps_draw ( dm dmp,
struct bn_vlist *(*)(void *)  callback_function,
void **  data 
)

Definition at line 294 of file dm-ps.c.

References ps_drawVList().

Here is the call graph for this function:

HIDDEN int ps_normal ( dm dmp)

Definition at line 319 of file dm-ps.c.

HIDDEN int ps_drawString2D ( dm dmp,
const char *  str,
fastf_t  x,
fastf_t  y,
int  size,
int  use_aspect 
)

Definition at line 334 of file dm-ps.c.

References dm_internal::dm_vars, and dm_vars::priv_vars.

HIDDEN int ps_drawLine2D ( dm dmp,
fastf_t  xpos1,
fastf_t  ypos1,
fastf_t  xpos2,
fastf_t  ypos2 
)

Definition at line 368 of file dm-ps.c.

References dm_internal::dm_vars, and dm_vars::priv_vars.

Referenced by ps_drawPoint2D().

HIDDEN int ps_drawLine3D ( dm dmp,
point_t  pt1,
point_t  pt2 
)

Definition at line 390 of file dm-ps.c.

References draw_Line3D().

Here is the call graph for this function:

HIDDEN int ps_drawLines3D ( dm dmp,
int  npoints,
point_t *  points,
int  sflag 
)

Definition at line 397 of file dm-ps.c.

HIDDEN int ps_drawPoint2D ( dm dmp,
fastf_t  x,
fastf_t  y 
)

Definition at line 407 of file dm-ps.c.

References ps_drawLine2D().

Here is the call graph for this function:

HIDDEN int ps_setFGColor ( dm dmp,
unsigned char  r,
unsigned char  g,
unsigned char  b,
int  strict,
fastf_t  transparency 
)

Definition at line 414 of file dm-ps.c.

References bu_log().

Here is the call graph for this function:

HIDDEN int ps_setBGColor ( dm dmp,
unsigned char  r,
unsigned char  g,
unsigned char  b 
)

Definition at line 426 of file dm-ps.c.

References bu_log().

Here is the call graph for this function:

HIDDEN int ps_setLineAttr ( dm dmp,
int  width,
int  style 
)
HIDDEN int ps_debug ( dm dmp,
int  lvl 
)

Definition at line 454 of file dm-ps.c.

References dm_internal::dm_debugLevel.

HIDDEN int ps_logfile ( dm dmp,
const char *  filename 
)

Definition at line 461 of file dm-ps.c.

References bu_vls_sprintf(), and dm_internal::dm_log.

Here is the call graph for this function:

HIDDEN int ps_setWinBounds ( dm dmp,
fastf_t w 
)

Definition at line 468 of file dm-ps.c.

References dm_internal::dm_clipmax, dm_internal::dm_clipmin, and dm_internal::dm_zclip.

dm* ps_open ( Tcl_Interp *  interp,
int  argc,
const char *  argv[] 
)

Definition at line 576 of file dm-ps.c.

References BU_ALLOC, bu_vls_addr(), bu_vls_init(), bu_vls_printf(), bu_vls_strcpy(), dm_internal::dm_interp, DM_NULL, dm_internal::dm_pathName, dm_ps, dm_internal::dm_tkName, dm_internal::dm_vars, dm_internal::dm_zclip, OSL::Strings::interp, dm_vars::priv_vars, ps_close(), and ps_usage.

Referenced by dm_open().

Here is the call graph for this function:

Variable Documentation

char ps_usage[]
Initial value:
= "Usage: ps [-f font] [-t title] [-c creator] [-s size in inches]\
[-l linewidth] file"

Definition at line 59 of file dm-ps.c.

Referenced by ps_open().