/var/www/hkosl.com/imusiccircle/webadmin/libraies/phpoffice/phpexcel/Classes/PHPExcel/Chart/Properties.php


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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
<?php
/**
 * Created by PhpStorm.
 * User: nhw2h8s
 * Date: 7/2/14
 * Time: 5:45 PM
 */

abstract class PHPExcel_Properties {

  const
      
EXCEL_COLOR_TYPE_STANDARD 'prstClr',
      
EXCEL_COLOR_TYPE_SCHEME 'schemeClr',
      
EXCEL_COLOR_TYPE_ARGB 'srgbClr';

  const
      
AXIS_LABELS_LOW 'low',
      
AXIS_LABELS_HIGH 'high',
      
AXIS_LABELS_NEXT_TO 'nextTo',
      
AXIS_LABELS_NONE 'none';

  const
      
TICK_MARK_NONE 'none',
      
TICK_MARK_INSIDE 'in',
      
TICK_MARK_OUTSIDE 'out',
      
TICK_MARK_CROSS 'cross';

  const
      
HORIZONTAL_CROSSES_AUTOZERO 'autoZero',
      
HORIZONTAL_CROSSES_MAXIMUM 'max';

  const
      
FORMAT_CODE_GENERAL 'General',
      
FORMAT_CODE_NUMBER '#,##0.00',
      
FORMAT_CODE_CURRENCY '$#,##0.00',
      
FORMAT_CODE_ACCOUNTING '_($* #,##0.00_);_($* (#,##0.00);_($* "-"??_);_(@_)',
      
FORMAT_CODE_DATE 'm/d/yyyy',
      
FORMAT_CODE_TIME '[$-F400]h:mm:ss AM/PM',
      
FORMAT_CODE_PERCENTAGE '0.00%',
      
FORMAT_CODE_FRACTION '# ?/?',
      
FORMAT_CODE_SCIENTIFIC '0.00E+00',
      
FORMAT_CODE_TEXT '@',
      
FORMAT_CODE_SPECIAL '00000';

  const
      
ORIENTATION_NORMAL 'minMax',
      
ORIENTATION_REVERSED 'maxMin';

  const
      
LINE_STYLE_COMPOUND_SIMPLE 'sng',
      
LINE_STYLE_COMPOUND_DOUBLE 'dbl',
      
LINE_STYLE_COMPOUND_THICKTHIN 'thickThin',
      
LINE_STYLE_COMPOUND_THINTHICK 'thinThick',
      
LINE_STYLE_COMPOUND_TRIPLE 'tri',

      
LINE_STYLE_DASH_SOLID 'solid',
      
LINE_STYLE_DASH_ROUND_DOT 'sysDot',
      
LINE_STYLE_DASH_SQUERE_DOT 'sysDash',
      
LINE_STYPE_DASH_DASH 'dash',
      
LINE_STYLE_DASH_DASH_DOT 'dashDot',
      
LINE_STYLE_DASH_LONG_DASH 'lgDash',
      
LINE_STYLE_DASH_LONG_DASH_DOT 'lgDashDot',
      
LINE_STYLE_DASH_LONG_DASH_DOT_DOT 'lgDashDotDot',

      
LINE_STYLE_CAP_SQUARE 'sq',
      
LINE_STYLE_CAP_ROUND 'rnd',
      
LINE_STYLE_CAP_FLAT 'flat',

      
LINE_STYLE_JOIN_ROUND 'bevel',
      
LINE_STYLE_JOIN_MITER 'miter',
      
LINE_STYLE_JOIN_BEVEL 'bevel',

      
LINE_STYLE_ARROW_TYPE_NOARROW NULL,
      
LINE_STYLE_ARROW_TYPE_ARROW 'triangle',
      
LINE_STYLE_ARROW_TYPE_OPEN 'arrow',
      
LINE_STYLE_ARROW_TYPE_STEALTH 'stealth',
      
LINE_STYLE_ARROW_TYPE_DIAMOND 'diamond',
      
LINE_STYLE_ARROW_TYPE_OVAL 'oval',

      
LINE_STYLE_ARROW_SIZE_1 1,
      
LINE_STYLE_ARROW_SIZE_2 2,
      
LINE_STYLE_ARROW_SIZE_3 3,
      
LINE_STYLE_ARROW_SIZE_4 4,
      
LINE_STYLE_ARROW_SIZE_5 5,
      
LINE_STYLE_ARROW_SIZE_6 6,
      
LINE_STYLE_ARROW_SIZE_7 7,
      
LINE_STYLE_ARROW_SIZE_8 8,
      
LINE_STYLE_ARROW_SIZE_9 9;

  const
      
SHADOW_PRESETS_NOSHADOW NULL,
      
SHADOW_PRESETS_OUTER_BOTTTOM_RIGHT 1,
      
SHADOW_PRESETS_OUTER_BOTTOM 2,
      
SHADOW_PRESETS_OUTER_BOTTOM_LEFT 3,
      
SHADOW_PRESETS_OUTER_RIGHT 4,
      
SHADOW_PRESETS_OUTER_CENTER 5,
      
SHADOW_PRESETS_OUTER_LEFT 6,
      
SHADOW_PRESETS_OUTER_TOP_RIGHT 7,
      
SHADOW_PRESETS_OUTER_TOP 8,
      
SHADOW_PRESETS_OUTER_TOP_LEFT 9,
      
SHADOW_PRESETS_INNER_BOTTTOM_RIGHT 10,
      
SHADOW_PRESETS_INNER_BOTTOM 11,
      
SHADOW_PRESETS_INNER_BOTTOM_LEFT 12,
      
SHADOW_PRESETS_INNER_RIGHT 13,
      
SHADOW_PRESETS_INNER_CENTER 14,
      
SHADOW_PRESETS_INNER_LEFT 15,
      
SHADOW_PRESETS_INNER_TOP_RIGHT 16,
      
SHADOW_PRESETS_INNER_TOP 17,
      
SHADOW_PRESETS_INNER_TOP_LEFT 18,
      
SHADOW_PRESETS_PERSPECTIVE_BELOW 19,
      
SHADOW_PRESETS_PERSPECTIVE_UPPER_RIGHT 20,
      
SHADOW_PRESETS_PERSPECTIVE_UPPER_LEFT 21,
      
SHADOW_PRESETS_PERSPECTIVE_LOWER_RIGHT 22,
      
SHADOW_PRESETS_PERSPECTIVE_LOWER_LEFT 23;

  protected function  
getExcelPointsWidth($width) {
    return 
$width 12700;
  }

  protected function 
getExcelPointsAngle($angle) {
    return 
$angle 60000;
  }

  protected function 
getTrueAlpha($alpha) {
    return (string) 
100 $alpha '000';
  }

  protected function 
setColorProperties($color$alpha$type) {
    return array(
        
'type' => (string) $type,
        
'value' => (string) $color,
        
'alpha' => (string) $this->getTrueAlpha($alpha)
    );
  }

  protected function 
getLineStyleArrowSize($array_selector$array_kay_selector) {
    
$sizes = array(
        
=> array('w' => 'sm''len' => 'sm'),
        
=> array('w' => 'sm''len' => 'med'),
        
=> array('w' => 'sm''len' => 'lg'),
        
=> array('w' => 'med''len' => 'sm'),
        
=> array('w' => 'med''len' => 'med'),
        
=> array('w' => 'med''len' => 'lg'),
        
=> array('w' => 'lg''len' => 'sm'),
        
=> array('w' => 'lg''len' => 'med'),
        
=> array('w' => 'lg''len' => 'lg')
    );

    return 
$sizes[$array_selector][$array_kay_selector];
  }

  protected function 
getShadowPresetsMap($shadow_presets_option) {
    
$presets_options = array(
      
//OUTER
      
=> array(
          
'effect' => 'outerShdw',
          
'blur' => '50800',
          
'distance' => '38100',
          
'direction' => '2700000',
          
'algn' => 'tl',
          
'rotWithShape' => '0'
      
),
      
=> array(
          
'effect' => 'outerShdw',
          
'blur' => '50800',
          
'distance' => '38100',
          
'direction' => '5400000',
          
'algn' => 't',
          
'rotWithShape' => '0'
      
),
      
=> array(
          
'effect' => 'outerShdw',
          
'blur' => '50800',
          
'distance' => '38100',
          
'direction' => '8100000',
          
'algn' => 'tr',
          
'rotWithShape' => '0'
      
),
      
=> array(
          
'effect' => 'outerShdw',
          
'blur' => '50800',
          
'distance' => '38100',
          
'algn' => 'l',
          
'rotWithShape' => '0'
      
),
      
=> array(
          
'effect' => 'outerShdw',
          
'size' => array(
              
'sx' => '102000',
              
'sy' => '102000'
          
)
          ,
          
'blur' => '63500',
          
'distance' => '38100',
          
'algn' => 'ctr',
          
'rotWithShape' => '0'
      
),
      
=> array(
          
'effect' => 'outerShdw',
          
'blur' => '50800',
          
'distance' => '38100',
          
'direction' => '10800000',
          
'algn' => 'r',
          
'rotWithShape' => '0'
      
),
      
=> array(
          
'effect' => 'outerShdw',
          
'blur' => '50800',
          
'distance' => '38100',
          
'direction' => '18900000',
          
'algn' => 'bl',
          
'rotWithShape' => '0'
      
),
      
=> array(
          
'effect' => 'outerShdw',
          
'blur' => '50800',
          
'distance' => '38100',
          
'direction' => '16200000',
          
'rotWithShape' => '0'
      
),
      
=> array(
          
'effect' => 'outerShdw',
          
'blur' => '50800',
          
'distance' => '38100',
          
'direction' => '13500000',
          
'algn' => 'br',
          
'rotWithShape' => '0'
      
),
      
//INNER
      
10 => array(
          
'effect' => 'innerShdw',
          
'blur' => '63500',
          
'distance' => '50800',
          
'direction' => '2700000',
      ),
      
11 => array(
          
'effect' => 'innerShdw',
          
'blur' => '63500',
          
'distance' => '50800',
          
'direction' => '5400000',
      ),
      
12 => array(
          
'effect' => 'innerShdw',
          
'blur' => '63500',
          
'distance' => '50800',
          
'direction' => '8100000',
      ),
      
13 => array(
          
'effect' => 'innerShdw',
          
'blur' => '63500',
          
'distance' => '50800',
      ),
      
14 => array(
          
'effect' => 'innerShdw',
          
'blur' => '114300',
      ),
      
15 => array(
          
'effect' => 'innerShdw',
          
'blur' => '63500',
          
'distance' => '50800',
          
'direction' => '10800000',
      ),
      
16 => array(
          
'effect' => 'innerShdw',
          
'blur' => '63500',
          
'distance' => '50800',
          
'direction' => '18900000',
      ),
      
17 => array(
          
'effect' => 'innerShdw',
          
'blur' => '63500',
          
'distance' => '50800',
          
'direction' => '16200000',
      ),
      
18 => array(
          
'effect' => 'innerShdw',
          
'blur' => '63500',
          
'distance' => '50800',
          
'direction' => '13500000',
      ),
      
//perspective
      
19 => array(
          
'effect' => 'outerShdw',
          
'blur' => '152400',
          
'distance' => '317500',
          
'size' => array(
              
'sx' => '90000',
              
'sy' => '-19000',
          ),
          
'direction' => '5400000',
          
'rotWithShape' => '0',
      ),
      
20 => array(
          
'effect' => 'outerShdw',
          
'blur' => '76200',
          
'direction' => '18900000',
          
'size' => array(
              
'sy' => '23000',
              
'kx' => '-1200000',
          ),
          
'algn' => 'bl',
          
'rotWithShape' => '0',
      ),
      
21 => array(
          
'effect' => 'outerShdw',
          
'blur' => '76200',
          
'direction' => '13500000',
          
'size' => array(
              
'sy' => '23000',
              
'kx' => '1200000',
          ),
          
'algn' => 'br',
          
'rotWithShape' => '0',
      ),
      
22 => array(
          
'effect' => 'outerShdw',
          
'blur' => '76200',
          
'distance' => '12700',
          
'direction' => '2700000',
          
'size' => array(
              
'sy' => '-23000',
              
'kx' => '-800400',
          ),
          
'algn' => 'bl',
          
'rotWithShape' => '0',
      ),
      
23 => array(
          
'effect' => 'outerShdw',
          
'blur' => '76200',
          
'distance' => '12700',
          
'direction' => '8100000',
          
'size' => array(
              
'sy' => '-23000',
              
'kx' => '800400',
          ),
          
'algn' => 'br',
          
'rotWithShape' => '0',
      ),
    );

    return 
$presets_options[$shadow_presets_option];
  }

  protected function 
getArrayElementsValue($properties$elements) {
    
$reference = & $properties;
    if (!
is_array($elements)) {
      return 
$reference[$elements];
    } else {
      foreach (
$elements as $keys) {
        
$reference = & $reference[$keys];
      }

      return 
$reference;
    }

    return 
$this;
  }