Haru Free PDF Library
hpdf_utils.h File Reference
#include "hpdf_config.h"
#include "hpdf_types.h"
#include "hpdf_page_sizes.h"
Include dependency graph for hpdf_utils.h:

Go to the source code of this file.

Macros

#define HPDF_NEEDS_ESCAPE(c)
 
#define HPDF_IS_WHITE_SPACE(c)
 
#define HPDF_PTRACE(ARGS)   /* do nothing */
 
#define HPDF_PRINT_BINARY(BUF, LEN, CAPTION)   /* do nothing */
 

Functions

HPDF_INT HPDF_AToI (const char *s)
 
HPDF_DOUBLE HPDF_AToF (const char *s)
 
char * HPDF_IToA (char *s, HPDF_INT32 val, char *eptr)
 
char * HPDF_IToA2 (char *s, HPDF_UINT32 val, HPDF_UINT len)
 
char * HPDF_FToA (char *s, HPDF_REAL val, char *eptr)
 
HPDF_BYTEHPDF_MemCpy (HPDF_BYTE *out, const HPDF_BYTE *in, HPDF_UINT n)
 
HPDF_BYTEHPDF_StrCpy (char *out, const char *in, char *eptr)
 
HPDF_INT HPDF_MemCmp (const HPDF_BYTE *s1, const HPDF_BYTE *s2, HPDF_UINT n)
 
HPDF_INT HPDF_StrCmp (const char *s1, const char *s2)
 
const char * HPDF_StrStr (const char *s1, const char *s2, HPDF_UINT maxlen)
 
void * HPDF_MemSet (void *s, HPDF_BYTE c, HPDF_UINT n)
 
HPDF_UINT HPDF_StrLen (const char *s, HPDF_INT maxlen)
 
HPDF_Box HPDF_ToBox (HPDF_INT16 left, HPDF_INT16 bottom, HPDF_INT16 right, HPDF_INT16 top)
 
HPDF_Point HPDF_ToPoint (HPDF_INT16 x, HPDF_INT16 y)
 
HPDF_Rect HPDF_ToRect (HPDF_REAL left, HPDF_REAL bottom, HPDF_REAL right, HPDF_REAL top)
 
void HPDF_UInt16Swap (HPDF_UINT16 *value)
 
const char * HPDF_PageSizeName (HPDF_PageSizes size)
 Return name of predefined page size. More...
 
HPDF_TransMatrix HPDF_Matrix_Multiply (HPDF_TransMatrix m, HPDF_TransMatrix n)
 Multiply transformation matrices. More...
 
HPDF_TransMatrix HPDF_Matrix_Translate (HPDF_TransMatrix m, HPDF_REAL dx, HPDF_REAL dy)
 
HPDF_TransMatrix HPDF_Matrix_Scale (HPDF_TransMatrix m, HPDF_REAL sx, HPDF_REAL sy)
 
HPDF_TransMatrix HPDF_Matrix_Rotate (HPDF_TransMatrix m, HPDF_REAL angle)
 
HPDF_TransMatrix HPDF_Matrix_RotateDeg (HPDF_TransMatrix m, HPDF_REAL degrees)
 
HPDF_TransMatrix HPDF_Matrix_Skew (HPDF_TransMatrix m, HPDF_REAL a, HPDF_REAL b)
 

Macro Definition Documentation

◆ HPDF_IS_WHITE_SPACE

#define HPDF_IS_WHITE_SPACE (   c)
Value:
(c == 0x00 || \
c == 0x09 || \
c == 0x0A || \
c == 0x0C || \
c == 0x0D || \
c == 0x20 ) \

◆ HPDF_NEEDS_ESCAPE

#define HPDF_NEEDS_ESCAPE (   c)
Value:
(c < 0x20 || \
c > 0x7e || \
c == '\\' || \
c == '%' || \
c == '#' || \
c == '/' || \
c == '(' || \
c == ')' || \
c == '<' || \
c == '>' || \
c == '[' || \
c == ']' || \
c == '{' || \
c == '}' ) \

◆ HPDF_PRINT_BINARY

#define HPDF_PRINT_BINARY (   BUF,
  LEN,
  CAPTION 
)    /* do nothing */

◆ HPDF_PTRACE

#define HPDF_PTRACE (   ARGS)    /* do nothing */

Function Documentation

◆ HPDF_AToF()

HPDF_DOUBLE HPDF_AToF ( const char *  s)

◆ HPDF_AToI()

HPDF_INT HPDF_AToI ( const char *  s)

◆ HPDF_FToA()

char* HPDF_FToA ( char *  s,
HPDF_REAL  val,
char *  eptr 
)

◆ HPDF_IToA()

char* HPDF_IToA ( char *  s,
HPDF_INT32  val,
char *  eptr 
)

◆ HPDF_IToA2()

char* HPDF_IToA2 ( char *  s,
HPDF_UINT32  val,
HPDF_UINT  len 
)

◆ HPDF_Matrix_Multiply()

HPDF_TransMatrix HPDF_Matrix_Multiply ( HPDF_TransMatrix  m,
HPDF_TransMatrix  n 
)

Multiply transformation matrices.

Returns
Transformation matrix as a result of multiplication of matrices m and n.

◆ HPDF_Matrix_Rotate()

HPDF_TransMatrix HPDF_Matrix_Rotate ( HPDF_TransMatrix  m,
HPDF_REAL  angle 
)

◆ HPDF_Matrix_RotateDeg()

HPDF_TransMatrix HPDF_Matrix_RotateDeg ( HPDF_TransMatrix  m,
HPDF_REAL  degrees 
)
Examples
matrix.c, and pattern2.c.

◆ HPDF_Matrix_Scale()

HPDF_TransMatrix HPDF_Matrix_Scale ( HPDF_TransMatrix  m,
HPDF_REAL  sx,
HPDF_REAL  sy 
)
Examples
matrix.c, and pattern2.c.

◆ HPDF_Matrix_Skew()

HPDF_TransMatrix HPDF_Matrix_Skew ( HPDF_TransMatrix  m,
HPDF_REAL  a,
HPDF_REAL  b 
)

◆ HPDF_Matrix_Translate()

HPDF_TransMatrix HPDF_Matrix_Translate ( HPDF_TransMatrix  m,
HPDF_REAL  dx,
HPDF_REAL  dy 
)
Examples
matrix.c.

◆ HPDF_MemCmp()

HPDF_INT HPDF_MemCmp ( const HPDF_BYTE s1,
const HPDF_BYTE s2,
HPDF_UINT  n 
)

◆ HPDF_MemCpy()

HPDF_BYTE* HPDF_MemCpy ( HPDF_BYTE out,
const HPDF_BYTE in,
HPDF_UINT  n 
)

◆ HPDF_MemSet()

void* HPDF_MemSet ( void *  s,
HPDF_BYTE  c,
HPDF_UINT  n 
)

◆ HPDF_PageSizeName()

const char* HPDF_PageSizeName ( HPDF_PageSizes  size)

Return name of predefined page size.

Examples
page_sizes_demo.c.

◆ HPDF_StrCmp()

HPDF_INT HPDF_StrCmp ( const char *  s1,
const char *  s2 
)

◆ HPDF_StrCpy()

HPDF_BYTE* HPDF_StrCpy ( char *  out,
const char *  in,
char *  eptr 
)

◆ HPDF_StrLen()

HPDF_UINT HPDF_StrLen ( const char *  s,
HPDF_INT  maxlen 
)

◆ HPDF_StrStr()

const char* HPDF_StrStr ( const char *  s1,
const char *  s2,
HPDF_UINT  maxlen 
)

◆ HPDF_ToBox()

HPDF_Box HPDF_ToBox ( HPDF_INT16  left,
HPDF_INT16  bottom,
HPDF_INT16  right,
HPDF_INT16  top 
)

◆ HPDF_ToPoint()

HPDF_Point HPDF_ToPoint ( HPDF_INT16  x,
HPDF_INT16  y 
)

◆ HPDF_ToRect()

HPDF_Rect HPDF_ToRect ( HPDF_REAL  left,
HPDF_REAL  bottom,
HPDF_REAL  right,
HPDF_REAL  top 
)

◆ HPDF_UInt16Swap()

void HPDF_UInt16Swap ( HPDF_UINT16 value)