From baa967ea81c373a17e99deec2cd58a355211bd79 Mon Sep 17 00:00:00 2001 From: Peter Bernard West Date: Fri, 27 Dec 2002 07:35:38 +0000 Subject: Code documentation git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@195800 13f79535-47bb-0310-9956-ffa450edef68 --- .../alt.design/properties/RenderingIntent.html | 117 +++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 src/documentation/content/design/alt.design/properties/RenderingIntent.html (limited to 'src/documentation/content/design/alt.design/properties/RenderingIntent.html') diff --git a/src/documentation/content/design/alt.design/properties/RenderingIntent.html b/src/documentation/content/design/alt.design/properties/RenderingIntent.html new file mode 100644 index 000000000..d0198acd8 --- /dev/null +++ b/src/documentation/content/design/alt.design/properties/RenderingIntent.html @@ -0,0 +1,117 @@ + + + + + RenderingIntent.java + + + +
+package org.apache.fop.fo.properties;
+
+import org.apache.fop.fo.expr.PropertyException;
+import org.apache.fop.datastructs.ROStringArray;
+import org.apache.fop.datatypes.Ints;
+import org.apache.fop.fo.properties.Property;
+
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Collections;
+
+public class RenderingIntent extends Property  {
+    public static final int dataTypes = AUTO | ENUM | INHERIT;
+    public static final int traitMapping = FORMATTING;
+    public static final int initialValueType = AUTO_IT;
+    public static final int PERCEPTUAL = 1;
+    public static final int RELATIVE_COLORIMETRIC = 2;
+    public static final int SATURATION = 3;
+    public static final int ABSOLUTE_COLORIMETRIC = 4;
+    public static final int inherited = NO;
+
+    private static final String[] rwEnums = {
+        null
+        ,"perceptual"
+        ,"relative-colorimetric"
+        ,"saturation"
+        ,"absolute-colorimetric"
+    };
+    private static final HashMap rwEnumHash;
+    static {
+        rwEnumHash = new HashMap(rwEnums.length);
+        for (int i = 1; i < rwEnums.length; i++ ) {
+            rwEnumHash.put((Object)rwEnums[i],
+                                (Object) Ints.consts.get(i));
+        }
+    }
+    public int getEnumIndex(String enum)
+        throws PropertyException
+    {
+        Integer ii = (Integer)(rwEnumHash.get(enum));
+        if (ii == null)
+            throw new PropertyException("Unknown enum value: " + enum);
+        return ii.intValue();
+    }
+    public String getEnumText(int index)
+        throws PropertyException
+    {
+        if (index < 1 || index >= rwEnums.length)
+            throw new PropertyException("index out of range: " + index);
+        return rwEnums[index];
+    }
+}
+
+
+ + -- cgit v1.2.3