You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2016/04/25 18:38:36 UTC
svn commit: r1740863 -
/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/state/RenderingMode.java
Author: tilman
Date: Mon Apr 25 16:38:36 2016
New Revision: 1740863
URL: http://svn.apache.org/viewvc?rev=1740863&view=rev
Log:
PDFBOX-3326 return correct result for STROKE_CLIP, thanks PDFBOX-3326
Modified:
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/state/RenderingMode.java
Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/state/RenderingMode.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/state/RenderingMode.java?rev=1740863&r1=1740862&r2=1740863&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/state/RenderingMode.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/state/RenderingMode.java Mon Apr 25 16:38:36 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;
+ }
+}