Return-Path: X-Original-To: apmail-pdfbox-commits-archive@www.apache.org Delivered-To: apmail-pdfbox-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 616C1191C0 for ; Mon, 25 Apr 2016 16:38:27 +0000 (UTC) Received: (qmail 80872 invoked by uid 500); 25 Apr 2016 16:38:27 -0000 Delivered-To: apmail-pdfbox-commits-archive@pdfbox.apache.org Received: (qmail 80847 invoked by uid 500); 25 Apr 2016 16:38:27 -0000 Mailing-List: contact commits-help@pdfbox.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pdfbox.apache.org Delivered-To: mailing list commits@pdfbox.apache.org Received: (qmail 80837 invoked by uid 99); 25 Apr 2016 16:38:27 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Apr 2016 16:38:27 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 6AF33180234 for ; Mon, 25 Apr 2016 16:38:26 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.999 X-Spam-Level: X-Spam-Status: No, score=0.999 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id S3CML4wYaRkU for ; Mon, 25 Apr 2016 16:38:25 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 9D4CC5F3F4 for ; Mon, 25 Apr 2016 16:38:24 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id AC89EE031A for ; Mon, 25 Apr 2016 16:38:23 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id A7D473A0113 for ; Mon, 25 Apr 2016 16:38:23 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@pdfbox.apache.org From: tilman@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20160425163823.A7D473A0113@svn01-us-west.apache.org> 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; + } +}