Gnash  0.8.11dev
Render handler introduction

Information for writing new render handlers.

The most important thing about drawing Flash shapes is to understand how their fill styles work. A single Flash character can contain any number shapes that use any number of different fill styles and line styles. The shapes of a character are defined by a number of "paths". Some important things about paths:

+--------------------------------+
|XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX|
|XXX+------------------------+XXX|
|XXX| |XXX|
|XXX+------------------------+XXX|
|XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX|
+--------------------------------+
+-------A-------+-------B--------+
|...............|################|
A...............C################B
|...............|################|
+-------A-------+-------B--------+
   Flash will probably produce three paths (A,B,C) and two fill styles.
   Paths "A" and "B" will have just one fill style (fillstyle1 will be 
   zero) while path "C" (which contains only one straight line!!) will
   have two fill styles. To be exact the horizontal edges would not even
   be necessary to render this shape (for a scanline based renderer) but 
   they are necessary then the character is about to be rotated.

Now, these are simple examples but complex graphics can be compressed very efficiently this way. Also, this method was most probably intended for a renderer engine that can produce the final character in just one pass (like the AGG backend does too).