Recognizes if input is ogg or not.
[xiph.git] / mgm / doc / r-geometry.html
blob45b69f35df48c338e15302936febb5b252135beb
1 <title> xiph.org: MGM manual </title>
3 <STYLE>
4 <!--
5 BODY {font-family: Verdana, Arial, Helvetica;
6 font-size: 12pt;
7 background-color: #ffffff}
8 -->
9 </STYLE>
11 <body bgcolor="#ffffff" link="#208b8b" vlink="#000080">
13 <p align=center><img src="mgm-small.gif"><br>
14 [ <a href="index.html">home</a> | <a href="faq.html">FAQ</a> | <a href="down.html">download</a> | <a href="trouble.html">troubleshooting</a> | <a href="docs.html">manual</a> | <a href="http://www.xiph.org/cvs.html">cvs</a> | <a href="mail.html">mailing lists</a> ]<p>
15 <hr>
17 <h1>Resource: geometry</h1>
18 <h2>applicability</h2>
20 Toplevel only
22 <h2>possible settings</h2>
23 Standard X geometry format (egs., 300x100, 35x400-0+0)<br>
24 default computed from overall configuration<p>
26 <h2>description</h2>
28 The geometry resource is used to force a specific height/width and/or
29 screen placement for the MGM window. It is possible to set a height
30 or width below the minimums MGM woudl otherwise allow; in this case,
31 MGM will generally break.<p>
33 <h2>default geometry computation</h2>
35 The default geometry depends on the graph orientation (set using <a
36 href=r-bars.html>bars</a>), the stack direction (set using <a
37 href=r-stack.html>stack</a>), the number of active modules (modules
38 may be enabled or disabled using <a href=r-active.html>active</a>),
39 relative module length and width adjustmants (set using <a
40 href=r-scalelendadj.html>scalelenadj</a> and <a
41 href=r-scalewidadj.html>scalewidadj</a>) and the global adjustment
42 setting to pixel settings (set using <a
43 href=r-lendemand.html>lendemand</a> and <a
44 href=widdemand.html>widdemand</a>).<p>
46 Geometry and placement are computed using only active modules. Scale
47 length and width adjustments are collected for all modules in order to
48 find the global adjustments. The global adjustment is either the
49 maximum of the local adjustments or the sum of them; for example, an
50 MGM with vertical bars that are stacked horizontally (the bars are
51 side-by-side), the global scale length adjustment is the maximum of
52 the individual module length adjustment settings, and the global width
53 adjustment is the sum of the individual width adjustments. Visualize
54 this for a second until it's obvious why; the x size of the window
55 described above is the sum of the widths of the graphs and the y size
56 is as high as the tallest.<p>
58 The same process is used to find the global minimum x and y sizes from
59 the local minimum x and y specified by each module. MGM enforces at each
60 step that the computed geometries are not less than the minimum
61 settings specified by individual modules (unless the geometry is
62 forced to a smaller-than-minimum size by frobbing the minx, miny or
63 geometry resources).<p>
65 After computing the global length and width adjustment settings, the
66 adjustment values are mapped to actual pixel width and height by
67 multiplying with the lendemand and widdemand values, dividing by 100,
68 and mapping length/width to x and y depeneding on graph orientation
69 (vertical bars will map width to x and length to y. Horizontal bars
70 map length to x and width to y).<p>
72 Module placement is determined after the global x and y sizes are
73 known. MGM determines 'excess' x and y values by subtracting the
74 global minimum x and y values from the actual mapped x and y values.
75 This excess is then added to the minimum x and y settings of each
76 module as determined by the scalelenadj and scalewidadj settings for
77 that module. (remember that 'width' and 'length' map to x,y or y,x
78 depending on graph orientation). For example, in a graph with
79 vertical bars, the size of a specific module can be computed as
80 follows:<p>
82 <pre>
83 module_x=(global_actual_x-global_minimum_x)/global_scalewidadj*
84 local_scalewidadj<br>
85 module_y=(global_actual_y-global_minimum_y)/global_scalelenadj*
86 local_scalelenadj<br>
87 </pre>
89 One last note; the minimum actual length and width adjustments as used
90 internally are both 1; this prevents division by zero problems when
91 using a single module that uses adjustments of zero.<p.
93 <h2>tricks</h2> The complicated (but still farily lean) process above
94 is designed to give decent default sizing and placement. It can be
95 hard to tweak for specific purposes.<p>
97 It is possible to force each module to a specific, exact size
98 completely overriding the automatic placement. This is done by
99 setting the scalelenadj and scalewidadj to zero and specifying an
100 exact size using minx and miny for each module.<p>
102 <h2>see also</h2>
103 <a href=r-active.html>active</a>,
104 <a href=r-bars.html>bars</a>,
105 <a href=r-lendemand.html>lendemand</a>,
106 <a href=r-minx.html>minx</a>,
107 <a href=r-miny.html>miny</a>,
108 <a href=r-scalelenadj.html>scalelenadj</a>,
109 <a href=r-scalewidadj.html>scalewidadj</a>,
110 <a href=r-stack.html>stack</a>,
111 <a href=r-widdemand.html>widdemand</a>
114 <hr>
115 <a href="http://www.xiph.org/">
116 <img src="white-xifish.gif" align=left border=0>
117 </a>
119 <font size=-2 color=#505050>
121 MGM will not get your whites whiter or your colors brighter. It will,
122 however, sit there and look spiffy while sucking down a major
123 honking wad of RAM.<p>
125 MGM, Xiphophorus and their logos are trademarks (tm) of
126 <a href="http://www.xiph.org/">Xiphophorus</a>. These pages are
127 copyright (C) 1994-1999 Xiphophorus. All rights reserved.<p>
129 </body>