Return-Path: Delivered-To: apmail-forrest-svn-archive@www.apache.org Received: (qmail 1781 invoked from network); 6 Nov 2004 02:46:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 6 Nov 2004 02:46:50 -0000 Received: (qmail 41374 invoked by uid 500); 6 Nov 2004 02:46:50 -0000 Delivered-To: apmail-forrest-svn-archive@forrest.apache.org Received: (qmail 41305 invoked by uid 500); 6 Nov 2004 02:46:49 -0000 Mailing-List: contact svn-help@forrest.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: "Forrest Developers List" Delivered-To: mailing list svn@forrest.apache.org Received: (qmail 41291 invoked by uid 99); 6 Nov 2004 02:46:49 -0000 X-ASF-Spam-Status: No, hits=-10.0 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Fri, 05 Nov 2004 18:46:48 -0800 Received: (qmail 1769 invoked by uid 65534); 6 Nov 2004 02:46:47 -0000 Date: 6 Nov 2004 02:46:47 -0000 Message-ID: <20041106024647.1766.qmail@minotaur.apache.org> From: crossley@apache.org To: svn@forrest.apache.org Subject: svn commit: rev 56726 - forrest/site/howto X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Author: crossley Date: Fri Nov 5 18:46:46 2004 New Revision: 56726 Added: forrest/site/howto/howto-corner-images.html (contents, props changed) forrest/site/howto/howto-corner-images.pdf (contents, props changed) Modified: forrest/site/howto/howto-asf-mirror.html forrest/site/howto/howto-howto.html forrest/site/howto/howto-pdf-tab.html forrest/site/howto/index.html forrest/site/howto/index.pdf Log: new "howto-corner-images". Modified: forrest/site/howto/howto-asf-mirror.html ============================================================================== --- forrest/site/howto/howto-asf-mirror.html (original) +++ forrest/site/howto/howto-asf-mirror.html Fri Nov 5 18:46:46 2004 @@ -119,6 +119,9 @@ +
Added: forrest/site/howto/howto-corner-images.html ============================================================================== --- (empty file) +++ forrest/site/howto/howto-corner-images.html Fri Nov 5 18:46:46 2004 @@ -0,0 +1,556 @@ + + + + + + + +How to modify the color of generated corner images + + + + + + + + + +
+ + + +
+ + + + + + + + + + + + +
+
+
+
+ +
+ + +
+ +
+ +   +
+ + + + + +
+ + +
+ Font size: +   +   +   +
+

How to modify the color of generated corner images

+
+ This How-To describes how to modify the corner images that appear in + the menu and tabs of the skins. +
+ + +
+ +How to modify the color of generated corner images + + +

Overview

+
+

+ This How-To describes how to modify the corner images that appear in + the menu and tabs of the skins. +

+
+ + + +
+ + + +

Intended Audience

+
+

+ Users who want to change the colors of the corner images in the + output html documents. +

+

+ This explanation is also useful for skin developers to understand + the corner image generation process. +

+
+ + + +

Purpose

+
+

+ Forrest renders the corner images through + Scalable Vector Graphics (SVG). + It may be necessary to change the color of + the corner images to be suitable for your own skin colors. +

+
+ + + +

Prerequisites

+
+
    + +
  • Understand how to use the skinconf.xml file to change the appearance + of the output documents.
  • + +
  • Understand how to create or modify skins by following the + Using Forrest document + (topic "Forrest skins").
  • + +
+
+ + + +

Steps

+
+

+ The procedure outlined below provides an understanding of how corner + images are named (the contract) and then shows how to define new + colors for these images by modifying the + src/documentation/skinconf.xml of a project. +

+ +

Understand how corner images are named (the contract)

+

+ The corner images are referenced in some .css files of the + above-named skins; for example, in screen.css of the pelt skin: +

+
+/*Example from screen.css of pelt*/
+...
+/**
+* Round corner
+*/
+#roundtop {
+    background-image: url(images/rc-t-r-15-1body-2menu-3menu.png);
+    background-repeat: no-repeat;
+    background-position: top right;
+}
+...
+      
+

+ The naming follows a contract which is described below. In general, + the naming looks like: +

+
+images/{$name}-{$v-orientation}-{$h-orientation}-{$size}-1{$backgroundColor}-2{$strokeColor}-3{$foregroundColor}
+      
+

+ The first part + (images/{$name}-{$v-orientation}-{$h-orientation}-{$size}) + identifies which images is used and how big (width x height) it should + be. The second part\ + (-1{$backgroundColor}-2{$strokeColor}-3{$foregroundColor}) + identifies the coloring of each portion of the image. The input + parameter for the second part comes from the color profile of + src/documentation/skinconf.xml. The second part is + easily identifiable through the numbering 1-2-3. +

+

+ Let us get into details: +

+
+ +
+images +
+ +
+ Path to the xslt that creates the corner. +
+ +images/ = {$FORREST_HOME}/src/core/context/skins/common/images/ + +
+ +
+{$name} +
+ +
+ In the common skin there are two XSLT files ready for use: +
    + +
  • + +rc.svg.xslt: handles rounded corners +
  • + +
  • + +dc.svg.xslt: handles diagonal 45-degree corners +
  • + +
+ +name = [rc|dc] + +
+ +e.g. rc + +
+ +
+{$v-orientation} +
+ +
+ Vertical orientation of the corner images (top or bottom). +
+ +v-orientation = [t|b] + +
+ +e.g. t + +
+ +
+{$h-orientation} +
+ +
+ Horizontal orientation of the corner images (left or right). +
+ +h-orientation = [l|r] + +
+ +e.g. r + +
+ +
+{$size} +
+ +
+ Pixels size of the width and height of the corner image. +
+ +size=x + +
+ +e.g. 5 + +
+ +
+{$backgroundColor} +
+ +
+ Any <color name=""/> element in the skinconf.xml (the value="{$color}" + attribute will be applied). +
+ +e.g. header + +
+ +
+{$strokeColor} +
+ +
+ Any <color name=""/> element in the skinconf.xml (the value="{$color}" + attribute will be applied). +
+ +e.g. searchbox + +
+ +
+{$foregroundColor} +
+ +
+ Any <color name=""/> element in the skinconf.xml (the value="{$color}" + attribute will be applied). +
+ +e.g. searchbox + +
+ +
+ +

Modifying the skinconf.xml of your project

+

+ modifying the skinconf.xml of your project (by + default you find it at [project-dir]/src/documentation/). +

+

+ Starting about line 155 you find a <colors> + ... </colors> element with content commented-out: +

+
+<colors>
+<!-- These values are used for the generated CSS files. -->
+
+<!-- Krysalis -->
+<!--
+  <color name="header"    value="#FFFFFF"/>
+
+  <color name="tab-selected" value="#a5b6c6" link="#000000" vlink="#000000" hlink="#000000"/>
+  <color name="tab-unselected" value="#F7F7F7" link="#000000" vlink="#000000" hlink="#000000"/>
+  <color name="subtab-selected" value="#a5b6c6" link="#000000" vlink="#000000" hlink="#000000"/>
+  <color name="subtab-unselected" value="#a5b6c6" link="#000000" vlink="#000000" hlink="#000000"/>
+
+...
+
+-->
+
+</colors>
+      
+

+ To modify the colors of the corner images, you can either define + your own <color name=.../> elements or uncomment + one of the existing <color name=.../> elements + and adjust the color value to your needs. +

+

+ +e.g. + +

+
+<color name="tab-selected" value="#FF0000"/>
+      
+

+ This affects all corner images whose {$backgroundColor}, {$strokeColor} or + {$foregroundColor} is set to tab-selected. +
+ For example, in screen.css (of the "pelt" skin) you find: +

+
+#roundbottomsmall {
+    background-image: url(images/rc-b-r-5-1header-2tab-selected-3tab-selected.png);
+    background-repeat: no-repeat;
+    background-position: top right;
+}
+      
+

+ Now the stroke color (-2tab-selected) and the foreground + color (-3tab-selected) are set to red (remember: we + defined #FF0000 as the "color" value of + tab-selected). +

+ +

Modifying .css files

+

+ In addition to the modification of skinconf.xml + you can also modify the respective .css file of your skin. +

+

+ Here's another example: +

+
+/*your .css file*/
+...
+#roundbottomsmall {
+    background-image: url(images/rc-b-r-5-1foo-2secondfoo-3thirdfoo.png);
+    background-repeat: no-repeat;
+    background-position: top right;
+}
+...
+      
+
+<!-- your skinconf.xml -->
+...
+<colors>
+  <color name="foo" value="#FF0000"/>
+  <color name="secondfoo" value="#00FF00"/>
+  <color name="thirdfoo" value="##00FF00"/>
+</colors>
+      
+

+ Here we have created our own color tags (in the .css file) and + defined the respective values for them (in skinconf.xml). + Now you have color images with a red background and a green + foreground. Horrible, isn't it? +

+
+ + + +

Feedback

+
+

+ Please provide feedback about this document via the + mailing lists. +

+
+ +
+ +
 
+
+ + + Added: forrest/site/howto/howto-corner-images.pdf ============================================================================== Binary file. No diff available. Modified: forrest/site/howto/howto-howto.html ============================================================================== --- forrest/site/howto/howto-howto.html (original) +++ forrest/site/howto/howto-howto.html Fri Nov 5 18:46:46 2004 @@ -119,6 +119,9 @@ +
Modified: forrest/site/howto/howto-pdf-tab.html ============================================================================== --- forrest/site/howto/howto-pdf-tab.html (original) +++ forrest/site/howto/howto-pdf-tab.html Fri Nov 5 18:46:46 2004 @@ -119,6 +119,9 @@ +
Modified: forrest/site/howto/index.html ============================================================================== --- forrest/site/howto/index.html (original) +++ forrest/site/howto/index.html Fri Nov 5 18:46:46 2004 @@ -119,6 +119,9 @@ +
@@ -166,6 +169,13 @@ How to create a PDF document for each tab - Describes the generation of a PDF document for each group of documents that is defined by a tab. + + +
  • +How to modify the color of generated corner images + - Describes the use of CSS values from the skinconf.xml configuration + file to change the color of the corner images to be suitable for + your own skin colors. Advanced use explains editing the *.css too.
  • Modified: forrest/site/howto/index.pdf ============================================================================== Binary files. No diff available.