File: docDrawingObject.c

package info (click to toggle)
ted 2.16-5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 13,944 kB
  • ctags: 20,273
  • sloc: ansic: 167,980; makefile: 12,518; sh: 263
file content (66 lines) | stat: -rw-r--r-- 1,527 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/************************************************************************/
/*									*/
/*  Exchange text properties with an RTF file.				*/
/*									*/
/************************************************************************/

#   include	"tedConfig.h"

#   include	<stdlib.h>
#   include	<string.h>
#   include	<stdio.h>
#   include	<ctype.h>

#   include	<appDebugon.h>

#   include	"docDrawingObject.h"

/************************************************************************/
/*									*/
/*  Initialize a drawing object.					*/
/*									*/
/************************************************************************/

void docInitDrawingObject(		DrawingObject *		wdo )
    {
    wdo->doAnchorLocked= 0;

    wdo->doXAttach= DOxaCOLUMN;
    wdo->doYAttach= DOyaPAGE;
    wdo->doKind= DOkindRECT;
    wdo->doLineStyle= DOlineHOLLOW;
    wdo->doFillPattern= DOfillCLEAR;

    wdo->doLineColorGray= 0;
    wdo->doFillForeColorGray= 0;
    wdo->doFillBackColorGray= 0;

    wdo->doArcFlipX= 0;
    wdo->doArcFlipY= 0;

    wdo->doX= 0;
    wdo->doY= 0;
    wdo->doZ= 16000;
    wdo->doWide= 1;
    wdo->doHigh= 1;

    wdo->doLineWidth= 1;

    bmInitRGB8Color( &(wdo->doLineColor) );
    bmInitRGB8Color( &(wdo->doFillForeColor) );
    bmInitRGB8Color( &(wdo->doFillBackColor) );

    wdo->doPoints= (APP_POINT *)0;
    wdo->doPointCount= 0;
    wdo->doNextPoint= 0;

    return;
    }

void docCleanDrawingObject(		DrawingObject *		wdo )
    {
    if  ( wdo->doPoints )
	{ free( wdo->doPoints ); }

    return;
    }