stylable cgm
Download
Skip this Video
Download Presentation
Stylable CGM

Loading in 2 Seconds...

play fullscreen
1 / 33

Stylable CGM - PowerPoint PPT Presentation


  • 134 Views
  • Uploaded on

Stylable CGM. Dave Cruikshank The Boeing Company Lofton Henderson Henderson Consulting. CGM Version 4. The CGM standard (ISO 8632:1999) CGM V4 - Application Structuring Syntax to define application structures (APS) as graphical groups Syntax to associate attributes to APS

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Stylable CGM' - mai


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
stylable cgm

Stylable CGM

Dave Cruikshank

The Boeing Company

Lofton Henderson

Henderson Consulting

Stylable CGM

XML Europe 2003, London

cgm version 4
CGM Version 4
  • The CGM standard (ISO 8632:1999)
    • CGM V4 - Application Structuring
      • Syntax to define application structures (APS) as graphical groups
      • Syntax to associate attributes to APS
      • Definition of Semantics accomplished through profiles

Stylable CGM

XML Europe 2003, London

webcgm functionality
WebCGM Functionality
  • WebCGM developed by CGM Open in collaboration with W3C graphics experts
  • WebCGM profile approved by W3C – 1999
  • WebCGM Release 2 published - 2001

Stylable CGM

XML Europe 2003, London

webcgm functionality4
WebCGM Functionality
  • Requirements
    • Navigation
      • Graphical object to graphical object within a CGM file
      • Graphical object to graphical object in another CGM file
      • Graphical object to a text objet
    • Query
      • Search for a graphical object based on an attribute
    • Data extraction
      • Retrieve non-graphical metadata from a graphical object

Stylable CGM

XML Europe 2003, London

webcgm functionality5
WebCGM Functionality
  • Graphical Format Capabilities
    • Structuring -- hierarchical object tagging
    • Non-graphical properties
    • Object id/naming
  • IG requirements
    • Navigation
    • Query
    • Extraction

CGM

Capability

Begin APS

...

APS Attribute

...

Begin APS Body

...graphics to draw object...

...and/or, nested ApS...

End Application Structure

Stylable CGM

XML Europe 2003, London

webcgm functionality6
WebCGM Functionality
  • Semantics
  • APS Attributes:
  • Region
  • LinkURI
  • ViewContext
  • LayerName
  • LayerDescription
  • ScreenTip
  • Name
  • Content
  • 4 APS types:
  • grobject
  • layer
  • para
  • subpara

Stylable CGM

XML Europe 2003, London

webcgm structure
WebCGM Structure

Picture body

layer

grobject

para

grobject

para

grobject

subpara

grobject

para

subpara

subpara

Stylable CGM

XML Europe 2003, London

motivation for stylability
Motivation for Stylability
  • Interoperability among vendors demonstrated several times
  • Proprietary DOM implementations being developed for external browser control

Stylable CGM

XML Europe 2003, London

approach
Approach
  • CGM has inherent style, but…
    • WebCGM profile says:
      • ‘While WebCGM is a binary file format and is not “stylable”, nevertheless WebCGM follows published W3C requirements for scalable graphics format where such are applicable’
    • CSS2 says:
      • ‘CSS can be used with any structured document format …’
    • WebCGM is a structured document format

Stylable CGM

XML Europe 2003, London

approach10
Approach
  • Application of CSS2 to WebCGM much the way CSS1 was applied to legacy HTML
  • Use of attribute selectors for specifying a style scheme to WebCGM

Stylable CGM

XML Europe 2003, London

requirements
Requirements
  • Scope
    • Granularity of application
      • Picture
      • APS
    • Control of individual graphical primitives out of scope

Stylable CGM

XML Europe 2003, London

requirements color
Requirements - color
  • Functions
    • PictureScopeLineColor - RBG or relative scale
    • PictureScopeEdgeColor - RBG or relative scale
    • PictureScopeFillColor - RBG or relative scale
    • PictureScopeMarkerColor - RBG or relative scale
    • APSScopeLineColor - RBG or relative scale
    • APSScopeEdgeColor - RBG or relative scale
    • APSFillColor - RBG or relative scale
    • APSScopeMarkerColor - RBG or relative scale
    • PictureScopeRasterIntensity – relative scale
    • APSScopeRasterIntensity - relative scale

Stylable CGM

XML Europe 2003, London

requirements color13
HEADREST

SHOULDER STRAPS

A

LUMBAR SUPPORT

ARMREST

ADJUSTMENT

PAD

WAIST STRAPS

ARMREST

FLIGHT CREW

SEAT

QUICK RELEASE

BUCKLE

CROTCH BELT

B

SAFETY

VEST

TOP

(BELOW THE SEAT)

MID

BOTTOM

UP/DOWN LEVER

INBD/OUTBD LEVER

INERTIA

A

REALS

Requirements - color

Stylable CGM

XML Europe 2003, London

requirements color14
HEADREST

SHOULDER STRAPS

A

B

LUMBAR SUPPORT

ARMREST

ADJUSTMENT

PAD

WAIST STRAPS

INERTIA

A

REALS

ARMREST

FLIGHT CREW

SEAT

QUICK RELEASE

BUCKLE

CROTCH BELT

SAFETY

VEST

TOP

(BELOW THE SEAT)

MID

BOTTOM

UP/DOWN LEVER

INBD/OUTBD LEVER

Requirements - color

Stylable CGM

XML Europe 2003, London

requirements line edge weight
Requirements – line/edge weight
  • Functions
    • PictureScopeLineWeight – absolute mm or relative scale
    • PictureScopeEdgeWeight – absolute mm or relative scale
    • APSScopeLineWeight – absolute mm or relative scale
    • APSScopeEdgeWeight – absolute mm or relative scale

Stylable CGM

XML Europe 2003, London

requirements line edge weight16
HEADREST

SHOULDER STRAPS

A

LUMBAR SUPPORT

ARMREST

ADJUSTMENT

PAD

WAIST STRAPS

ARMREST

FLIGHT CREW

SEAT

QUICK RELEASE

BUCKLE

CROTCH BELT

B

SAFETY

VEST

TOP

(BELOW THE SEAT)

MID

BOTTOM

UP/DOWN LEVER

INBD/OUTBD LEVER

INERTIA

A

REALS

Requirements – line/edge weight

Stylable CGM

XML Europe 2003, London

requirements line edge weight17
HEADREST

SHOULDER STRAPS

A

LUMBAR SUPPORT

B

ARMREST

ADJUSTMENT

PAD

WAIST STRAPS

INERTIA

A

REALS

ARMREST

FLIGHT CREW

SEAT

QUICK RELEASE

BUCKLE

CROTCH BELT

SAFETY

VEST

TOP

(BELOW THE SEAT)

MID

BOTTOM

UP/DOWN LEVER

INBD/OUTBD LEVER

Requirements – line/edge weight

Stylable CGM

XML Europe 2003, London

requirements character height
Requirements – character height
  • Functions
    • PictureScopeCharacterHeight – absolute mm or relative scale
    • APSScopeCharacterHeight – absolute mm or relative scale

Stylable CGM

XML Europe 2003, London

requirements character height19
HEADREST

SHOULDER STRAPS

A

LUMBAR SUPPORT

ARMREST

ADJUSTMENT

PAD

WAIST STRAPS

ARMREST

FLIGHT CREW

SEAT

QUICK RELEASE

BUCKLE

CROTCH BELT

B

SAFETY

VEST

TOP

(BELOW THE SEAT)

MID

BOTTOM

UP/DOWN LEVER

INBD/OUTBD LEVER

INERTIA

A

REALS

Requirements – character height

Stylable CGM

XML Europe 2003, London

requirements character height20
HEADREST

SHOULDER STRAPS

A

B

LUMBAR SUPPORT

ARMREST

ADJUSTMENT

PAD

WAIST STRAPS

INERTIA

A

REALS

ARMREST

FLIGHT CREW

SEAT

QUICK RELEASE

BUCKLE

CROTCH BELT

SAFETY

VEST

TOP

(BELOW THE SEAT)

MID

BOTTOM

UP/DOWN LEVER

INBD/OUTBD LEVER

Requirements – character height

Stylable CGM

XML Europe 2003, London

requirements21
Requirements
  • Caveats
    • Applying style using CSS2 deviates from the actual CGM attribute model
      • Character height scaling does not exist
      • Line weight scaling behaves differently
    • “Undoing” style requires special handling
      • Remembering attributes of various primitives, or
      • Re-interpreting a picture or APS

Stylable CGM

XML Europe 2003, London

issues resolution
Issues/Resolution
  • Binary/clear text
    • CGM is binary format
    • Style sheet should be ASCII text
      • APSScopelinecolor grobject#xyz {color: red} – turn the lines in grobject with an apsid of xyz to red
    • CGM Structured Data Record (SDR)
      • An issue for the WebCGM DOM when we deal with multiple fields for attribute values of APS attributes

Stylable CGM

XML Europe 2003, London

issues resolution23
Issues/Resolution
  • WebCGM tree model
    • Pictures contain:
      • APS elements (nested) contain:
        • Graphical primitives (leaf nodes)
    • Nodes at the APS level
      • | | |
      • Simplest with a tree with four kinds of element nodes

Stylable CGM

XML Europe 2003, London

issues resolution24
Issues/Resolution
  • Alignment with CSS
    • Possible to align element names with SVG
      • CSS style sheet parsing might be reusable
      • But not much else
    • Appropriate solution
      • Borrow principles from CSS, including matching mechanisms
      • Customize solution for WebCGM DOM requirements

Stylable CGM

XML Europe 2003, London

issues resolution25
Issues/Resolution
  • CSS selectors
    • Minimal selector pattern matching set

* – matches any element (universal selector)

grobject – matches any grobject APS (type selector)

grobject#xyz – matches any grobject APS with an apsid of xyz

    • Attribute selectors

grobject[name] – matches any grobject APS whose “name” attribute is set

grobject[name=“bolt”] – matches any grobject APS whose “name” attribute is set to “bolt”

Stylable CGM

XML Europe 2003, London

issues resolution26
Issues/Resolution
  • WebCGM element names
    • For styling solution
      • Elements selectors
        • picture layer
        • grobject para
        • subpara
      • Attrubute selectors
        • Linkuri name
        • screentip viewcontext
        • region content
        • layerdescription layername

Stylable CGM

XML Europe 2003, London

issues resolution27
Issues/Resolution
  • Style rules declaration
    • Attribute types deviate
      • LineColour is a CGM attribute applying to individual line primitives
      • PictureScopeLineColor would apply to all lines in a picture
    • Attribute values deviate
      • LineColour specified in WebCGM as an index into a color table, or an RGB n-tuple, or an sRGB n-tuple
      • PictureScopeLinecolor would have an RGB n-tuple, or a relative scale
    • Align with CSS data types (RBG, scale, mm)

Stylable CGM

XML Europe 2003, London

issues resolution28
Issues/Resolution
  • CSS inheritance model
    • Styling attributes should inherit
      • Nested APS are affected by styling

Stylable CGM

XML Europe 2003, London

issues resolution29
Issues/Resolution
  • Cascading precedence
    • Opposite of CSS
      • User agent supplied style overrides author style
  • Specificity
    • CSS rules apply
      • In clashes, most specific rules

Stylable CGM

XML Europe 2003, London

issues resolution30
Issues/Resolution
  • Processing model
    • Open questions
      • How are styling rules communicated to the viewer?
      • Is there some sort of rule-by-rule interface?
      • Or, so you have to pass an entire style sheet at a time?
      • How do you turn off a style sheet after it has been applied and return to author rules? (unapply rules)
      • How the the styling interface relate to the DOM? (DOM will ‘get’ and ‘set’ all APSattr parameters)

Stylable CGM

XML Europe 2003, London

conclusions
Conclusions
  • Preliminary design completed
  • ACSII text style sheet
  • Align with principles from CSS
  • Use a subset of CSS selectors
  • Use CGM clear text APS types and attributes
  • Apply CSS inheritance model
  • Override CSS cascading
  • Apply CSS specificity

Stylable CGM

XML Europe 2003, London

next steps
Next Steps
  • Define processing model
  • WebCGM DOM
    • Adopt “appropriate” DOM Core elements (level 1)
    • Adopt “appropriate” DOM Event elements (levels 2 & 3)
    • Integrate CSS solution

Stylable CGM

XML Europe 2003, London

slide33
?

Stylable CGM

XML Europe 2003, London