20 #ifndef GNASH_SWF_SHAPERECORD_H
21 #define GNASH_SWF_SHAPERECORD_H
32 class movie_definition;
46 typedef std::vector<Path>
Paths;
83 _paths.push_back(path);
87 _lineStyles.push_back(ls);
99 FillStyles _fillStyles;
100 LineStyles _lineStyles;
163 _subshapes.push_back(subshape);
185 for (SWF::ShapeRecord::Subshapes::const_iterator it = _subshapes.begin(),
186 end = _subshapes.end(); it !=
end; ++it) {
197 unsigned readStyleChange(
SWFStream& in,
size_t num_fill_bits,
size_t numStyles);
200 enum ShapeRecordFlags {
203 SHAPE_FILLSTYLE0_CHANGE = 0x02,
204 SHAPE_FILLSTYLE1_CHANGE = 0x04,
205 SHAPE_LINESTYLE_CHANGE = 0x08,
206 SHAPE_HAS_NEW_STYLES = 0x10
210 Subshapes _subshapes;
213 std::ostream&
operator<<(std::ostream&
o,
const ShapeRecord& sh);
Definition: GnashKey.h:147
void clear()
Reset all shape data.
Definition: ShapeRecord.cpp:154
void addFillStyle(const FillStyle &fs)
Definition: ShapeRecord.cpp:161
const LineStyles & lineStyles() const
Definition: ShapeRecord.h:56
const FillStyles & fillStyles() const
Definition: ShapeRecord.h:48
Client program's interface to the definition of a movie or sprite.
Definition: movie_definition.h:95
bool pointTest(const std::vector< Path > &paths, const std::vector< LineStyle > &lineStyles, boost::int32_t x, boost::int32_t y, const SWFMatrix &wm)
Definition: Geometry.cpp:125
void addPath(const Path &path)
Definition: ShapeRecord.h:82
ShapeRecord()
Construct a ShapeRecord.
Definition: ShapeRecord.cpp:145
Path & currentPath()
For DynamicShape.
Definition: ShapeRecord.h:76
std::vector< FillStyle > FillStyles
Definition: ShapeRecord.h:44
TagType
SWF tag types. Symbolic names copied from Ming.
Definition: SWF.h:30
bool pointTest(boost::int32_t x, boost::int32_t y, const SWFMatrix &wm) const
Definition: ShapeRecord.h:183
Definition: SWFMatrix.h:53
~ShapeRecord()
Definition: ShapeRecord.cpp:149
VGPath path
Definition: testr_gtk.cpp:84
std::vector< Path > Paths
Definition: ShapeRecord.h:46
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:40
void setLerp(const ShapeRecord &a, const ShapeRecord &b, const double ratio)
Set to the lerp of two ShapeRecords.
Definition: ShapeRecord.cpp:198
Definition: ShapeRecord.h:41
Definition: GnashKey.h:161
const SWFRect & getBounds() const
Definition: ShapeRecord.h:166
Subshape::Paths Paths
Definition: ShapeRecord.h:131
const Paths & paths() const
Definition: ShapeRecord.h:64
Definition: GnashKey.h:164
LineStyles & lineStyles()
Definition: ShapeRecord.h:60
std::ostream & operator<<(std::ostream &o, const ShapeRecord &sh)
Definition: ShapeRecord.cpp:659
FillStyles & fillStyles()
Definition: ShapeRecord.h:52
void read(SWFStream &in, SWF::TagType tag, movie_definition &m, const RunResources &r)
Parse path data from a SWFStream.
Definition: ShapeRecord.cpp:289
Class to group together per-run and external resources for Gnash.
Definition: RunResources.h:43
FillStyle describes the various fill styles for shapes.
Definition: FillStyle.h:281
void clear()
Definition: ShapeRecord.h:90
A subset of a shape, a series of edges sharing a single set of styles.
Definition: Geometry.h:166
boost::int32_t x
Definition: BitmapData_as.cpp:434
Definition: GnashKey.h:148
SWFRect computeBounds(int swfVersion) const
Find the bounds of this subhape, and return them in a rectangle.
Definition: ShapeRecord.cpp:169
void addLineStyle(const LineStyle &ls)
Definition: ShapeRecord.h:86
std::vector< LineStyle > LineStyles
Definition: ShapeRecord.h:45
void setBounds(const SWFRect &bounds)
Definition: ShapeRecord.h:179
For the outside of outline shapes, or just bare lines.
Definition: LineStyle.h:49
boost::int32_t y
Definition: BitmapData_as.cpp:435
const Subshapes & subshapes() const
Definition: ShapeRecord.h:158
Rectangle class, see swf defined rectangle record.
Definition: SWFRect.h:44
Paths & paths()
Definition: ShapeRecord.h:68
pixel_iterator< T > end(GnashImage &im)
Definition: ImageIterators.h:198
std::vector< Subshape > Subshapes
Definition: ShapeRecord.h:132
Definition: GnashKey.h:159
Holds information needed to draw a shape.
Definition: ShapeRecord.h:126
Subshape::LineStyles LineStyles
Definition: ShapeRecord.h:130
Definition: GnashKey.h:331
SWF stream wrapper class.
Definition: SWFStream.h:58
void addSubshape(const Subshape &subshape)
Definition: ShapeRecord.h:162
Subshape::FillStyles FillStyles
Definition: ShapeRecord.h:129