Socket: Add short docs to internal classes
[senf.git] / senfscons / Dia2Png.py
index a518464..3e5f0fe 100644 (file)
@@ -1,11 +1,25 @@
-"""Dia2Png SCons Builder: Build a PNG file given a DIA file.
-
-Support the specification of a scalefactor in the DIA2PNGDPI Environment variable.
-
-"""
+## \file
+# \brief Bia2Png builder
+
+## \package senfscons.Dia2Png
+# \brief Build a PNG file from a DIA file
+#
+# This builder will convert a given DIA file into a PNG image. The
+# size of the target file is specified by giving a preferred DPI value
+# and a maximum width. The Builder will automatically fetch the
+# correct aspect ratio from the dia file.
+#
+# \par Construction Envrionment Variables:
+# <table class="senf">
+# <tr><td>\c DIACOM</td><td>dia command, defaults to \c diak</td></tr>
+# <tr><td>\c DIA2PNGDPI</td><td>resolution of converted image, defaults to 115</td></tr>
+# <tr><td>\c DIA2PNGMAXWIDTH</td><td>maximum image width, defaults to 800</td></tr>
+# </table>
+#
+# \ingroup builder
 
 import os
-import SCons.Builder
+import SCons.Builder, SCons.Action
 
 def dia_getSize(env,source):
     size = None
@@ -25,7 +39,7 @@ def dia2png_generator(source, target, env, for_signature):
     if size[0] > env['DIA2PNGMAXWIDTH']:
         size[1] = size[1]*env['DIA2PNGMAXWIDTH']/size[0]
         size[0] = env['DIA2PNGMAXWIDTH']
-    return env.Action("$DIACOM -t png -s %dx%d -e $TARGET $SOURCE" % tuple(size))
+    return SCons.Action.Action("$DIACOM -t png -s %dx%d -e $TARGET $SOURCE" % tuple(size))
 
 Dia2Png = SCons.Builder.Builder(suffix = ".png",
                                 src_suffix = ".dia",