pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1740862 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/state/RenderingMode.java
Date Mon, 25 Apr 2016 16:38:23 GMT
Author: tilman
Date: Mon Apr 25 16:38:23 2016
New Revision: 1740862

URL: http://svn.apache.org/viewvc?rev=1740862&view=rev
Log:
PDFBOX-3326 return correct result for STROKE_CLIP, thanks PDFBOX-3326

Modified:
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/state/RenderingMode.java

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/state/RenderingMode.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/state/RenderingMode.java?rev=1740862&r1=1740861&r2=1740862&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/state/RenderingMode.java
(original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/state/RenderingMode.java
Mon Apr 25 16:38:23 2016
@@ -1,120 +1,120 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.pdfbox.pdmodel.graphics.state;
-
-/**
- * Text Rendering Mode.
- *
- * @author John Hewson
- */
-public enum RenderingMode
-{
-    /**
-     * Fill text.
-     */
-    FILL(0),
-
-    /**
-     * Stroke text.
-     */
-    STROKE(1),
-
-    /**
-     * Fill, then stroke text.
-     */
-    FILL_STROKE(2),
-
-    /**
-     * Neither fill nor stroke text (invisible)
-     */
-    NEITHER(3),
-
-    /**
-     * Fill text and add to path for clipping.
-     */
-    FILL_CLIP(4),
-
-    /**
-     * Stroke text and add to path for clipping.
-     */
-    STROKE_CLIP(5),
-
-    /**
-     * Fill, then stroke text and add to path for clipping.
-     */
-    FILL_STROKE_CLIP(6),
-
-    /**
-     * Add text to path for clipping.
-     */
-    NEITHER_CLIP(7);
-
-    private static final RenderingMode[] VALUES = RenderingMode.values();
-
-    public static RenderingMode fromInt(int value)
-    {
-        return VALUES[value];
-    }
-
-    private final int value;
-
-    RenderingMode(int value)
-    {
-        this.value = value;
-    }
-
-    /**
-     * Returns the integer value of this mode, as used in a PDF file.
-     */
-    public int intValue()
-    {
-        return value;
-    }
-
-    /**
-     * Returns true is this mode fills text.
-     */
-    public boolean isFill()
-    {
-        return this == FILL ||
-               this == FILL_STROKE ||
-               this == FILL_CLIP ||
-               this == FILL_STROKE_CLIP;
-    }
-
-    /**
-     * Returns true is this mode strokes text.
-     */
-    public boolean isStroke()
-    {
-        return this == STROKE ||
-               this == FILL_STROKE ||
-               this == STROKE ||
-               this == FILL_STROKE_CLIP;
-    }
-
-    /**
-     * Returns true is this mode clips text.
-     */
-    public boolean isClip()
-    {
-        return this == FILL_CLIP ||
-               this == STROKE_CLIP ||
-               this == FILL_STROKE_CLIP ||
-               this == NEITHER_CLIP;
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pdfbox.pdmodel.graphics.state;
+
+/**
+ * Text Rendering Mode.
+ *
+ * @author John Hewson
+ */
+public enum RenderingMode
+{
+    /**
+     * Fill text.
+     */
+    FILL(0),
+
+    /**
+     * Stroke text.
+     */
+    STROKE(1),
+
+    /**
+     * Fill, then stroke text.
+     */
+    FILL_STROKE(2),
+
+    /**
+     * Neither fill nor stroke text (invisible)
+     */
+    NEITHER(3),
+
+    /**
+     * Fill text and add to path for clipping.
+     */
+    FILL_CLIP(4),
+
+    /**
+     * Stroke text and add to path for clipping.
+     */
+    STROKE_CLIP(5),
+
+    /**
+     * Fill, then stroke text and add to path for clipping.
+     */
+    FILL_STROKE_CLIP(6),
+
+    /**
+     * Add text to path for clipping.
+     */
+    NEITHER_CLIP(7);
+
+    private static final RenderingMode[] VALUES = RenderingMode.values();
+
+    public static RenderingMode fromInt(int value)
+    {
+        return VALUES[value];
+    }
+
+    private final int value;
+
+    RenderingMode(int value)
+    {
+        this.value = value;
+    }
+
+    /**
+     * Returns the integer value of this mode, as used in a PDF file.
+     */
+    public int intValue()
+    {
+        return value;
+    }
+
+    /**
+     * Returns true is this mode fills text.
+     */
+    public boolean isFill()
+    {
+        return this == FILL ||
+               this == FILL_STROKE ||
+               this == FILL_CLIP ||
+               this == FILL_STROKE_CLIP;
+    }
+
+    /**
+     * Returns true is this mode strokes text.
+     */
+    public boolean isStroke()
+    {
+        return this == STROKE ||
+               this == FILL_STROKE ||
+               this == STROKE_CLIP ||
+               this == FILL_STROKE_CLIP;
+    }
+
+    /**
+     * Returns true is this mode clips text.
+     */
+    public boolean isClip()
+    {
+        return this == FILL_CLIP ||
+               this == STROKE_CLIP ||
+               this == FILL_STROKE_CLIP ||
+               this == NEITHER_CLIP;
+    }
+}



Mime
View raw message