TITLE:Chapter 6: Shapes

#contents

* Shapes [#Shaped]
- The SWF shape architecture is designed to be compact, flexible and rendered very quickly to the screen.
- It is similar to most vector formats in that shapes are defined by a list of edges called a path.
- A path may be closed, where the start and end of the path meet to close the figure, or open, where the path forms an open-ended stroke.
- A path may contain a mixture of straight edges, curved edges, and ‘pen up and move’ commands.
- The latter allows multiple disconnected figures to be described by a single shape structure.
- A fill style defines the appearance of an area enclosed by a path.
- Fill styles supported by the SWF file format include a color, a gradient, or a bitmap image.
- A line style defines the appearance of the outline of a path.
- The line style may be a stroke of any thickness and color.
- Most vector formats allow only one fill and line style per path.
- The SWF file format extends this concept by allowing each edge to have its own line and fill style.
- This can have unpredictable results when fill styles change in the middle of a path.
- The Adobe Flash authoring tool also supports two fill styles per edge, one for each side of the edge:
-- FillStyle0 and FillStyle1. FillStyle0 should always be used first and then FillStyle1 if the shape is filled on both sides of the edge.

** Shape overview [#Shape_overview]
- shape は以下の要素で構成される。
-  CharacterId
--  A 16-bit value that uniquely identifies this shape as a ‘character’ in the dictionary.
-- The CharacterId can be referred to in control tags such as PlaceObject.
-- Characters can be reused and combined with other characters to make more complex shapes.
- Bounding box
--  The rectangle that completely encloses the shape.
- Fill style array
--  A list of all the fill styles used in a shape.
- Line style array
--  A list of all the line styles used in a shape.
- Shape record array
--  A list of shape records. Shape records can define straight or curved edges, style changes, or move the drawing position.
- NOTE
--  Line and fill styles are defined only once and may be used (and reused) by any of the edges in the shape.

** Shape example [#Shape_example]
** Shape structures [#Shape_structures]
*** Fill styles [#Fill_styles]
*** Line styles [#Line_styles]
*** Shape structures [#Shape_structures]
*** Shape records [#Shape_records]
*** Edge records [#Edge_records]
*** Shape tags [#Shape_tags]

Reload   Diff   Front page List of pages Search Recent changes Backup Referer   Help   RSS of recent changes