C# (CSharp) Recurity.Swf Namespace

Nested Namespaces

Recurity.Swf.AVM1
Recurity.Swf.AVM1Modifier
Recurity.Swf.AVM2
Recurity.Swf.Configuration
Recurity.Swf.Filter
Recurity.Swf.Flowgraph
Recurity.Swf.Helper
Recurity.Swf.TagHandler

Classes

Name Description
AbstractSwfElement Class that represents an element that can appear in Swf files or the Swf files themselves implementing the ISwfElement
AdpcmMonoPacket
AdpcmPacket
AdpcmSoundData
AdpcmStereoPacket
AlphaBitmapData

A list of ARGB records. ARGB is the same as RGBA but the first byte is the alpha channel

AlphaColorMapData

The ALPHACOLORMAPDATA extends COLORMAPDATA by using RGBA

insteadf of RGB for the image data.

Argb The ARGB record behaves exactly like the RGBA record, but the alpha value for the ARGB record is in the first byte.
BaseFile An abstract class template for Swf files
BinaryReader2
BitStream
BitmapData

The BITMAPDATA structure contains image data. This

structure is compressed as a single block of data.

BitmapMatrix
ButtonCondAction
ButtonRecord
ButtonRecord2
ClipActionRecord
ClipActions
ClipEventFlags
ColorMapData

The COLORMAPDATA structure contains image data. This

structure is compressed as a single block of data.

Row widths in the pixel data fields of these structures

must be rounded up to the next 32-bit word boundary.

For example, an 8-bit image that is 253 pixels wide must be

padded out to 256 bytes per line. To determine the appropriate

padding, make sure to take into account the actual size of

the individual pixel structures; 15-bit pixels occupy 2

bytes and 24-bit pixels occupy 4 bytes (see PIX15 and PIX24).

CompressedEventArgs Provides data for the Compressed events.
CurvedEdgeRecord The Swf file format differs from most vector file formats by using Quadratic Bezier curves rather than Cubic Bezier curves. PostScript™ uses Cubic Bezier curves, as do most drawing applications.The Swf file format uses Quadratic Bezier curves because they can be stored more compactly, and can be rendered more efficiently.
CwsFile A compressed Swf file
CxForm The CXFORM record defines a simple transform that can be applied to the color space of a graphic object
CxFormWithAlpha
EndShapeRecord The end shape record simply indicates the end of the shape record array.
FillStyle The way how object like lines and shapes get filled.
FillStyleArray A fill style array enumerates a number of fill styles.
FilterList
FocalGradient

A FOCALGRADIENT must be declared in DefineShape4—not DefineShape, DefineShape2

or DefineShape3.

The value range is from -1.0 to 1.0, where -1.0 means the focal point is close to the left border

of the radial gradient circle, 0.0 means that the focal point is in the center of the radial

gradient circle, and 1.0 means that the focal point is close to the right border of the radial

gradient circle.

FontData OpenType CFF font, as defined in the OpenType specification
FrameHeaderInfo
FwsFile An uncompressed Swf file
GlyphEntry

The GLYPHENTRY structure describes a single character in a line of text. It is composed of

an index into the current font’s glyph table, and an advance value. The advance value is the

horizontal distance between the reference point of this character and the reference point of the

following character.

GradRecord The GRADRECORD defines a gradient control point.
Gradient

Swf 8 and later supports up to 15 gradient control points, spread modes and a new

interpolation type.

Note that for the DefineShape, DefineShape2 or DefineShape3 tags, the SpreadMode and

InterpolationMode fields must be 0, and the NumGradients field can not exceed 8.

Source: Adobe[swf_file_format_spec_v10.pdf]

KerningRecord

A Kerning Record defines the distance between two glyphs in EM square coordinates. Certain

pairs of glyphs appear more aesthetically pleasing if they are moved closer together, or farther

apart. The FontKerningCode1 and FontKerningCode2 fields are the character codes for the

left and right characters. The FontKerningAdjustment field is a signed integer that defines a

value to be added to the advance value of the left character.

LineStyle A line style represents a width and color of a line. A line style is byte aligned.
LineStyle2 LINESTYLE2 builds upon the capabilities of the LINESTYLE record by allowing the use of new types of joins and caps as well as scaling options and the ability to fill a stroke.
LineStyleArray An array of line styles
Log Provides a log mechanism for thze Swf library
LogEventArgs Provides data Dump events.
Matrix
MorphFillStyleArray A morph fill style array enumerates a number of fill styles.
MorphGradRecord Gradient information.
MorphGradient A morph gradient
MorphLineStyle The format of a line style value within the file
MorphLineStyle2

MORPHLINESTYLE2 builds upon the capabilities of the MORPHLINESTYLE record by

allowing the use of new types of joins and caps as well as scaling options and the

ability to fill morph strokes.

MorphLineStyleArray A morph line style array enumerates a number of fill styles.
Mp3Frame
Mp3SoundData
Nellymoser16SoundData
Nellymoser8SoundData
NellymoserSoundData
Pix
Pix15 PIX15 is a RGB representation with 5 bits per channel
ProtectionEventArgs Provides data for Protection events.
RawSoundData
Rect TODO : Documentation
Rgb The RGB record represents a color as a 24-bit red, green, and blue value.
Rgba

The RGBA record represents a color as 32-bit red, green, blue and alpha value. An RGBA

color with an alpha value of 255 is completely opaque. An RGBA color with an alpha value of

zero is completely transparent. Alpha values between zero and 255 are partially transparent.

Shape The SHAPE structure defines a shape without fill style or line style information.
ShapeRecord Abstract class from which all SHAPERECORDs derive
ShapeWithStyle

The SHAPEWITHSTYLE structure extends the SHAPE structure by including fill style and

line style information. SHAPEWITHSTYLE is used by the DefineShape tag.

The story of byte aligness is the following. Structures are byte aligned if they only read byte aligned

structures or if the last read opreration has been an integer type or an other byte aligned structure. Sounds

complicated but it isn't.

 

Lets assume Stream.Postion is 0 and BitStream.Position is 0.

 

we read 3 bits: bits.GetBits( 3 ); Stream.Postion is 1 and BitStream.Position is 3

we read a byte: br.ReadByte(); Stream.Postion is 2 and BitStream.Position is 3

we read 3 bits: bits.GetBits( 3 ); Stream.Postion is 3 and BitStream.Position is 6

 

but after reading a byte aligned structure the first 3 bits should be {0,1,2}.

That is the reason why we have to reset the BitStream.Position before or after we red a byte aligned

structure.

SoundData
StraightEdgeRecord The StraightEdgeRecord stores the edge as an X-Y delta. The delta is added to the current drawing position, and this becomes the new drawing position. The edge is rendered between the old and new drawing positions. Straight edge records support three types of lines: 1. General lines. 2. Horizontal lines. 3. Vertical lines.
Style A style represents an object conaitning fillstyles and linestyles. Its is used by STYLECHANGERECORD and is byte aligned.
StyleChangeRecord

The style change record is also a non-edge record. It can be used to do the following:

1. Select a fill or line style for drawing.

2. Move the current drawing position (without drawing).

3. Replace the current fill and line style arrays with a new set of styles.

SwfCompressStateChangedEventArgs Provides data for CompressSateChanged events.
SwfDecompressSateChangedEventArgs Provides data for DecompressSateChanged events.
SwfEncodedU32 This class offers access to the EncodedU32 format of the Swf specification. It defines an unsigned Iteger as a sequence of 1 to 5 bytes. The most significant bit of a byte indicates if the next byte is also part of the value. The byte are ordered low to high.
SwfFile A uncompressed Swf file implementing ISwfElement, extending BaseFile
SwfFormatException
SwfReadProgressChangedEventArgs Provides data for SwfReadProgressChanged events
SwfWriteProgressChangedEventArgs Provides data for SwfWriteProgressChanged events
Tag
TagHandlerFactory
TagHandlerProducedEventArgs Provides data for TagHandlerProduced events.
TagHandlerReadCompleteEventArgs Provides data for TagHandlerReadComplete events.
TextRecord A TEXTRECORD sets text styles for subsequent characters. It can be used to select a font, change the text color, change the point size, insert a line break, or set the x and y position of the next character in the text. The new text styles apply until another TEXTRECORD changes the styles. TextRecords TEXTRECORD[zero or more] Text records. EndOfRecordsFlag UI8 Must be 0. DefineText Field Type Comment Static text tags 191 The TEXTRECORD also defines the actual characters in a text object. Characters are referred to by an index into the current font’s glyph table, not by a character code. Each TEXTRECORD contains a group of characters that all share the same text style, and are on the same line of text.
ZoneData

The advanced text rendering engine uses alignment zones to establish

the borders of a glyph for pixel snapping.

Alignment zones are critical for high-quality display of fonts.

ZoneRecord