[Polycasso-commit] SF.net SVN: polycasso:[170] trunk/polycasso/src/com/mebigfatguy/polycasso/ SVGSa
Brought to you by:
dbrosius
|
From: <dbr...@us...> - 2009-12-10 04:12:53
|
Revision: 170
http://polycasso.svn.sourceforge.net/polycasso/?rev=170&view=rev
Author: dbrosius
Date: 2009-12-10 04:12:46 +0000 (Thu, 10 Dec 2009)
Log Message:
-----------
javadoc
Modified Paths:
--------------
trunk/polycasso/src/com/mebigfatguy/polycasso/SVGSaver.java
Modified: trunk/polycasso/src/com/mebigfatguy/polycasso/SVGSaver.java
===================================================================
--- trunk/polycasso/src/com/mebigfatguy/polycasso/SVGSaver.java 2009-12-10 04:11:12 UTC (rev 169)
+++ trunk/polycasso/src/com/mebigfatguy/polycasso/SVGSaver.java 2009-12-10 04:12:46 UTC (rev 170)
@@ -27,9 +27,18 @@
import java.io.PrintWriter;
import org.apache.commons.io.IOUtils;
-
+/**
+ * generates an svg file from the set of polygons
+ */
public class SVGSaver implements Saver {
+ /**
+ * saves the set of polygons in an svg file
+ *
+ * @param fileName the name of the file to write to
+ * @param imageSize the dimension of the image
+ * @param data the polygons to draw
+ */
@Override
public void save(String fileName, Dimension imageSize, PolygonData[] data)
throws IOException {
@@ -80,6 +89,12 @@
}
}
+ /**
+ * converts a color to an html encoded color string ie #003322
+ *
+ * @param color the color to convert
+ * @return the hex (html) string version of the color
+ */
private String toHexColor(Color color) {
String r = Integer.toHexString(color.getRed());
if (r.length() == 1)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|