aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/poi/sl/draw/DrawFactory.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/org/apache/poi/sl/draw/DrawFactory.java')
-rw-r--r--src/java/org/apache/poi/sl/draw/DrawFactory.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/java/org/apache/poi/sl/draw/DrawFactory.java b/src/java/org/apache/poi/sl/draw/DrawFactory.java
index d0584dadb3..f06ccdc1b0 100644
--- a/src/java/org/apache/poi/sl/draw/DrawFactory.java
+++ b/src/java/org/apache/poi/sl/draw/DrawFactory.java
@@ -56,6 +56,14 @@ public class DrawFactory {
defaultFactory.set(factory);
}
+ /**
+ * Returns the DrawFactory, preferably via a graphics instance.
+ * If graphics is null, the current thread local is checked or
+ * if it is not set, a new factory is created.
+ *
+ * @param graphics the current graphics context or null
+ * @return the draw factory
+ */
public static DrawFactory getInstance(Graphics2D graphics) {
// first try to find the factory over the rendering hint
DrawFactory factory = null;