Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
% $Header: /cvsroot/html2ps/postscript/box.block.inline.ps,v 1.1 2005/12/18 07:21:36 Konstantin Exp $
2
 
3
/box-inline-block-create {
4
  box-container-create
5
  dup box-inline-block-setup-methods
6
  dup /box-inline-block add-type
7
} def
8
 
9
/box-inline-block-reflow {         % => Context Parent Box
10
  1 index /null ne {
11
% Calculate margin values if they have been set as a percentage
12
    2 copy
13
    box-generic-calc-percentage-margins
14
 
15
% Calculate width value if it had been set as a percentage
16
    3 copy
17
    box-generic-calc-percentage-width
18
 
19
% Calculate 'auto' values of width and margins
20
    2 copy
21
    box-generic-calc-auto-width-margins
22
 
23
% Add current box to the parent's line-box
24
    dup 2 index
25
    box-container-append-line
26
 
27
    2 copy
28
    box-generic-guess-corner
29
 
30
% By default, child block box will fill all available parent width;
31
% note that actual width will be smaller because of non-zero padding, border and margins
32
    1 index /get-width call-method
33
    1 index put-full-width
34
  } if
35
 
36
% Reflow content
37
 
38
  2 index 1 index box-container-reflow-content
39
 
40
  1 index /null ne {
41
% Extend parent's height to fit current box
42
    dup get-bottom-margin
43
    2 index box-generic-extend-height
44
 
45
% Offset current x coordinate of parent box
46
    dup get-right-margin
47
    2 index put-current-x
48
  } if
49
 
50
  pop pop pop
51
} def
52
 
53
/box-inline-block-setup-methods {
54
  dup /Methods get
55
  dup /reflow {box-inline-block-reflow} put
56
  pop pop
57
} def