MHEG5  18.9.0
MHEG5 Documentation
mh5rectangle.c
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3  * Copyright © 2004 Ocean Blue Software Ltd
4  * Copyright © 2000 Koninklijke Philips Electronics N.V
5  *
6  * This file is part of a DTVKit Software Component
7  * You are permitted to copy, modify or distribute this file subject to the terms
8  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
9  *
10  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
11  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
12  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
13  *
14  * If you or your organisation is not a member of DTVKit then you have access
15  * to this source code outside of the terms of the licence agreement
16  * and you are expected to delete this and any associated files immediately.
17  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
18  *******************************************************************************/
32 /*---includes for this file--------------------------------------------------*/
33 #include "mh5debug.h"
34 #include "mh5rectangle.h"
35 
36 /*---constant definitions for this file--------------------------------------*/
37 
38 
39 /*---local typedef structs for this file-------------------------------------*/
40 
41 /*---local (static) variable declarations for this file----------------------*/
42 
43 /*---local function definitions----------------------------------------------*/
44 
45 /*---global function definitions---------------------------------------------*/
46 
52 #include "mh5rectangle.h"
53 #include "mh5memory.h"
54 
55 /*
56  Debug
57  */
58 #ifdef MH5PRINTOUT
59 
60 void MHEG5rectanglePrint(MHEG5Rectangle *rectangle, char *out)
61 {
62  MHEG5lineartPrint(&rectangle->lineart, out);
63 }
64 
65 #endif
66 
67 
68 /*
69  Clone
70  */
72 {
73  MHEG5Rectangle *destination;
74 
75  assert(source);
76 
77  destination = (MHEG5Rectangle *)MHEG5getMem( sizeof(MHEG5Rectangle));
78  if (destination != NULL)
79  {
80  memset( destination, 0, sizeof(MHEG5Rectangle));
82 
83  MHEG5lineartClone(&destination->lineart, &source->lineart);
84  }
85  return destination;
86 }
87 
88 /*
89  Constructor
90  */
97 {
98  assert(rectangle);
99 
100  MHEG5lineartInit(&rectangle->lineart);
101 }
102 
111 {
112  assert(rectangle);
113 
114  MHEG5lineartFree(&rectangle->lineart);
115 }
116 
117 /*
118  Internal behaviours
119  */
121 {
122  MHEG5lineartPrepare(&rectangle->lineart);
123 }
124 
126 {
127  MHEG5lineartActivate(&rectangle->lineart);
128 }
129 
131 {
132  MHEG5lineartDeactivate(&rectangle->lineart);
133 }
134 
136 {
137  MHEG5lineartDestruct(&rectangle->lineart);
138 }
139 
void MHEG5rectangleActivate(MHEG5Rectangle *rectangle)
Definition: mh5rectangle.c:125
#define MHEG5getMem
Definition: glue_memory.h:93
MHEG5Final clazz
Definition: mh5root.h:55
void MHEG5rectangleDeactivate(MHEG5Rectangle *rectangle)
Definition: mh5rectangle.c:130
void MHEG5lineartFree(MHEG5Lineart *lineart)
Free off all memory associated with the specified object, including any exchanged attributes and inte...
Definition: mh5lineart.c:198
Implement the MHEG5 Rectangle Class Rectangle Class Defines a data structure that deals with rectangl...
void MHEG5rectangleDestruct(MHEG5Rectangle *rectangle)
Definition: mh5rectangle.c:135
MHEG5Lineart lineart
Definition: mh5rectangle.h:45
void MHEG5rectanglePrepare(MHEG5Rectangle *rectangle)
Definition: mh5rectangle.c:120
Mheg5 logging and debug printing.
void MHEG5lineartDeactivate(MHEG5Lineart *lineart)
Definition: mh5lineart.c:238
MHEG5Ingredient ingredient
Definition: mh5visible.h:49
redirection include
void MHEG5lineartDestruct(MHEG5Lineart *lineart)
Definition: mh5lineart.c:245
MHEG5Visible visible
Definition: mh5lineart.h:51
void MHEG5lineartClone(MHEG5Lineart *destination, MHEG5Lineart *source)
<Function description>="">
Definition: mh5lineart.c:155
void MHEG5lineartPrepare(MHEG5Lineart *lineart)
Definition: mh5lineart.c:215
void MHEG5rectangleInit(MHEG5Rectangle *rectangle)
Initialise a rectangle object with default values.
Definition: mh5rectangle.c:96
void MHEG5lineartInit(MHEG5Lineart *lineart)
Initialise a lineart object with default values.
Definition: mh5lineart.c:178
MHEG5Rectangle * MHEG5rectangleClone(MHEG5Rectangle *source)
<Function description>="">
Definition: mh5rectangle.c:71
void MHEG5rectangleFree(MHEG5Rectangle *rectangle)
Free off all memory associated with the specified object, including any exchanged attributes and inte...
Definition: mh5rectangle.c:110
void MHEG5lineartActivate(MHEG5Lineart *lineart)
Definition: mh5lineart.c:227