plugin-plazmic content developer%27s kit-svg-reference guide

Upload: krzysztof-karol-nowacki

Post on 05-Apr-2018

247 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    1/108

    SVG for BlackBerrySmartphones

    Reference Guide

  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    2/108

    SVG for BlackBerry Smartphones Reference Guide

    Last modified: 24 September 2008

    Part number: 20095638

    At the time of publication, this documentation is based on the Plazmic Content Developers Kit Version 4.6.

    Send us your comments on product documentation: https://www.blackberry.com/DocsFeedback.

    2008 Plazmic, Inc. All Rights Reserved. Plazmic is a trademark of Plazmic, Inc. Plazmic Content Developers Kit software and documentation,

    including any online documentation (collectively, the Materials) are the property of Plazmic, Inc. The Materials contain information that is

    confidential and proprietary to Plazmic, Inc. The Materials are protected by Canadian, U.S., Japanese and other international intellectual

    property laws and international treaty provisions. No part of the Materials may be reproduced or transmitted in any form or by any means,

    electrical, or mechanical, including by photocopying or by any information storage or retrieval system, without the written permission of

    Plazmic, Inc.

    The BlackBerry and RIM families of related marks, images, and symbols are the exclusive properties of Research In Motion Limited. RIM,

    Research In Motion, Always On, Always Connected, the envelope in motion symbol, BlackBerry, and BlackBerry Enterprise Server are

    registered with the U.S. Patent and Trademark Office and may be pending or registered in other countries.

    W3C is either a registered trademark or a trademark of the World Wide Web Consortium in the United States and/or other countries. All othertrademarks are the properties of their respective owners.

    The software referenced in this guide facilitates the creation of content for the BlackBerry Browser. In order to use the software referenced

    herein as intended, you must have valid agreements in place with the licensor(s) of the hardware and software referenced in this user guide. In

    addition to being required to comply with such license terms, you are strictly prohibited from using the software referenced herein to create,

    adapt, or otherwise use in any fashion any content that infringes upon or violates the intellectual property rights of any third-party. The

    disclaimer of liability set forth above shall apply with respect to your use of the software in any manner not authorized by Plazmic, Inc.

    The software referenced in this guide is based in part on the work of the Independent JPEG Group.

    The BlackBerry smartphone and other devices and/or associated software are protected by copyright, international treaties, and various

    patents, including one or more of the following U.S. patents: 6,278,442; 6,271,605; 6,219,694; 6,075,470; 6,073,318; D445,428; D433,460;

    D416,256. Other patents are registered or pending in the U.S. and in various countries around the world. Visitwww.rim.com/patents for a list of

    RIM (as hereinafter defined) patents.

    This documentation including all documentation incorporated by reference herein such as documentation provided or made available at

    www.blackberry.com/go/docs is provided or made accessible "AS IS" and "AS AVAILABLE" and without condition, endorsement, guarantee,

    representation, or warranty of any kind by Research In Motion Limited and its affiliated companies ("RIM") and RIM assumes no responsibility

    for any typographical, technical, or other inaccuracies, errors, or omissions in this documentation. In order to protect RIM proprietary andconfidential information and/or trade secrets, this documentation may describe some aspects of RIM technology in generalized terms. RIM

    reserves the right to periodically change information that is contained in this documentation; however, RIM makes no commitment to provide

    any such changes, updates, enhancements, or other additions to this documentation to you in a timely manner or at all.

    This documentation might contain references to third-party sources of information, hardware or software, products or services including

    components and content such as content protected by copyright and/or third-party web sites (collectively the "Third Party Products and

    Services"). RIM does not control, and is not responsible for, any Third Party Products and Services including, without limitation the content,

    accuracy, copyright compliance, compatibility, performance, trustworthiness, legality, decency, links, or any other aspect of Third Party Products

    and Services. The inclusion of a reference to Third Party Products and Services in this documentation does not imply endorsement by RIM ofthe Third Party Products and Services or the third party in any way.

    https://www.blackberry.com/DocsFeedbackhttp://www.rim.com/patentshttp://www.blackberry.com/go/docshttps://www.blackberry.com/DocsFeedbackhttp://www.blackberry.com/go/docshttp://www.blackberry.com/go/docshttp://www.rim.com/patents
  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    3/108

    EXCEPT TO THE EXTENT SPECIFICALLY PROHIBITED BY APPLICABLE LAW IN YOUR JURISDICTION, ALL CONDITIONS, ENDORSEMENTS,

    GUARANTEES, REPRESENTATIONS, OR WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY

    CONDITIONS, ENDORSEMENTS, GUARANTEES, REPRESENTATIONS OR WARRANTIES OF DURABILITY, FITNESS FOR A PARTICULARPURPOSE OR USE, MERCHANTABILITY, MERCHANTABLE QUALITY, NON-INFRINGEMENT, SATISFACTORY QUALITY, OR TITLE, OR ARISING

    FROM A STATUTE OR CUSTOM OR A COURSE OF DEALING OR USAGE OF TRADE, OR RELATED TO THE DOCUMENTATION OR ITS USE,

    OR PERFORMANCE OR NON-PERFORMANCE OF ANY SOFTWARE, HARDWARE, SERVICE, OR ANY THIRD PARTY PRODUCTS AND

    SERVICES REFERENCED HEREIN, ARE HEREBY EXCLUDED. YOU MAY ALSO HAVE OTHER RIGHTS THAT VARY BY STATE OR PROVINCE.

    SOME JURISDICTIONS MAY NOT ALLOW THE EXCLUSION OR LIMITATION OF IMPLIED WARRANTIES AND CONDITIONS. TO THE EXTENT

    PERMITTED BY LAW, ANY IMPLIED WARRANTIES OR CONDITIONS RELATING TO THE DOCUMENTATION TO THE EXTENT THEY CANNOT

    BE EXCLUDED AS SET OUT ABOVE, BUT CAN BE LIMITED, ARE HEREBY LIMITED TO NINETY (90) DAYS FROM THE DATE YOU FIRST

    ACQUIRED THE DOCUMENTATION OR THE ITEM THAT IS THE SUBJECT OF THE CLAIM.

    TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW IN YOUR JURISDICTION, IN NO EVENT SHALL RIM BE LIABLE FOR ANY TYPE

    OF DAMAGES RELATED TO THIS DOCUMENTATION OR ITS USE, OR PERFORMANCE OR NON-PERFORMANCE OF ANY SOFTWARE,

    HARDWARE, SERVICE, OR ANY THIRD PARTY PRODUCTS AND SERVICES REFERENCED HEREIN INCLUDING WITHOUT LIMITATION ANY

    OF THE FOLLOWING DAMAGES: DIRECT, CONSEQUENTIAL, EXEMPLARY, INCIDENTAL, INDIRECT, SPECIAL, PUNITIVE, OR AGGRAVATED

    DAMAGES, DAMAGES FOR LOSS OF PROFITS OR REVENUES, FAILURE TO REALIZE ANY EXPECTED SAVINGS, BUSINESS INTERRUPTION,

    LOSS OF BUSINESS INFORMATION, LOSS OF BUSINESS OPPORTUNITY, OR CORRUPTION OR LOSS OF DATA, FAILURES TO TRANSMIT OR

    RECEIVE ANY DATA, PROBLEMS ASSOCIATED WITH ANY APPLICATIONS USED IN CONJUNCTION WITH RIM PRODUCTS OR SERVICES,

    DOWNTIME COSTS, LOSS OF THE USE OF RIM PRODUCTS OR SERVICES OR ANY PORTION THEREOF OR OF ANY AIRTIME SERVICES,

    COST OF SUBSTITUTE GOODS, COSTS OF COVER, FACILITIES OR SERVICES, COST OF CAPITAL, OR OTHER SIMILAR PECUNIARY LOSSES,

    WHETHER OR NOT SUCH DAMAGES WERE FORESEEN OR UNFORESEEN, AND EVEN IF RIM HAS BEEN ADVISED OF THE POSSIBILITY OFSUCH DAMAGES.

    TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW IN YOUR JURISDICTION, RIM SHALL HAVE NO OTHER OBLIGATION, DUTY,

    OR LIABILITY WHATSOEVER IN CONTRACT, TORT, OR OTHERWISE TO YOU INCLUDING ANY LIABILITY FOR NEGLIGENCE OR STRICT

    LIABILITY.

    THE LIMITATIONS, EXCLUSIONS, AND DISCLAIMERS HEREIN SHALL APPLY: (A) IRRESPECTIVE OF THE NATURE OF THE CAUSE OF

    ACTION, DEMAND, OR ACTION BY YOU INCLUDING BUT NOT LIMITED TO BREACH OF CONTRACT, NEGLIGENCE, TORT, STRICT LIABILITY

    OR ANY OTHER LEGAL THEORY AND SHALL SURVIVE A FUNDAMENTAL BREACH OR BREACHES OR THE FAILURE OF THE ESSENTIAL

    PURPOSE OF THIS AGREEMENT OR OF ANY REMEDY CONTAINED HEREIN; AND (B) TO RIM AND ITS AFFILIATED COMPANIES, THEIR

    SUCCESSORS, ASSIGNS, AGENTS, SUPPLIERS (INCLUDING AIRTIME SERVICE PROVIDERS), AUTHORIZED RIM DISTRIBUTORS (ALSO

    INCLUDING AIRTIME SERVICE PROVIDERS) AND THEIR RESPECTIVE DIRECTORS, EMPLOYEES, AND INDEPENDENT CONTRACTORS.

    IN ADDITION TO THE LIMITATIONS AND EXCLUSIONS SET OUT ABOVE, IN NO EVENT SHALL ANY DIRECTOR, EMPLOYEE, AGENT,

    DISTRIBUTOR, SUPPLIER, INDEPENDENT CONTRACTOR OF RIM OR ANY AFFILIATES OF RIM HAVE ANY LIABILITY ARISING FROM OR

    RELATED TO THE DOCUMENTATION.

    Prior to subscribing for, installing, or using any Third Party Products and Services, it is your responsibility to ensure that your airtime service

    provider has agreed to support all of their features. Installation or use of Third Party Products and Services with RIM's products and servicesmay require one or more patent, trademark, copyright, or other licenses in order to avoid infringement or violation of third party rights. You are

    solely responsible for determining whether to use Third Party Products and Services and if any third party licenses are required to do so. If

    required you are responsible for acquiring them. You should not install or use Third Party Products and Services until all necessary licenses

    have been acquired. Any Third Party Products and Services that are provided with RIM's products and services are provided as a convenience to

    you and are provided "AS IS" with no express or implied conditions, endorsements, guarantees, representations, or warranties of any kind by

    RIM and RIM assumes no liability whatsoever, in relation thereto. Your use of Third Party Products and Services shall be governed by and

    subject to you agreeing to the terms of separate licenses and other agreements applicable thereto with third parties, except to the extent

    expressly covered by a license or other agreement with RIM.

  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    4/108

    The terms of use of any RIM product or service are set out in a separate license or other agreement with RIM applicable thereto. NOTHING IN

    THIS DOCUMENTATION IS INTENDED TO SUPERSEDE ANY EXPRESS WRITTEN AGREEMENTS OR WARRANTIES PROVIDED BY RIM FOR

    PORTIONS OF ANY RIM PRODUCT OR SERVICE OTHER THAN THIS DOCUMENTATION.

    Published in Canada

    Plazmic, Inc295 Phillip Street

    Waterloo, ON N2L 3W8Canada

  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    5/108

    Contents

    1 Scalable Vector Graphics language reference.................... ..................... ................... .................. ................. .9

    Working with SVG ............................................................................................................................................. 9

    Components of a basic .svg document.......................................................................................................... 9SVG root element ...................................................................................................................................... 9

    Namespaces ..............................................................................................................................................10

    Elements.....................................................................................................................................................10

    Syntax..........................................................................................................................................................11

    Testing SVG .......................................................................................................................................................11

    SVG content supported by the SVG Transcoding Utility............................................................................11

    Supported SVG elements ........................................................................................................................ 13

    Supported SVG attributes .......................................................................................................................16

    2 Defining the document structure .....................................................................................................................21

    Document structure elements .......................................................................................................................21

    .........................................................................................................................................................21

    ........................................................................................................................................................ 22

    .............................................................................................................................................................. 22

    .......................................................................................................................................................... 23.........................................................................................................................................................24

    Document structure definition attributes............................................................................................ 25

    Core attributes .........................................................................................................................................30

    Link elements....................................................................................................................................................31

    ...............................................................................................................................................................31

    ............................................................................................................................................. 32

    Hyperlink attributes ................................................................................................................................ 32Plazmic extension elements .......................................................................................................................... 33

    ......................................................................................................................................... 33

    Plazmic extension attributes.................................................................................................................. 33

    3 Adding graphic elements................... ..................... ................... .................... ..................... ..................... .........35

    Basic shape elements .....................................................................................................................................35

    ......................................................................................................................................................35

    ....................................................................................................................................................36

  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    6/108

    .........................................................................................................................................................36

    .................................................................................................................................................. 37

    .................................................................................................................................................. 37

    .........................................................................................................................................................38

    Shape attributes ......................................................................................................................................38

    Text elements ..................................................................................................................................................42

    .........................................................................................................................................................42.................................................................................................................................................43

    ......................................................................................................................................................44

    Text attributes ..........................................................................................................................................45

    Path elements..................................................................................................................................................48

    ........................................................................................................................................................48

    Path definition attributes .......................................................................................................................49

    Image elements................................................................................................................................................51 ......................................................................................................................................................51

    Image attributes ...................................................................................................................................... 52

    Pattern elements.............................................................................................................................................55

    ...................................................................................................................................................55

    Pattern attributes ....................................................................................................................................56

    Attributes for graphic elements.................................................................................................................... 57

    Paint attributes ........................................................................................................................................ 57

    Opacity attributes ...................................................................................................................................60

    Graphic rendering attributes.................................................................................................................62

    Style attributes.........................................................................................................................................64

    Static transformation attributes............................................................................................................65

    4 Adding animation and media...........................................................................................................................67

    Animation elements........................................................................................................................................67

    .................................................................................................................................................67........................................................................................................................................68

    .....................................................................................................................................68

    .............................................................................................................................. 69

    ..........................................................................................................................................................70

    ............................................................................................................................................................ 71

    Audio elements................................................................................................................................................ 72

    ...................................................................................................................................................... 72Attributes for animation and media............................................................................................................. 73

  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    7/108

    Target attributes ...................................................................................................................................... 73

    Timing attributes ..................................................................................................................................... 74

    Animation value attributes.....................................................................................................................78

    Addition attributes ..................................................................................................................................82

    Rotation attributes ..................................................................................................................................83

    Transformation attributes ......................................................................................................................84

    Defining motion paths ...................................................................................................................................84Defining motion paths using .................................................................................................85

    Defining motion paths using the path attribute.................................................................................85

    5 Adding XForms ................. ..................... ..................... ..................... ..................... ...................... ....................... 89

    XForm elements ..............................................................................................................................................89

    .........................................................................................................................................89

    ....................................................................................................................................90............................................................................................................................................91

    ...........................................................................................................................................91

    ........................................................................................................................................92

    ..........................................................................................................................................92

    .......................................................................................................................................93

    .......................................................................................................................................94

    ...............................................................................................................................94

    ....................................................................................................................................95

    .......................................................................................................................................95

    ........................................................................................................................................ 96

    XForm attributes ..................................................................................................................................... 96

    Plazmic extensions to XForms...............................................................................................................98

    Example: Using XForms to collect user information ............................................................................... 100

    6 Defining external fonts ...................................................................................................................................103Font definition elements.............................................................................................................................. 103

    ............................................................................................................................................. 103

    ....................................................................................................................................... 103

    ....................................................................................................................................... 104

    Font definition attributes ..................................................................................................................... 104

  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    8/108

  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    9/108

    1

    Scalable Vector Graphics language reference

    Working with SVGThis document describes the Scalable Vector Graphics (SVG) elements and attributes that BlackBerry devices

    supports. SVG is a text-based XML language that is useful for describing, two-dimensional graphical content. SVG

    was developed by the World Wide Web Consortium (W3C), the non-profit, open-standards consortium that

    created HTML and XML.

    Bitmap web graphics, such as .jpg and .gif images, maintain a specified size despite the display area. In contrast,

    SVG can be scaled to fit any size screen. This feature makes SVG suitable for deployment on wireless handhelds. Itis ideal for content deployment on BlackBerry devices. Different BlackBerry devices have different screen

    resolutions; using SVG, you can create content that is automatically scaled based on the display size, with no loss

    in image quality or in the legibility of text.

    Components of a basic .svg documentThe following annotated sample describes a simple .svg document.

    SVG root elementYou define an SVG document using the element. An SVG document consists of any number of elements

    contained within the opening tag and closing tag.

    Working with SVG

    Components of a basic .svg document

    Testing SVG

    Line Description

    This line specifies the XML declaration.

    The opening element tag signifies the start of the

    SVG document fragment and, in this example, defines

    the size of the canvas. See SVG root element on page

    9 for more information.

    This line shows SVG content that defines an ellipse. See

    Elements on page 10 for more information. The tag is required to close the SVG document

    fragment.

  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    10/108

    10

    SVG for BlackBerry Smartphones Version 4.6 Reference Guide

    Namespaces

    The SVG Transcoder uses several sources to define the elements and attributes that it supports. The location ofthese definition files is specified in the namespace declaration. The SVG Transcoding Utility requires these

    definition files to validate your SVG content before transcoding. You must properly identify each of the

    namespaces required for your SVG document in order for the SVG Transcoder to convert the file into the .pme

    format.

    Namespaces referenced by your SVG document are identified using the xmlns[:prefix] attribute of the outermost

    element. See http://www.w3.org/TR/REC-xml-names/ for an explanation on using namespaces.

    At minimum, your SVG document must include the following namespaces:

    xmlns="http://www.w3.org/2000/svg"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://www.w3.org/2000/svg http://www.plazmic.com/svg/schema/

    svg.xsd"

    The following table outlines possible additional namespace references, depending on the functionality your

    document requires.

    ElementsAn element includes the start tag (), the end tag (), and everything in between.

    Elements in SVG are related as parents and children. SVG elements can be categorized into the following basic

    types:

    Container elements hold graphic elements and other container elements such as child elements. BlackBerry

    devices support the following container elements: , , and .

    Graphic elements enable graphics to be drawn onto the target canvas. SVG supports three types of graphic

    objects: vector shapes, images, and text. BlackBerry devices support the following graphics elements:

    basic shapes (, , , , , and )

    text (, , ) paths ()

    images ()

    Animation elements enable developers to perform affine animations on graphic elements.

    XForms elements enable developers to add form fields to their SVG content to collect data from users.

    Elements are rendered in the order in which they appear in the .svg file. When layering objects, place background

    objects at the top of the file.

    Feature set Namespace reference

    Hyperlinks xmlns:xlink="http://www.w3.org/1999/xlink"

    Plazmic extensions xmlns:pz="http://www.plazmic.com/plazmic_extents"

    XForms xmlns:xforms="http://www.w3.org/2002/xforms"

  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    11/108

    11

    1: Scalable Vector Graphics language reference

    Syntax

    As in XML, SVG can be validated against a schema. SVG with correct syntax is well-formed. This documentdescribes the syntax for valid and well-formed SVG.

    In well-formed SVG, consider the following guidelines:

    Elements must be closed or empty.Every opening tag (for example, ), requires a closing tag (forexample, ). Express empty elements as or .

    Elements must be properly nested.Because SVG is a hierarchical language, you cannot overlap elements. Toproperly nest elements, you must close child elements before closing parent elements.

    Elements are case sensitive.XML-aware applications (such as XML parsers that convert SVG code into SVGobjects) cannot match mixed cases for starting and ending element tags. For example, the tag is

    different from the tag.

    Testing SVGTo test SVG in a wireless device environment, use the BlackBerry device simulator, available with the BlackBerry

    Java Development Environment (required to install the Plazmic Content Developers Kit).

    Test SVG containing custom elements

    1. Transcode the .svg file to .pme format using the SVG Transcoding Utility, which is available with the Content

    Developers Kit.

    2. Open the file in one of the following applications:

    BlackBerry Device Simulator

    BlackBerry Browser on a BlackBerry device (you must post the content on an web application server first)

    SVG content supported by the SVG Transcoding UtilityThe SVG Transcoding Utility included with Plazmic Content Developer Kit Version 4.6 is in alignment with

    version 1.2 of the SVG specification. It supports the following content:

    a subset of SVG Tiny 1.2

    a subset of SVG Basic 1.2

    additional features from SVG 1.2 Full

    a subset of XForms 1.0

    the element from SMIL 1.0

    custom Plazmic extensions (,)

    Note: Elements and attributes marked with an asterisk (*) are SVG extensions that will not run properly in an SVG-enabled web

    browser.

  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    12/108

    12

    SVG for BlackBerry Smartphones Version 4.6 Reference Guide

    The SVG Transcoding Utility converts SVG content into .pme, a binary content format supported by BlackBerry

    devices. The SVG Transcoding Utility can output content in one of two formats.

    Output format Description

    .pme version 1.2 Supports the complete feature set outlined in this reference.

    Only BlackBerry devices running BlackBerry Device Software Version 4.1 or later support this output format. You

    must use the BlackBerry Device Simulator (installed with the BlackBerry Java Development Environment) to test

    .pme 1.2 content.

    .pme version 0.2 Supports the feature set provided with Plazmic Content Developer Kit Version 3.7.

    Supported by BlackBerry devices running BlackBerry Device Software Version 3.7 or later.

  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    13/108

    13

    1: Scalable Vector Graphics language reference

    Supported SVG elements

    Supported SVG elements, listed by type

    Supported SVG elements, listed alphabetically

    Element type Elements See Page

    Structure

    21

    Hyperlinks 31

    Plazmic extension 33

    Basic Shape

    35

    Text 42

    Complex Path 48

    Image 51

    Pattern 55

    Animation

    67

    Media 72

    XForms

    89

    Font Definition 103

    Element Type Relationships See Page

    Valid child elements Valid attributes (required attributes in bold)

    Hyperlink Any element its parent can contain,

    except itself.

    display, fill, fill-opacity,font-family, font-size,

    font-style, font-weight,id,image-rendering,

    shape-rendering,stroke,stroke-linecap,

    stroke-linejoin, stroke-width, text-decoration,

    text-rendering, transform, visibility,xlink:href,

    xml:space

    31

    Animation accumulate, additive,attributeName,

    attributeType,begin, by,calcMode,dur, end, fill,

    from,id,keyTimes, repeatCount, restart, to,

    values,xlink:href,xml:space

    67

    Animation accumulate, additive,attributeName,

    attributeType,begin, by,calcMode,dur, end, fill,

    from,id,keyTimes, repeatCount, restart, to,

    values,xlink:href,xml:space

    68

  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    14/108

    14

    SVG for BlackBerry Smartphones Version 4.6 Reference Guide

    Animation accumulate, additive,begin, by,calcMode,dur,

    end, fill, from, id, keyPoints, keyTimes, path,

    repeatCount, restart, rotate, to,values, xlink:href,

    xml:space

    68

    Animation accumulate, additive,attributeName,

    attributeType,begin, by,calcMode,dur, end, fill,

    from,id,keyTimes, repeatCount, restart, restart,

    to, type,values,xlink:href,xml:space

    69

    Media begin,dur, end, fill, id, repeatCount,restart,

    xlink:href

    72

    Basic Shape ,,

    ,

    ,,,

    cx, cy, display, fill, fill-opacity,id,

    image-rendering, opacity,r,shape-rendering,

    stroke, stroke-linecap,stroke-linejoin,

    stroke-opacity,stroke-width, text-rendering,

    transform,visibility,xml:space

    35

    Structure ,,

    ,,

    id 21

    Structure id, xml:space 22

    Basic Shape ,,

    ,

    ,,,

    cx, cy, display, fill, fill-opacity,id,

    image-rendering, opacity,rx, ry,

    shape-rendering,stroke,stroke-linecap,

    stroke-linejoin, stroke-opacity, stroke-width,

    text-rendering, transform, visibility

    36

    Font font-family,id 103

    Font id 103

    Font xlink:href 104

    Structure ,,,

    ,

    ,,

    , ,, , ,

    ,,, ,

    ,,,,

    ,,,

    display, fill, fill-opacity,font-family, font-size,

    font-style, font-weight,id,image-rendering,

    opacity, shape-rendering, stroke,stroke-linecap,

    stroke-linejoin, stroke-opacity, stroke-width,

    text-decoration, text-rendering, transform,

    visibility,xlink:href,xml:space

    22

    Image ,,

    ,

    ,,,

    display, height, id, image-rendering,

    preserveAspectRatio,shape-rendering,

    text-rendering, transform, visibility, width, x,

    xlink:href,y

    51

    Basic Shape ,,

    ,

    ,,,

    display, fill, fill-opacity,id,

    image-rendering, opacity,r,

    shape-rendering,stroke,

    stroke-linecap,stroke-linejoin, stroke-opacity,

    stroke-width,

    text-rendering, transform, visibility,x1,x2,

    xml:space,y1,y2

    36

    Element Type Relationships See Page

    Valid child elements Valid attributes (required attributes in bold)

  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    15/108

    15

    1: Scalable Vector Graphics language reference

    Plazmic/

    Hyperlink

    begin, id,xlink:href 32

    Animation id,xlink:href,xml:space 85

    Basic Path ,,

    ,

    ,,,

    d, display, fill, fill-opacity, id, image-rendering,

    opacity, shape-rendering, stroke,stroke-linecap,

    stroke-linejoin, stroke-opacity, stroke-width,

    text-rendering, transform, visibility

    48

    Pattern height, id, patternTransform, patternUnits,

    width,x, y

    55

    Basic Shape ,,

    ,

    ,,,

    display, fill, fill-opacity,id,image-rendering,

    opacity, points, shape-rendering, stroke,

    stroke-linecap,stroke-linejoin, stroke-opacity,

    stroke-width, text-rendering, transform, visibility

    37

    Basic Shape ,,

    ,

    ,,,

    display, fill, fill-opacity,id,image-rendering,

    opacity, points, shape-rendering, stroke,

    stroke-linecap,stroke-linejoin, stroke-opacity,

    stroke-width, text-rendering, transform, visibility

    37

    Basic Shape ,,

    ,

    ,,,

    display, fill, fill-opacity,height, id,

    image-rendering, opacity,rx,ry,

    shape-rendering,stroke,stroke-linecap,

    stroke-linejoin, stroke-opacity, stroke-width,

    text-rendering, transform, visibility, width,x,y

    38

    Animation ,,

    ,

    ,

    begin,dur, id, repeatCount 70

    Animation , attributeName,attributeType, begin, dur, end,

    fill, id, repeatCount, restart, to,xlink:href

    71

    Structure ,,,

    ,

    ,,

    , ,, , ,

    ,,, ,

    ,,,,

    ,,,

    ,,,

    ,

    background-fill,display,fill,fill-opacity,

    font-family,font-size,font-style,font-weight,

    height, hotspot-wrap,id,image-rendering,

    preserveAspectRatio,shape-rendering, stroke,

    stroke-linecap,stroke-linejoin, stroke-opacity,

    stroke-width, text-decoration, text-rendering,

    viewBox,width,x,xmlns[:prefix],y,zoomAndPan

    23

    Plazmic

    Structure

    Extension

    ,,,,,

    ,,, ,

    ,,

    currentChild, display, fill, fill-opacity, font-family,

    font-size, font-style, font-weight,id,stroke,

    stroke-linecap,stroke-linejoin, stroke-opacity,

    stroke-width, style, text-decoration

    33

    Text ,,,

    ,

    ,,,

    ,

    display, dx,dy, fill, fill-opacity,font-family, font-

    size, font-style, font-weight, id, stroke-opacity,

    text-decoration, text-rendering, transform,

    visibility,x,xml:space,y

    42

    Element Type Relationships See Page

    Valid child elements Valid attributes (required attributes in bold)

  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    16/108

    16

    SVG for BlackBerry Smartphones Version 4.6 Reference Guide

    Supported SVG attributesSupported SVG attributes, listed by type

    Text editable, height, id, overflow,width,x,y 43

    Structure id, xml:space 24

    Text display, dx,dy, fill, fill-opacity,font-family, font-

    size, font-style, font-weight, id, stroke-opacity,

    text-decoration, text-rendering,visibility,x,

    xml:space,y

    44

    XForms , id, pzexts:height,pzexts:style, pzexts:width,

    pzexts:x, pzexts:y,xforms:model,xforms:ref

    89

    XForms Any XML form field description. id 90 XForms , id 91

    XForms id 91

    XForms ,

    id 92

    XForms id,xforms:model 92

    XForms ,, id, pzexts:height,pzexts:style, pzexts:width,

    pzexts:x, pzexts:y,xforms:model,xforms:ref

    93

    XForms id,xforms:model,xforms:submission 94 XForms id,xforms:action,xforms:method 94

    XForms , id, pzexts:height,pzexts:style, pzexts:width,

    pzexts:x, pzexts:y,xforms:model,xforms:ref

    95

    XForms id,xforms:action,xforms:method 95

    XForms id 96

    Attribute type Attributes See Page

    Structure background-fill

    height

    preserveAspectRatio

    viewBox

    widthxmlns[:prefix]

    zoomAndPan 25

    Coreid

    xml:space 30Hyperlink xlink:href 32

    Plazmic structure extension currentChild hotspot-wrap 33

    Shape cx, cy

    height

    points

    r

    rx, ry

    x1,y1

    x2,y2 38

    Text dx, dy

    editable

    font-family

    font-size

    font-style

    font-weight

    overflow

    text-decoration

    45

    Element Type Relationships See Page

    Valid child elements Valid attributes (required attributes in bold)

  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    17/108

    17

    1: Scalable Vector Graphics language reference

    Path d 49

    Image height

    preserveAspectRatio

    width

    xlink:href

    52

    Pattern patternTransform patternUnits 56

    Painting fill

    stroke

    stroke-linecap

    stroke-linejoin

    stroke-opacity

    stroke-width

    57

    Opacity fill-opacity opacity stroke-opacity 60

    Graphic rendering display

    image-rendering

    shape-rendering

    text-rendering

    visibility 62

    Style style 64

    Static Transformation transform 65

    Animation accumulate

    additive

    attributeName

    attributeType

    begin

    by

    calcMode

    dur

    end

    fill

    from

    keyPoints

    keyTimes

    path

    repeatCount

    restart

    rotate

    to

    type

    values

    73

    XForm xforms:model

    xforms:submission

    xforms:action

    xforms:method

    xforms:ref 96

    Plazmic XForms extension pzexts:height

    pzexts:style

    pzexts:width

    pzexts:x,pzexts:y

    98

    Font xlink:href 104

    Attribute type Attributes See Page

  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    18/108

    18

    SVG for BlackBerry Smartphones Version 4.6 Reference Guide

    Supported SVG attributes, listed alphabetically

    Note: A = Animatable, I = Inheritable

    Attribute name Type A I Valid parent elements See Page

    accumulate Animation ,,, 82

    additive Animation ,,, 83

    attributeName Animation ,,, 73

    attributeType Animation ,,, 73

    background-fill Structure 25

    begin Animation ,,,,,

    ,,

    74

    by Animation ,,, 78

    calcMode Animation ,,, 79

    currentChild Pzext

    Structure

    33

    cx, cy Shape , 38

    d Path 49

    display Graphic ,,,,,,,,,

    ,,,

    62

    dur Animation ,,,,,

    ,

    74

    dx, dy Text , 45

    editable Text 45

    end Animation ,,,,,

    75

    fill Animation ,,,,,

    75

    fill Painting ,,,,,,,,,

    ,,,

    57

    fill-opacity Opacity ,,,,,,,,,

    ,,,

    60

    font-family Text ,,,,,, 45

    font-size Text ,,,,, 46

    font-style Text ,,,,, 46

    font-weight Text ,,,,, 47

    from Animation ,,, 79

    height Structure 26

    height Shape 39

    height Image , 52

    hotspot-wrap Pzext

    Structure

    34

    id Core Any element 30

  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    19/108

    19

    1: Scalable Vector Graphics language reference

    image-rendering Graphic ,,,,,,,,,

    ,,,

    62

    keyPoints Animation 80

    keyTimes Animation ,,, 80

    opacity Opacity ,,,,,, 61

    overflow Text 47

    path Animation 85

    patternTransform Pattern 56

    patternUnits Pattern 57

    points Shape , 39

    preserveAspectRatio Structure 26

    preserveAspectRatio Image 52

    pzexts:height Pzext XForms ,, 98

    pzexts:style Pzext XForms ,, 99

    pzexts:width Pzext XForms ,, 99

    pzexts:x,pzexts:y Pzext XForms ,, 100

    r Shape 40repeatCount Animation ,,,,,

    ,

    76

    restart Animation ,,,,,

    76

    rotate Animation 83

    rx, ry Shape , 40

    shape-rendering Graphic ,,,,,,,,,

    ,,,

    63

    stroke Painting ,,,,,,,,,,

    58

    stroke-linecap Painting ,,,,,,,,,,

    59

    stroke-linejoin Painting ,,,,,,,,,,

    59

    stroke-opacity Opacity ,,,,,,,,,,

    ,,

    61

    stroke-width Painting ,,,,,,,,,,

    60

    style Style ,,,,,,,,

    ,,,,

    64

    text-decoration Text ,,,,, 47

    text-rendering Graphic ,,,,,,,,,

    ,,,

    63

    to Animation ,,,, 81

    transform StaticTransformation

    ,,,,,,,,,,,

    65

    Attribute name Type A I Valid parent elements See Page

  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    20/108

    20

    SVG for BlackBerry Smartphones Version 4.6 Reference Guide

    type Animation 84

    values Pattern ,,, 81

    viewBox Structure 27

    visibility Graphic ,,,,,,,,,

    ,,,

    64

    width Structure 28

    width Shape 41

    width Image 54

    x,y Shape ,,,,,, 41

    x1, y1 Shape 42

    x2, y2 Shape 42

    xforms:action XForms ,, 96

    xforms:method XForms ,, 96

    xforms:model XForms ,,,,

    97

    xforms:ref XForms ,, 97

    xforms:submission XForms 98xlink:href Hyperlink 32

    xlink:href Image 54

    xlink:href Font 104

    xml:space Core ,,,,

    ,,,,,,,

    , , ,,

    30

    xmlns[:prefix] Structure 28

    zoomAndPan Structure 29

    Attribute name Type A I Valid parent elements See Page

  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    21/108

    2

    Defining the document structure

    Document structure elementsDocument structure elements hold graphics elements and other container elements as child elements, or provide

    meta-data for an element or scene. Refer to the SVG 1.2 specification athttp://www.w3.org/TR/SVGMobile12/for

    more information.

    This element is a container element for referenced elements. The content model for is the

    same as that for the . Elements contained by the element are not rendered directly.

    Document structure elements

    Link elements

    Plazmic extension elements

    Example

    Element details

    Valid parents

    Valid children

    Required attributes

    Optional attributes id

    http://-/?-http://-/?-http://appendix_markup.pdf/
  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    22/108

    22

    SVG for BlackBerry Smartphones Version 4.6 Reference Guide

    This element provides a descriptive, text-only string that describes a container or graphics element

    in SVG. It is useful for copyright information. The first element is used in the scene

    information.

    This element translates, shows, and hides groups of elements. These grouped elements can also be

    used individually. If several drawing elements have similar attributes, they can be collected using

    the element.

    Example Defines a hotspot that links to www.blackberry.com.

    Limitations If you specify more than one element, only the first element is

    used. All others are ignored.

    If you are producing content for BlackBerry devices running BlackBerry Device

    Software Version 4.0 or earlier (and therefore converting your SVG to PME

    Version 0.2), the text string must not exceed 256 characters. The SVG

    Transcoding Utility truncates any descriptions which exceed this length and

    continues transcoding.

    There are no length restrictions when converting to PME Version 1.2.

    Element detailsValid parents

    Valid children

    Required attributes

    Optional attributes id xml:space

    Example

    Limitation If you specify more than one element, only the first element is used.

    All others are ignored.

    http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-
  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    23/108

    23

    2: Defining the document structure

    This element defines the view port and contains an entire scene. The root, or outermost,

    element defines the height, width, and background color of the canvas. Each nested element

    defines a separate viewport.

    Hint To animate the x and y positions of the entire group, use the

    element. See "" on page 69 for more information.

    Element details

    Valid parents

    Valid children

    Required attributes

    Optional attributes displayfill

    fill-opacity

    font-family

    font-size

    font-style

    font-weightid

    image-rendering

    opacity

    shape-rendering

    stroke

    stroke-linecap

    stroke-linejoin

    stroke-opacitystroke-width

    text-decoration

    text-rendering

    transform

    visibility

    xlink:href

    xml:space

    Example Rectangles

    Notes The following attributes are supported for the outermost element only.

    The SVG Transcoding Utility will ignore these attributes if they are used with a

    nested element.

    background-fill height

    xmlns[:prefix]

    zoomAndPan

    The x and y attributes are only supported for embedded elements. They

    have no meaning for or effect on the outermost element.

    S G f l k S h i 6 R f G id

    http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-
  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    24/108

    24

    SVG for BlackBerry Smartphones Version 4.6 Reference Guide

    This element specifies a title for each container or graphic element. The element is a

    descriptive, text-only string. Titles are not rendered as part of the graphic, but they are included in

    the scene information.

    Element details

    Valid parents

    Valid children

    Required attributes height width

    Optional attributes background-fillheight

    display

    fill

    fill-opacity

    font-family

    font-size

    font-style

    font-weight

    hotspot-wrap

    id

    image-rendering

    preserveAspectRatio

    shape-rendering

    stroke

    stroke-linecap

    stroke-linejoin

    stroke-opacity

    stroke-width

    text-decoration

    text-rendering

    viewBox

    x, y

    xmlns[:prefix]

    zoomAndPan

    Example Rectangle

    Limitations If you specify more than one title for an element, only the first element

    is used. Additional elements are ignored.

    If you are producing content for BlackBerry devices running BlackBerry Device

    Software Version 4.0 or earlier (and therefore converting your SVG to PME

    Version 0.2), the text string in the element cannot exceed 16

    characters. Additional characters are ignored.

    There are no length restrictions when converting to PME Version 1.2.

    2: Defining the doc ment st ct e

    http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-
  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    25/108

    25

    2: Defining the document structure

    Document structure definition attributesThe following attributes define the view port. The view port is the area through which the SVG document is

    presented.

    background-fillSpecifies the paint used to fill the view port.

    Element details

    Valid parents

    Valid children

    Required attributes

    Optional attributes id xml:space

    Valid values Description

    paint_value Specifies the color used to paint the interior of the object. Can be one of:

    none: indicates that no paint is applied

    Any valid color: A valid color can be specified using:

    an RGB value ("250,239,111")

    Hexidecimal notation ("#770aff" or "#70f" (equal to "#7700ff"))

    a valid textual color name ("lightgoldenrodyellow")

    For example:

    background-fill="#2203e4"

    Attribute details

    Default value none

    Inherited No

    Animatable Yes

    Valid parents (outermost svg element only)

    SVG for BlackBerry Smartphones Version 4 6 Reference Guide

    http://-/?-http://-/?-http://-/?-
  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    26/108

    26

    SVG for BlackBerry Smartphones Version 4.6 Reference Guide

    heightSpecifies the height of the SVG document, the height of the rectangular region into which a child

    or element is placed, or the height of a element or a element.

    preserveAspectRatioDefines the behavior when a nested scene or an image is rendered in a view port that is of a

    different size than the image dimensions. The value ofpreserveAspectRatio has two

    components: one which specifies how the scene or image is aligned within the view port, and one

    which specifies whether it is scaled or cropped to fit into the view port.

    If the preserveAspectRatio attribute is not specified at all, the image is stretched to fill the view

    port.

    Notes The heightattribute is required for the and elements. If this

    attribute is not specified for an element, the effect is as if a value of100%

    were specified.

    Specifying a negative value produces an error.

    When used with the element, the value of this attribute must be

    identical to the height attribute of the child element. In addition, youcannot animate height when used with .

    Valid values Description

    measure_value Specifies the height. This value can be any positive, non-zero, whole number.

    If this attribute is specified for an element, you can specify the value as a percentage of the

    height of the viewport. For example:

    height=50%

    Attribute details

    Default value 0

    Inherited No

    Animatable For and elements: No

    For and elements: Yes

    Valid parents

    Limitation The SVG Transcoding Utility does not support the use of this attribute with the

    element.

    2: Defining the document structure

  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    27/108

    27

    2: Defining the document structure

    viewBoxDefines a rectangular area within which an SVG scene is presented.

    If the rectangular area specified is a different size than the view port in which it is placed, the SVG

    contained within it is scaled to fill the entire view port.

    Valid values Description

    align_&_scale Indicates that any scaling required will be uniform. The two components of this value specify how

    the image is aligned and whether the image is scaled or cropped.The alignment component can have one of the following values:

    xMinYMin: aligns the viewbox to the top left corner of the view port

    xMinYMid: vertically centers the viewbox along the left edge of the view port

    xMinYMax: aligns the viewbox to the bottom left corner of the view port

    xMidYMin: horizontally centers the viewbox along the top edge of the view port

    xMidYMid: aligns the viewbox to the horizontal and vertical center of the view port

    xMidYMax: Horizontally centers the viewbox along the bottom edge of the view port

    XMaxYMin: aligns the viewbox to the top right corner of the view port XMaxYMid: vertically centers the viewbox along the right edge of the view port

    XMaxYMax: aligns the viewbox to the bottom right corner of the view port

    The scaling component is optional and can have one of the following values:

    meet: The image is uniformly scaled to fit into the view port, with no cropping; transparent

    padding is applied to fill out the rest of the view port. If no scaling component is specified, then

    meet is assumed.

    slice: The aspect ration is preserved; the content is cropped to fit into the view port. The

    cropped image will fill the entire view port such that no padding is necessary.

    For example, to preserve the aspect without clipping and with equal padding on either side of the

    image or scene, you could specify the following:

    preserveAspectRatio="xMidYMid meet"

    none Indicates that any scaling required will not be uniform. The image will be rendered such that it

    completely fills the view port.

    Attribute details

    Default value xMidYMid meet

    Inherited NoAnimatable Yes

    Valid parents

    Limitation Units or percentage values are not supported for this attribute.

    Hints If an SVG document is likely to be referenced as a component of another

    document, you should define the viewBox attribute on the outermost

    element so that the SVG content can be scaled to fit into an arbitrary view port.

    You can use thepreserveAspectRatio attribute to control whether the SVG

    content is uniformly scaled and/or cropped.

    SVG for BlackBerry Smartphones Version 4.6 Reference Guide

    http://-/?-http://-/?-http://-/?-
  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    28/108

    28

    y p

    widthSpecifies the height of the SVG document, the height of the rectangular region into which a child

    or element is placed, or the height of a element or a element.

    xmlns[:prefix]Identifies the namespace where the XML definitions of the elements and attributes used in your

    SVG document are located. Multiple namespaces can be identified. This attribute is a standard XML

    attribute.

    Valid values Description

    bounding_values Defines the coordinate system for the rest of the SVG document. The value must be a list of four

    floating-point values representing the x, y,width and height properties. For example:viewbox="0 0 1500 1000"

    Attribute details

    Default value

    Inherited No

    Animatable Yes

    Valid parents

    Notes The widthattribute is required for the and elements. If this

    attribute is not specified for an element, the effect is as if a value of100%

    were specified.

    Specifying a negative value produces an error.

    When used with the element, the value of this attribute must be

    identical to the width attribute of the child element. In addition, You

    cannot animate width when used with .

    Valid values Description

    measure_value Specifies the width of the object. This value can be any positive, whole number.

    If this attribute is specified for an element, you can specify the value as a percentage of theheight of the viewport. For example:

    width=50%

    Attribute details

    Default value 0

    Inherited No

    Animatable For and elements: No

    For and elements: YesValid parents

    2: Defining the document structure

  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    29/108

    29

    You must include one or more namespace references in your document.

    zoomAndPanSpecifies whether the browser can pan or magnify the content. This attribute is valid only for the

    outermost element.

    Valid values Description

    resource_name Identifies the URI reference at which the XML definitions for various components of the SVG

    document are declared. The prefix identifies a particular namespace.

    At minimum, you must include the following namespaces:

    xmlns="http://www.w3.org/2000/svg"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://www.w3.org/2000/svg http://www.plazmic.com/

    svg/schema/svg.xsd"

    The following table outlines possible namespace references, depending on the functionality your

    document requires.

    Feature set Namespace reference

    Hyperlinks xmlns:xlink="http://www.w3.org/1999/xlink"

    Plazmic extensions xmlns:pz="http://www.plazmic.com/plazmic_extents"

    XForms xmlns:xforms="http://www.w3.org/2002/xforms"

    Attribute details

    Default value

    Inherited NoAnimatable No

    Valid parents (outermost svg element only)

    Valid values Descriptionmagnify Specifies that the user agent will allow the user to magnify and/or pan across the content.

    disable Specifies that the user agent will not allow the user to magnify and/or pan across the content.

    Attribute details

    Default value magnify

    Inherited No

    Animatable No

    Valid parents

    SVG for BlackBerry Smartphones Version 4.6 Reference Guide

  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    30/108

    30

    Core attributes

    idThis attribute assigns a unique name to any SVG element. This unique name is used to identify an

    element for the purposes of referencing it from another element.

    xml:spaceThis attribute informs the SVG Transcoding Utility how whitespace in the SVG element is to be

    handled. This is a standard XML attribute.

    Valid values Description

    unique_name Uniquely identifies the element. This value may be any alphanumeric string up to 256 characters.

    Attribute details

    Default value Inherited No

    Animatable No

    Valid parents

    Valid values Description

    default Informs the SVG Transcoding Utility to handle whitespace as follows:

    All leading and trailing spaces are deleted.

    All new line characters are deleted.

    Adjacent whitespace characters are converted to a single space.

    preserve Informs the SVG Transcoding Utility to handle whitespace as follows:

    Every tab character is converted to a space.

    Every new line is converted to a space.

    All other whitespace characters are left intact.

    Attribute details

    Default value default

    Inherited No

    Animatable No

    2: Defining the document structure

  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    31/108

    31

    Link elements

    Specifies a hyperlink. This element is similar to the element in HTML.

    When selected, the hyperlink replaces the current browser content with the contents of the URL

    specified in the xlink:href attribute. For example, when the user selects a hyperlink, a new scene

    loads, or an action (such as sound) is performed.

    Valid parents

    Example

    Defines a hotspot that links to www.blackberry.com.

    Limitations To indicate that a link has focus, you must animate the focusin and focusout

    events.

    References to content outside of the .svg file must be to .pme files or must be

    translated to .pme file format when deployed. Otherwise, the reference must beto a named or element within the same scene.

    Hint During development, you can link to other .svg files in order to test the page(s).

    Prior to transcoding the SVG content, however, you must change those references

    to .pme files so that the links function properly on the BlackBerry device. Refer to

    the Plazmic Content Developers Kit User Guidefor more information.

    Element details

    Valid parents

    Valid children may contain any element its parent can contain, except itself

    Required attributes xlink:href

    Optional attributes displayfill

    fill-opacity

    font-family

    font-size

    font-stylefont-weight

    id

    image-rendering

    shape-rendering

    stroke

    stroke-linecap

    stroke-linejoinstroke-width

    text-decoration

    text-rendering

    transform

    visibility

    xml:space

    Attribute details

    SVG for BlackBerry Smartphones Version 4.6 Reference Guide

    http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-
  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    32/108

    32

    A custom Plazmic element that streams new content without requiring a user to select a hyperlink.

    Use the element to load a new scene after a specific amount of time or in response toan event, such as a completed animation.

    In addition to having the same functionality as the element, the element has the

    begin attribute. When the begin condition is met, the scene specified by the xlink:href attribute

    is loaded.

    Hyperlink attributes

    xlink:href

    Specifies the location of a referenced object. References can point to external files, such as .svg,.pme, audio, image, or font files, or they can reference internal definitions, such as a path to be used

    as the basis for a motion path.

    Example

    Limitation You can assign only one value to the begin attribute.Hint During development, you can link to other .svg files in order to test the page(s). Prior

    to transcoding the SVG content, however, you must change those references to .pme

    files so that the links function properly on the BlackBerry device. Refer to the

    Plazmic Content Developers Kit User Guidefor more information.

    Element details

    Valid parents

    Valid children

    Required attributes begin xlink:href

    Valid attributes id

    Valid values Description

    resource_URL Specifies a valid URL.

    If the external object you are linking to is an .svg file, the BlackBerry MDS Connection Service and

    BlackBerry Internet Service Browsing are designed to automatically transcode .svg files into .pme

    format before sending them on to the BlackBerry. However, to ensure the file can be rendered asintended, you should convert linked .svg files to .pme format whenever possible and reference the

    file as filename.pme.

    For example

    xlink:href="http://yourDir/yourFile.pme"

    Attribute details

    Default value

    Inherited No

    Animatable No

    2: Defining the document structure

    http://-/?-http://-/?-http://-/?-http://-/?-
  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    33/108

    33

    Plazmic extension elements

    A custom Plazmic element that extends the element with a currentChild attribute. Thevisibility setting enables you to display one of a number of drawing elements. Using

    , only a single child can be drawn at a time.

    Plazmic extension attributes

    currentChildA custom Plazmic attribute that specifies which child of a element is visible.

    Valid parents

    Example

    Element details

    Valid parents

    Valid children

    Valid attributes currentChild id

    Valid values Description

    child_element Specifies the idattribute of an existing child of the element.

    Attribute details

    Default value

    Inherited Yes

    Animatable Yes

    Valid parents

    Attribute details

    SVG for BlackBerry Smartphones Version 4.6 Reference Guide

    http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-
  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    34/108

    34

    hotspot-wrapA custom Plazmic attribute that provides a hint to the user agent when a user scrolls past the last

    hotspot in an SVG document. The user agent may wrap focus from the last hotspot to the first (orfrom the first to the last, when scrolling backwards), or it can stop at the first and last hotspot.

    Notes This attribute is a hint, and can be ignored by the user agent. The user agent

    might ignore this attribute if the content is part of a larger document, such as an

    .html file, and it needs to allow focus to leave the SVG scene.

    This attribute can only be applied to the outermost element.

    Valid values Description

    true Indicates that the user agent should wrap the focus when the user scrolls past the first or last

    hotspot.

    false Indicates that the user agent should not wrap focus.

    Attribute details

    Default value true

    Inherited No

    Animatable No

    Valid parents (outermost svg element only)

    3

  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    35/108

    3

    Adding graphic elements

    Basic shape elements

    Defines a circle based on a center point and a radius.

    Basic shape elements

    Text elements

    Path elements

    Image elements

    Pattern elementsAttributes for graphic elements

    Example

    Element details

    Valid parents

    Valid children

    Required attributes r

    Optional attributes cx,cydisplay

    fill

    fill-opacity

    idimage-rendering

    opacity

    shape-rendering

    stroke

    stroke-linecap

    stroke-linejoinstroke-opacity

    stroke-width

    text-rendering

    transform

    visibility

    xml:space

    SVG for BlackBerry Smartphones Version 4.6 Reference Guide

    http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-
  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    36/108

    36

    Defines an ellipse that is axis-aligned with the current user co-ordinate system based on a center

    point and two radii. A co-ordinate system defines locations and distances on the current canvas. Thecurrent user co-ordinate system is the co-ordinate system that is currently active, and it defines how

    co-ordinates and lengths are located and computed, respectively, on the current canvas.

    Defines a line segment that starts at one point and ends at another.

    Example

    Element details

    Valid parents

    Valid children

    Required attributes rx,ry

    Valid attributes cx,cy

    display

    fill

    fill-opacity

    id

    image-rendering

    opacity

    shape-rendering

    stroke

    stroke-linecap

    stroke-linejoin

    stroke-opacity

    stroke-width

    text-rendering

    transform

    visibility

    Example

    Element details

    Valid parents

    Valid children

    Required attributes x1,y1 x2,y2

    Valid attributes displayfill

    fill-opacity

    id

    image-rendering

    opacity

    shape-rendering

    stroke

    stroke-linecap

    stroke-linejoin

    stroke-width

    text-rendering

    transform

    visibility

    xml:space

    3: Adding graphic elements

    http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-
  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    37/108

    37

    Defines a series of straight lines that form a closed shape. Vector primitives usually have a smaller

    file size than an image. However, a primitive with many points can become a large file.

    Space efficiency is important when building polygons for deployment on constrained wireless

    devices. If the .pme file becomes too large to load on the device, try to represent the same object in

    different ways. Complex shapes might work better as images, or perhaps may be approximated by

    several simpler shapes.

    Defines a series of lines that usually form an open shape.

    Example Limitation You cannot animate specific polygon points. You must redraw the whole polygon. To

    animate two points of a polygon, create the required number of separate polygons

    and cycle through them. This is a limitation of the SVG specification.

    Hint To minimize file size, substitute polygons with the element.

    Element details

    Valid parents

    Valid children

    Required attributes points

    Valid attributes displayfill

    fill-opacity

    id

    image-rendering

    opacity

    shape-rendering

    stroke

    stroke-linecap

    stroke-linejoin

    stroke-width

    text-rendering

    transform

    visibility

    Example

    Limitation Only one polyline is allowed per element. See the element for more

    information.

    Element details

    Valid parents

    Valid children

    Required attributespoints

    SVG for BlackBerry Smartphones Version 4.6 Reference Guide

    http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-
  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    38/108

    38

    Defines a rectangle.

    Shape attributescx

    cx, cycy

    Specifies the x- and y-axis co-ordinates of the object center.

    Valid attributes displayfill

    fill-opacity

    id

    image-rendering

    opacity

    shape-rendering

    stroke

    stroke-linecap

    stroke-linejoin

    stroke-width

    text-rendering

    transform

    visibility

    Example Limitation You cannot animate height and width ifrx and ry are specified.

    Element details

    Valid parents

    Valid children

    Required attributes height width

    Valid attributes displayfill

    fill-opacity

    id

    image-rendering

    opacity

    rx,ryshape-rendering

    stroke

    stroke-linecap

    stroke-linejoin

    stroke-opacity

    stroke-width

    text-rendering

    transform

    visibility

    x,y

    Valid values Description

    co-ordinate Specifies the x/y co-ordinate of the center of the circle or ellipse object.

    Attribute details

    Default value 0

    Inherited No

    Animatable Yes

    Valid parents

    Element details

    3: Adding graphic elements

    http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-
  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    39/108

    39

    dx

    heightSpecifies the height of the SVG document, the height of the rectangular region into which a child

    or element is placed, or the height of a element or a element.

    pointsA list of points that make up a polygon or polyline. All co-ordinate values are in the local co-ordinate

    system. This is a required attribute for the and elements.

    Notes The heightattribute is required for the and elements. If this

    attribute is not specified for an element, the effect is as if a value of100%

    were specified.

    Specifying a negative value produces an error.

    When used with the element, the value of this attribute must be

    identical to the height attribute of the child element. In addition, you

    cannot animate height when used with .

    Valid values Description

    measure_value Specifies the height. This value can be any positive, non-zero, whole number.

    If this attribute is specified for an element, you can specify the value as a percentage of the

    height of the viewport. For example:

    height=50%

    Attribute details

    Default value 0

    Inherited No

    Animatable For and elements: No

    For and elements: Yes

    Valid parents

    Valid values Description

    co-ordinate_list Specifies a list of x and y coordinates. You must format the list as follows:

    x0,y0 x1,y1, x2,y2 ... xn,yn

    For example,

    points="50,10 30,30 30,60 70,60 70,30"

    Attribute details

    Default value

    Inherited No

    Animatable No

    Valid parents

    SVG for BlackBerry Smartphones Version 4.6 Reference Guide

  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    40/108

    40

    rSpecifies the radius of a circle. This is a required attribute for the element.

    rx

    rx, ryry

    Specify the length of the x- and y-axis radii of an ellipse or a rounded rectangle. This is a required

    attribute of the element.

    Valid values Description

    radius_length Specifies the radius of the circle.

    This value must be a positive integer. Specifying a negative value produces an error. A value of "0"

    disables rendering of the element.

    Attribute details

    Default value

    Inherited No

    Animatable Yes

    Valid parents

    Notes Specifying a negative value produces an error.

    If only a value for rx or ry is specified, then the element is processed with the

    same value for ry and rx.

    If neither is specified for a rectangle, or they have a value of"0", then square

    corners appear on the object.

    Ifrx is greater than half of the width of the rectangle, then the element is

    processed with the value for rx as half of the width of the rectangle.

    Valid values Description

    radius_length Specifies the x or y radius length of the ellipse or rounded rectangle.

    This value must be a positive integer. Specifying a negative value produces an error. A value of"0"

    disables rendering of the element.

    Attribute details

    Default value 1Inherited Yes

    Animatable When used with. You cannot animate this attribute when used with .

    Valid parents

    3: Adding graphic elements

  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    41/108

    41

    widthSpecifies the height of the SVG document, the height of the rectangular region into which a child

    or element is placed, or the height of a element or a element.

    x

    x, yy

    Specify the x- and y-axis co-ordinates. If no value is specified, a value of"0" is assumed.

    Notes The widthattribute is required for the and elements. If this

    attribute is not specified for an element, the effect is as if a value of100%

    were specified.

    Specifying a negative value produces an error.

    When used with the element, the value of this attribute must be

    identical to the width attribute of the child element. In addition, You

    cannot animate width when used with .

    Valid values Description

    measure_value Specifies the width of the object. This value can be any positive, whole number.

    If this attribute is specified for an element, you can specify the value as a percentage of the

    height of the viewport. For example:

    width=50%

    Attribute details

    Default value 0

    Inherited No

    Animatable For and elements: No

    For and elements: Yes

    Valid parents

    Valid values Description

    co-ordinate Specifies the x or y co-ordinate of the side of the parent element which has the smaller

    x-axis or y-axis coordinate value in the current user co-ordinate system. Typically, this is the

    position of the upper left corner of the object. For example, the following values:

    would place the upper left corner of the defined rectangle in the upper left corner of the view port

    in most user co-ordinate systems.

    Attribute details

    Default value 0

    Inherited Yes

    Animatable Yes

    Valid parents

    SVG for BlackBerry Smartphones Version 4.6 Reference Guide

  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    42/108

    42

    x1

    x1, y1y1

    Specify the starting point of a line. These are required attributes of the element

    x2

    x2, y2y2

    Specify the endpoint of a line. These are required attributes of the element

    Text elements

    Defines a graphics element that consists of text. The XML character data within the

    elementalong with relevant attributes and propertiesdefine the glyphs that are rendered. For

    more information, visit the SVG 1.2 specification athttp://www.w3.org/TR/SVGMobile12/.

    Each element renders a single string of text. SVG does not automatically break lines or wrap

    words. To create multiple lines of text, use the element for each line of text. Text stringswithin elements will be rendered in a straight line.

    The location of the anchor point for a element differs from most other elements. For

    elements, the anchor point is the baseline of the font to the left of the character. This location

    resides on the line where text would be written. The anchor point separates the ascending and

    descending parts of the font.

    Valid values Description

    co-ordinate Specifies the x/y co-ordinate of the starting point of the line.

    Attribute details

    Default value 0

    Inherited Yes

    Animatable No

    Valid parents

    Valid values Description

    co-ordinate Specifies the x/y co-ordinate of the starting point of the line.

    Attribute details

    Default value 0

    Inherited Yes

    Animatable No

    Valid parents

    3: Adding graphic elements

  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    43/108

    43

    Since elements are rendered using the same rendering methods as other graphics elements,

    the same co-ordinate system transformations that apply to shapes, such as and ,

    also apply to

    elements.

    Specifies a block of text and graphics to be rendered with line wrapping. It sets the font size and the

    scrolling rules.

    Example This is an example of text in SVG.

    Limitation If a font used in a scene is not in the character set for the BlackBerry device, the

    result might be an unexpected character (or no character at all). For correct

    representation, you can create an image of the text that should appear.

    Hint To define a text area in which text is wrapped and is scrollable, use the

    element.

    Element details

    Valid parents

    Valid children

    Required attributes Optional attributes display

    dx, dy

    fill

    fill-opacity

    font-family

    font-size

    font-style

    font-weight

    id

    stroke-opacity

    text-decoration

    text-rendering

    transform

    visibility

    x, y

    xml:space

    Example

    Here is an example of the text area. If too much text is typedto fit into the designated area, a scroll barwill be added to facilitate scrolling.

    Hint The SVG transcoding Utility supports the overflow attribute, which is part of the

    SVG-Full specification, but not part of SVG-Tiny. The overflow attribute enables

    you to specify whether a scroll bar is created if the contained text overflows the

    specified text flow area.

    Element details

    Valid parents

    Valid children

    SVG for BlackBerry Smartphones Version 4.6 Reference Guide

    http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-
  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    44/108

    44

    Within a element, the element enables you to adjust the text and font properties

    and the current text position with absolute or relative coordinate values.

    Required attributes height width

    Valid attributes editableidoverflowx,y

    Example

    This is an example of red text inSVG.

    Limitations If a font used in a scene is not in the character set for the BlackBerry device, the

    result might be an unexpected character (or no character at all). For correct

    representation, you can create an image of the text that should appear.

    The SVG Transcoding Utility only allows a single set ofx, y and dx, dy

    coordinates. The SVG specification allows a list ofx, y and dx, dy coordinates.

    The SVG Transcoding Utility does not permit any nested elements within a element.

    Element details

    Valid parents

    Valid children

    Required attributes

    Valid attributes displaydx, dy

    fill

    fill-opacity

    font-family

    font-size

    font-style

    font-weight

    id

    stroke-opacity

    text-decoration

    text-rendering

    visibility

    x,yxml:space

    Element details

    3: Adding graphic elements

    http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-
  • 8/2/2019 Plugin-Plazmic Content Developer%27s Kit-SVG-Reference Guide

    45/108

    45

    Text attributesdx

    dx, dydy

    Specifies the distance along the x- or y-axis that the text is shifted before the first character is

    rendered.

    editableSpecifies whether the contents of the element can be edited by the user.

    font-familySpecifies a prioritized list of font faces or generic font families to render the text.

    Limitation The SVG 1.2 specification allows a list of values for the dx and dy attributes. The SVG

    Transcoding Utility only supports a single value.

    Valid values Description

    co-ordinate Specifies the distance that the text is shifted in user units. This value must be a positive integer.

    Attribute details

    Default value 0

    Inherited No

    Animatable No

    Valid parents

    Valid values Description

    true Indicates that the text area is editable.

    false Indicates that the text area is not editable.

    Attribute details

    Default value false

    Inherited No

    Animatable No

    Valid parents

    Valid values Description

    font_name Specifies a specific font family name, such as"arial" or "Times New Roman". Font names must

    be enclosed in quotation