Skip to content

Commit

Permalink
Changed: improvements in size parsing for CD_CGM, CD_DNG, CD_DXF and …
Browse files Browse the repository at this point in the history
…CD_SVG at cdCreateCanvas.

Fixed: some CGM inconsistency when generating a new file.
  • Loading branch information
scuri committed Sep 1, 2012
1 parent 494b2a8 commit 996fddd
Show file tree
Hide file tree
Showing 15 changed files with 456 additions and 739 deletions.
8 changes: 4 additions & 4 deletions html/en/drv/cgm.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ <h3>Use</h3>
Data)</font>, which <b>opens</b> the file and writes its header. Then, other functions in the CD library can be called
as usual. The <font face="Courier">Data</font> parameter string has the following format:</p>

<pre><em>&quot;filename [widthxheight] [resolution] [-t] -p[precision]&quot; or in C style &quot;<strong><tt>%s %gx%g %g %s</tt></strong>&quot;</em></pre>
<pre><em>&quot;filename [widthxheight] [resolution] [-t] [-pprec]&quot; or in C style &quot;<strong><tt>%s %gx%g %g %s</tt></strong>&quot;</em></pre>

<p>Only the parameter <font face="Courier">filename</font> is required. The filename must be inside double quotes (&quot;)
if it has spaces.<font face="Courier"> Width</font> and <font face="Courier">height</font> are provided in millimeters
(note the lowercase &quot;x&quot; between them), and their default value in pixels is <font face="Courier">INT_MAX</font> for
both dimensions. When the canvas' size is not specified, the VDC Extension saved to the file is the image's bounding
rectangle. The resolution is the number of pixels per millimeter; its default value is &quot;3.78 pixels/mm&quot; (96 DPI).
both dimensions. The resolution is the number of pixels per millimeter; its default value is &quot;3.78 pixels/mm&quot; (96 DPI).
<font face="Courier">Width</font>, <font face="Courier">height</font> and <font face="Courier">resolution</font> are
real values. <font face="Courier">Width</font>, <font face="Courier">height</font> and <font face="Courier">resolution</font>
are used only by <strong><font face="Courier">cdGetCanvasSize</font> </strong>and in pixel-millimeter conversion.
Parameter <font face="Courier">-t</font> modifies the codification. Parameter <font face="Courier">-p</font> specifies
the precision of integers, which can be 16 (default) or 32.</p>
the precision which can be &quot;16&quot; bits interger (default), &quot;32&quot; bits (integer),
&quot;F&quot; (float) or &quot;D&quot; (double).</p>
<p>Any amount of such canvases may exist simultaneously. It is important to note that a call to function
<a href="../func/init.html#cdKillCanvas"><font face="Courier"><strong>
cdKillCanvas</strong></font></a> is required to <b>close</b> the file properly.</p>
Expand Down
3 changes: 2 additions & 1 deletion html/en/drv/dgn.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ <h3>Use</h3>
filling by means of string &quot;<font face="Courier">-f</font>&quot; in the <font face="Courier">Data</font> parameter. Filled
polygons can only have around 10,000 vertices; if the value is larger, the polygon style changes to closed lines.</p>
<p><b>Seed</b> - In the seed file, several DGN parameters can be defined to be used in the drawing. The library offers
a default seed file, called &quot;SEED2D.DGN&quot;. The file's location depends on the environment variable <strong>CDDIR</strong>.</p>
a seed file called &quot;seed2d.dgn&quot;, located on the folder pointed by the environment variable <strong>CDDIR</strong>
(usually &quot;cd/etc&quot;).</p>

<h3>Behavior of Functions</h3>
<h4>Control</h4>
Expand Down
2 changes: 1 addition & 1 deletion html/en/drv/picture.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>CD_METAFILE</title>
<title>CD_PICTURE</title>
<link rel="stylesheet" type="text/css" href="../../style.css">
</head>

Expand Down
11 changes: 10 additions & 1 deletion html/en/history.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,20 @@
<body>

<h2>History of Changes</h2>
<h3>CVS (29/Aug/2012)</h3>
<h3>CVS (31/Aug/2012)</h3>
<ul>
<li><span class="hist_changed">Changed:</span>
rewitten <strong>cdCanvasPlay</strong>
for the CGM driver.</li>
<li><span class="hist_changed">Changed:</span>
removed automatic VDC Extension computation when size is not specified in
CD_CGM driver. Now
the default value is used just like the other drivers. Extended creation
parameter &quot;-p&quot; to include float and double options.</li>
<li><span class="hist_changed">Changed:</span>
improvements in size parsing for CD_CGM, CD_DNG, CD_DXF and CD_SVG at
<strong>cdCreateCanvas</strong>.<br><span class="hist_fixed">Fixed:</span>
some CGM inconsistency when generating a new file.</li>
<li><span class="hist_fixed">Fixed:</span> improved <strong>cdCanvasPlay</strong>
resize behavior in all drivers that support it.</li>
</ul>
Expand Down
Loading

0 comments on commit 996fddd

Please sign in to comment.