Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 9A0CF2009DC for ; Tue, 2 May 2017 12:35:10 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 98B53160BBE; Tue, 2 May 2017 10:35:10 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E6BFE160BAC for ; Tue, 2 May 2017 12:35:09 +0200 (CEST) Received: (qmail 48413 invoked by uid 500); 2 May 2017 10:35:09 -0000 Mailing-List: contact batik-dev-help@xmlgraphics.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: batik-dev@xmlgraphics.apache.org Delivered-To: mailing list batik-dev@xmlgraphics.apache.org Received: (qmail 48375 invoked by uid 99); 2 May 2017 10:35:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 May 2017 10:35:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 452FACF5B0 for ; Tue, 2 May 2017 10:35:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id UqAU63_yqaIO for ; Tue, 2 May 2017 10:35:06 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 2A3575F4A7 for ; Tue, 2 May 2017 10:35:06 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 6EAC3E03EE for ; Tue, 2 May 2017 10:35:05 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id E2EE321DE1 for ; Tue, 2 May 2017 10:35:04 +0000 (UTC) Date: Tue, 2 May 2017 10:35:04 +0000 (UTC) From: "Peter Wayner (JIRA)" To: batik-dev@xmlgraphics.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (BATIK-1092) Add support for background on text content elements MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 02 May 2017 10:35:10 -0000 [ https://issues.apache.org/jira/browse/BATIK-1092?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Peter Wayner updated BATIK-1092: -------------------------------- Attachment: text-background-2017-05-02.patch Here is a better patch for code to add background coloring to text. > Add support for background on text content elements > --------------------------------------------------- > > Key: BATIK-1092 > URL: https://issues.apache.org/jira/browse/BATIK-1092 > Project: Batik > Issue Type: New Feature > Reporter: Glenn Adams > Assignee: Glenn Adams > Fix For: trunk > > Attachments: text-background-2017-05-02.patch, Wayner-FIrst-Integration-After-All-Tests-2017-04-10.patch (1).zip > > > An oft requested feature in SVG is the ability to draw a background color on text and tspan. While it has been suggested that this can be done using a separate rect element, it is either impractical or highly inconvenient to do this because the bounding box and/or line height geometry of this rect is not available at authoring time. > Given the greater use of CSS features in SVG 2.0 and the general desire to support CSS properties, it is proposed that the 'background-color' [1] property be supported on both text and tspan elements. > [1] http://www.w3.org/TR/CSS2/colors.html#background-properties > In addition, it is desirable to allow the author to customize the presentation of the background decoration by distinguishing between the use of bounding box versus line height in order to control the block progression dimension. Further, it is desirable to allow the author to outset or inset the edges of the background decoration. > In order to support these latter two features, it is proposed that the following additional properties be supported: > * background-mode, with values 'bbox' or 'line-height', default of line-height > * background-outline-{top,right,bottom,left} takes value, where positive is outset and negative is inset, and default is 0 > * background-outline, a shorthand for the above, with value syntax {1,4}, where 1 value expresses out(in)set on all four edges, 2 values express out(in)set on top/bottom and right/left, 3 values express out(in)set on top, left/right, bottom, and 4 values express out(in)set on top, right, bottom, left > This background outline operates similarly to the CSS outline-width property [2], except that (1) the outline color is set to the background color, (2) the outline style is solid, and (3) the outline widths can be independently specified for each edge (instead of the same value applying to all edges). In addition, this outline is drawn adjacent to the edges of the background rectangle determined by the 'background-mode' property, i.e., bounding box or line height. > [2] http://www.w3.org/TR/CSS21/ui.html#propdef-outline-width > It might be argued that this background-outline is equivalent to the CSS 'border' property semantics. We do not take that position here because it may be desirable to add border or padding support to the SVG text and tspan elements in the future, and we don't wish to influence the possible semantics of doing so. If border and padding were to be added in the future, then the background-outline would effectively intersect with the border or padding regions, but be drawn before, not after (as is done with the CSS outline property); i.e., the drawing order should be background with background outline, text with decorations, then borders (if added in future), then CSS outline (if added in future). -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org