Go to the documentation of this file.
21 #ifndef GNASH_DYNAMIC_SHAPE_H
22 #define GNASH_DYNAMIC_SHAPE_H
56 void moveTo(std::int32_t
x, std::int32_t
y);
59 void lineTo(std::int32_t
x, std::int32_t
y,
int swfVersion);
64 void curveTo(std::int32_t cx, std::int32_t cy,
65 std::int32_t ax, std::int32_t ay,
int swfVersion);
96 bool vScale=
true,
bool hScale=
true,
97 bool pixelHinting=
false,
102 float miterLimitFactor=1.0
f);
181 void startNewPath(
bool newShape);
197 mutable bool _changed;
210 #endif // GNASH_DYNAMIC_SHAPE_H
bool pointTest(std::int32_t x, std::int32_t y, const SWFMatrix &wm) const
Definition: ShapeRecord.h:183
static LogFile & getDefaultInstance()
Definition: log.cpp:77
void moveTo(std::int32_t x, std::int32_t y)
Move pen to given coordinates.
Definition: DynamicShape.cpp:184
void clear()
Definition: ShapeRecord.h:90
size_t addFillStyle(const FillStyle &stl)
Add a fill style, possibly reusing an existing one if existent.
Definition: DynamicShape.cpp:261
size_t add_line_style(const LineStyle &stl)
Add a line style, possibly reusing an existing one if existent.
Definition: DynamicShape.cpp:268
point ap
Start point of the path.
Definition: Geometry.h:179
size_t size() const
Return the number of edges in this path.
Definition: Geometry.h:517
const int LINELEN
Definition: dumpshm.cpp:96
~DynamicShape()
Definition: DynamicShape.h:50
void expand_to_circle(std::int32_t x, std::int32_t y, std::int32_t radius)
Expand this rectangle to enclose the given circle.
Definition: SWFRect.h:186
void clear()
Remove all paths and style informations.
Definition: DynamicShape.cpp:39
void add_path(const Path &pth)
Add a path, updating _currpath and recomputing bounds.
Definition: DynamicShape.cpp:55
void finalize() const
Always call this function before displaying !
Definition: DynamicShape.cpp:139
void dump_ctrl(void *ptr)
Dumps the internal data of the found ShmControl block. We do our own dumping, rather than letting Shm...
Definition: dumpshm.cpp:356
const FillStyles & fillStyles() const
Definition: ShapeRecord.h:48
#define dbglogfile
Definition: gtkext.cpp:48
DynamicShape()
Definition: DynamicShape.cpp:28
void log_debug(StringType msg, Args... args)
Definition: log.h:301
std::int32_t y
Definition: BitmapData_as.cpp:435
void addFillStyle(const FillStyle &fs)
Definition: ShapeRecord.cpp:96
A basic RGBA type.
Definition: RGBA.h:36
#define _(String)
Definition: log.h:44
FillStyle describes the various fill styles for shapes.
Definition: FillStyle.h:282
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:41
const SWFRect & getBounds() const
Definition: ShapeRecord.h:166
const int PIDSTART
Definition: dumpshm.cpp:94
const Paths & paths() const
Definition: ShapeRecord.h:64
Base class for render handlers.
Definition: Renderer.h:189
#define PACKAGE
Definition: gnashconfig.h:556
void close()
Close this path with a straight line, if not already closed.
Definition: Geometry.h:371
void dump_shm(bool convert, bool out)
Definition: dumpshm.cpp:222
bool pointTestLocal(std::int32_t x, std::int32_t y, const SWFMatrix &wm) const
Definition: DynamicShape.h:146
const int SHM_INFO
Definition: dumpshm.cpp:102
const char * DUMPSHM_VERSION
Definition: dumpshm.cpp:110
Definition: ShapeRecord.h:41
const LineStyles & lineStyles() const
Definition: ShapeRecord.h:56
void display(Renderer &renderer, const Transform &xform) const
Display a DynamicShape object.
Definition: DynamicShape.cpp:49
Rectangle class, see swf defined rectangle record.
Definition: SWFRect.h:45
#define bindtextdomain(Domainname, Dirname)
Definition: gettext.h:66
void endFill()
Close an existing filled path, if any.
Definition: DynamicShape.cpp:63
const VGfloat color[4]
Definition: testr_gtk.cpp:82
void write(SimpleBuffer &buf, const std::string &str)
Write a string to an AMF buffer.
Definition: AMF.cpp:161
#define textdomain(Domainname)
Definition: gettext.h:65
std::int32_t x
The x coordinate.
Definition: Point2d.h:43
@ CAP_ROUND
Definition: LineStyle.h:38
void drawLineTo(std::int32_t dx, std::int32_t dy)
Draw a straight line.
Definition: Geometry.h:325
void lineStyle(std::uint16_t thickness, const rgba &color, bool vScale=true, bool hScale=true, bool pixelHinting=false, bool noClose=false, CapStyle startCapStyle=CAP_ROUND, CapStyle endCapStyle=CAP_ROUND, JoinStyle joinStyle=JOIN_ROUND, float miterLimitFactor=1.0f)
Set current line style and start a new path.
Definition: DynamicShape.cpp:163
const int PIDEND
Definition: dumpshm.cpp:95
The DynamicShape class represents a mutable shape.
Definition: DynamicShape.h:45
A subset of a shape, a series of edges sharing a single set of styles.
Definition: Geometry.h:167
For the outside of outline shapes, or just bare lines.
Definition: LineStyle.h:51
void addSubshape(const Subshape &subshape)
Definition: ShapeRecord.h:162
void lineTo(std::int32_t x, std::int32_t y, int swfVersion)
Draw a straight line from current position to given one.
Definition: DynamicShape.cpp:196
@ JOIN_ROUND
Definition: LineStyle.h:44
Definition: SWFMatrix.h:54
int main(int argc, char *argv[])
Definition: dumpshm.cpp:113
Path & currentPath()
For DynamicShape.
Definition: ShapeRecord.h:76
virtual void drawShape(const SWF::ShapeRecord &shape, const Transform &xform)=0
CapStyle
Definition: LineStyle.h:37
void addPath(const Path &path)
Definition: ShapeRecord.h:82
@ f
Definition: GnashKey.h:152
void curveTo(std::int32_t cx, std::int32_t cy, std::int32_t ax, std::int32_t ay, int swfVersion)
Draw a curve from current position to given one using given control points.
Definition: DynamicShape.cpp:227
static RcInitFile & getDefaultInstance()
Return the default instance of RC file.
Definition: rc.cpp:61
@ c
Definition: GnashKey.h:149
void resetLineStyle()
Reset line style to no style and start a new path.
Definition: DynamicShape.cpp:177
void setBounds(const SWFRect &bounds)
Definition: DynamicShape.h:77
JoinStyle
Definition: LineStyle.h:43
const SWFRect & getBounds() const
Definition: DynamicShape.h:73
#define VERSION
Definition: gnashconfig.h:731
std::int32_t y
The y coordinate.
Definition: Point2d.h:46
void beginFill(const FillStyle &f)
Start drawing with a solid fill.
Definition: DynamicShape.cpp:98
int getopt(int, char *const *, const char *)
Holds information needed to draw a shape.
Definition: ShapeRecord.h:127
const int SHM_STAT
Definition: dumpshm.cpp:101
const unsigned int LOOPCNT
Definition: dumpshm.cpp:97
const SWF::ShapeRecord & shapeRecord() const
Definition: DynamicShape.h:153
void expandBounds(SWFRect &r, unsigned int thickness, int swfVersion) const
Expand given SWFRect to include bounds of this path.
Definition: Geometry.h:276
std::string hexify(const unsigned char *p, size_t length, bool ascii)
Convert a sequence of bytes to hex or ascii format.
Definition: log.cpp:48
void drawCurveTo(std::int32_t cdx, std::int32_t cdy, std::int32_t adx, std::int32_t ady)
Draw a curve.
Definition: Geometry.h:348
std::int32_t x
Definition: BitmapData_as.cpp:434
void addLineStyle(const LineStyle &ls)
Definition: ShapeRecord.h:86
@ e
Definition: GnashKey.h:151
void setBounds(const SWFRect &bounds)
Definition: ShapeRecord.h:179
const int DEFAULT_SHM_SIZE
Definition: dumpshm.cpp:98
void clear()
Reset all shape data.
Definition: ShapeRecord.cpp:89