gCAD3D 2.35
ut_gtx.c File Reference

graphic text functions More...

#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../ut/ut_geo.h"
#include "../ut/ut_txt.h"
#include "../ut/ut_TX.h"
#include "../db/ut_DB.h"
#include "../gr/ut_gr.h"
#include "../gr/vf.h"
#include "../gr/ut_GL.h"

Functions

int GR_gxt_nkNr (char *fmt)
 
int GR_InitGFPar (double txdimsiz)
 
double GTX_scale (double size)
 
double GTX_siz__ (double cw1)
 
double GTX_chw_ (double size)
 
double GTX_cw_ ()
 
double GTX_chh_ (double size)
 
double GTX_chhl_ (double size)
 
double GTX_chhl2 (double size)
 
int GTX_ardxy (double *ardx, double *ardy)
 
double GR_gtx_ckBlockWidth (char *txt, double size)
 
int GR_gxt_subst1 (char *txo, char *fmt, char *tx1)
 
int GR_gxt_prep_Pt (char *txo, Point *pt, int nkz)
 
int GR_gxt_prep1 (char *txo, double d1)
 
int GR_img_get_dbi (int *typ, Point *p1, int *sx, int *sy, int *dx, int *dy, long dbi)
 
int GR_img_get_obj (int *typ, Point *p1, int *sx, int *sy, int *dx, int *dy, AText *atx1)
 
int GR_gtx_BlockWidth__ (int *chrNr, int *lNr, char *txt)
 
int GR_gxt_dump ()
 

Variables

double AP_txsiz
 Notes-Defaultsize. More...
 
double AP_txdimsiz
 Dimensions-Text-Defaultsize. More...
 
int AP_txNkNr
 Nachkommastellen. More...
 
double GR_tx_scale = 1.
 
double GR_tx_ldExt
 
double GR_tx_ardx
 
double GR_tx_ardy
 
double GR_tx_chw
 
double GR_tx_chh
 
int GR_tx_nkNr
 
double GR_fontSiz = 0.055
 

Detailed Description

graphic text functions

=====================================================
List_functions_start:
GR_InitGFPar Init Graf.Fontparameters
GTX_scale returns total scale
GTX_siz__ returns scale from charWidth
GTX_chw_ returns (charWidth + spcWidth) scaled
GTX_cw_ returns (charWidth + spcWidth)
GR_gtx_BlockWidth__ get chrNr=max_nr_of_chars and lNr=nr_of_lines
GR_gtx_ckBlockWidth Breite eines Textblocks errechnen
GTX_chh_ returns charHeight scaled
GTX_chhl_ returns (charHeight + interlinespace)) scaled
GTX_chhl2 returns (charHeight + (interlinespace/2)) scaled
GTX_ardxy returns arrowSize in x & y
GR_gxt_subst1 substitute [% by text
GR_gxt_prep1 prepare dimText
GR_gxt_prep_Pt prepare dimText
GR_gxt_nkNr extract nkNr
GR_gxt_strLen get stringlength of textnote INLINE
List_functions_end:
=====================================================

Function Documentation

int GR_gxt_nkNr ( char *  fmt)
int GR_InitGFPar ( double  txdimsiz)
double GTX_scale ( double  size)
double GTX_siz__ ( double  cw1)
double GTX_chw_ ( double  size)
double GTX_cw_ ( )

Breite character + intercharspace

double GTX_chh_ ( double  size)
get character height
Example:
double GTX_chhl_ ( double  size)

height character + interlinespace

double GTX_chhl2 ( double  size)

height character + halber interlinespace

int GTX_ardxy ( double *  ardx,
double *  ardy 
)

GTX_ardxy returns arrowSize in x & y

double GR_gtx_ckBlockWidth ( char *  txt,
double  size 
)

Breite eines Textblocks in Usercoords errechnen

int GR_gxt_subst1 ( char *  txo,
char *  fmt,
char *  tx1 
)
int GR_gxt_prep_Pt ( char *  txo,
Point pt,
int  nkz 
)
int GR_gxt_prep1 ( char *  txo,
double  d1 
)
int GR_img_get_dbi ( int *  typ,
Point p1,
int *  sx,
int *  sy,
int *  dx,
int *  dy,
long  dbi 
)
get Tag/Image
Input:
dbi DB-Index of "N"ote
Output:
typ Tagtyp; 1=Image ..
p1 lower-left-position in Usercoords
sx, sy size of 2D-Field in screencoords
dx, dy offset from p1 to lower left 2D-corner in screencoords
retCod 0=ok, -1=Error
was DL_txtgetInfo
int GR_img_get_obj ( int *  typ,
Point p1,
int *  sx,
int *  sy,
int *  dx,
int *  dy,
AText atx1 
)
get Tag/Image
Input:
dbi DB-Index of "N"ote
Output:
typ Tagtyp; 1=Image ..
p1 lower-left-position in Usercoords
sx, sy size of 2D-Field in screencoords
dx, dy offset from p1 to lower left 2D-corner in screencoords
retCod 0=ok, -1=Error
See also DL_setTagSiz
was DL_txtgetInfo
int GR_gtx_BlockWidth__ ( int *  chrNr,
int *  lNr,
char *  txt 
)
get chrNr=max_nr_of_chars and lNr=nr_of_lines
[n is newLine, ignor all other '['
output:
chrNr nr of chars of longest line
lNr nr_of_lines
retCode: 1 = txt is empty
0 = OK
int GR_gxt_dump ( )

Variable Documentation

double AP_txsiz

Notes-Defaultsize.

double AP_txdimsiz

Dimensions-Text-Defaultsize.

int AP_txNkNr

Nachkommastellen.

double GR_tx_scale = 1.
double GR_tx_ldExt
double GR_tx_ardx
double GR_tx_ardy
double GR_tx_chw
double GR_tx_chh
int GR_tx_nkNr
double GR_fontSiz = 0.055