OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

cgmo-webcgm message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Drawing model

• From: Benoit Bezaire <benoit@itedo.com>
• To: CGM Open WebCGM TC <cgmo-webcgm@lists.oasis-open.org>
• Date: Wed, 19 Apr 2006 09:43:13 -0400

```Here is an attempt to address the Drawing model comment: "Color space
for compositing not described, is alpha linear or not (maybe described
later?) What is the influence of grnode on compositing - grouping
complexifies compositing, neds to be carefully described."

This could be a replacement or in addition to 2.2.2 Drawing model.

Thoughts?

---

Implementations of WebCGM are expected to behave as though they
implement a drawing model corresponding to the one described below. A
real implementation is not required to implement the model in this
way, but the result on any device supported by the implementation
shall match that described by this model.

WebCGM uses a painters model of rendering. Colors are applied in
successive operations to the output device. When an area overlaps a
previously colored area the new color partially or completely obscures
the old. When the color is not completely opaque the result on the
output device is defined by the following (mathematical) rules for
compositing:

Pr, Pg, Pb    - Primitive color value
Pa            - Primitive alpha value
Cr, Cg, Cb    - Canvas color value (before blending)
Ca            - Canvas alpha value (before blending)
Cr', Cg', Cb' - Canvas color value (after blending)
Ca'           - Canvas alpha value (after blending)
Ca' = 1 - (1 - Pa) * (1 - Ca)
Cr' = (1 - Pa) * Cr + Pr
Cg' = (1 - Pa) * Cg + Pg
Cb' = (1 - Pa) * Cb + Pb

Alpha compositing is performed in the current COLOUR MODEL (see T.16.19).

Primitives in a WebCGM document have an implicit drawing order, with the
first primitives in the WebCGM document getting drawn first.
Subsequent primitives are drawn on top of previously drawn primitives.

Primitives which have a value for Escape 45 other than fully opaque,
have the effect of producing a temporary separate canvas initialized
to transparent black onto which the primitives are drawn. The canvas
is then composited into the background, taking into account the Escape
45 value. The presence of APS in the primitive list has no effect on
the rendering. No temporary canvas are created. It is identical to the
case of no APS.

--
Benoit   mailto:benoit@itedo.com

This e-mail and any attachments are confidential and may be protected
by legal privilege. If you are not the intended recipient, be aware
that any disclosure, copying, distribution or use of this e-mail or
any attachment is prohibited. If you have received this e-mail in
error, please notify us immediately by returning it to the sender and