Go to the documentation of this file.
22 #ifndef GNASH_LINESTYLE_H
23 #define GNASH_LINESTYLE_H
31 class movie_definition;
73 bool pixelHinting=
false,
82 m_color(std::move(
color)),
85 _pixelHinting(pixelHinting),
116 return _scaleVertically;
121 return _scaleHorizontally;
126 return _startCapStyle;
141 return _miterLimitFactor;
152 return _pixelHinting;
170 std::uint16_t m_width;
174 bool _scaleVertically;
176 bool _scaleHorizontally;
188 float _miterLimitFactor;
194 s.set_lerp(ls1, ls2, ratio);
@ CAP_NONE
Definition: LineStyle.h:39
JoinStyle joinStyle() const
Return the join style.
Definition: LineStyle.h:135
TagType
SWF tag types. Symbolic names copied from Ming.
Definition: SWF.h:31
@ DEFINESHAPE
Definition: SWF.h:34
#define LOG_ONCE(x)
Definition: log.h:49
A basic RGBA type.
Definition: RGBA.h:36
std::pair< FillStyle, boost::optional< FillStyle > > OptionalFillPair
Either a single or a morph-pair FillStyle.
Definition: TypesParser.h:52
#define _(String)
Definition: log.h:44
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:41
bool noClose() const
Definition: LineStyle.h:146
int frnd(float f)
Definition: GnashNumeric.h:91
@ s
Definition: GnashKey.h:165
@ DEFINEMORPHSHAPE2
Definition: SWF.h:111
@ CAP_SQUARE
Definition: LineStyle.h:40
@ JOIN_BEVEL
Definition: LineStyle.h:45
CapStyle endCapStyle() const
Return the end cap style.
Definition: LineStyle.h:130
Client program's interface to the definition of a movie or sprite.
Definition: movie_definition.h:96
void log_error(StringType msg, Args... args)
Definition: log.h:283
float read_short_ufixed()
Read a 8.8 fixed point unsigned value.
Definition: SWFStream.cpp:228
bool doPixelHinting() const
Return true if pixel hinting should be activated.
Definition: LineStyle.h:151
float miterLimitFactor() const
Return the miter limit factor.
Definition: LineStyle.h:140
@ t
Definition: GnashKey.h:166
const VGfloat color[4]
Definition: testr_gtk.cpp:82
void set_lerp(const LineStyle &ls1, const LineStyle &ls2, float ratio)
Set this style to the interpolation of the given one.
Definition: LineStyle.cpp:179
@ r
Definition: GnashKey.h:164
T lerp(T a, T b, T f)
Definition: GnashNumeric.h:85
void read(SWFStream &in, SWF::TagType t, movie_definition &md, const RunResources &r)
Read the line style from an SWF stream.
Definition: LineStyle.cpp:123
@ DEFINEMORPHSHAPE
Definition: SWF.h:76
@ CAP_ROUND
Definition: LineStyle.h:38
void read_morph(SWFStream &in, SWF::TagType t, movie_definition &md, const RunResources &r, LineStyle *pOther)
Definition: LineStyle.cpp:71
@ DEFINESHAPE2
Definition: SWF.h:54
For the outside of outline shapes, or just bare lines.
Definition: LineStyle.h:51
@ DEFINESHAPE4_
Definition: SWF.h:97
bool scaleThicknessHorizontally() const
Return true if line thickness should be scaled horizontally.
Definition: LineStyle.h:120
bool scaleThicknessVertically() const
Return true if line thickness should be scaled vertically.
Definition: LineStyle.h:115
void setLerp(FillStyle &f, const FillStyle &a, const FillStyle &b, double t)
Set the FillStyle to a lerp of a and b.
Definition: FillStyle.cpp:221
@ JOIN_ROUND
Definition: LineStyle.h:44
CapStyle startCapStyle() const
Return the start cap style.
Definition: LineStyle.h:125
@ JOIN_MITER
Definition: LineStyle.h:46
Class to group together per-run and external resources for Gnash.
Definition: RunResources.h:54
LineStyle()
Construct a default LineStyle.
Definition: LineStyle.cpp:55
OptionalFillPair readFills(SWFStream &in, SWF::TagType t, movie_definition &md, bool readMorph)
Read FillStyles from a stream.
Definition: TypesParser.cpp:161
rgba readRGB(SWFStream &in)
Read an RGB rgba from input stream.
Definition: TypesParser.cpp:106
LineStyle(std::uint16_t width, rgba color, bool scaleThicknessVertically=true, bool scaleThicknessHorizontally=true, bool pixelHinting=false, bool noClose=false, CapStyle startCapStyle=CAP_ROUND, CapStyle endCapStyle=CAP_ROUND, JoinStyle joinStyle=JOIN_ROUND, float miterLimitFactor=1.0f)
Definition: LineStyle.h:70
CapStyle
Definition: LineStyle.h:37
const rgba & get_color() const
Return line color and alpha.
Definition: LineStyle.h:156
@ DEFINESHAPE4
Definition: SWF.h:110
@ f
Definition: GnashKey.h:152
std::uint16_t getThickness() const
Return thickness of the line, in TWIPS.
Definition: LineStyle.h:110
std::uint16_t read_u16()
Read a aligned unsigned 16-bit value from the stream.
Definition: SWFStream.cpp:332
JoinStyle
Definition: LineStyle.h:43
std::uint8_t read_u8()
Read a aligned unsigned 8-bit value from the stream.
Definition: SWFStream.cpp:319
SWF stream wrapper class.
Definition: SWFStream.h:59
void ensureBytes(unsigned long needed)
Ensure the requested number of bytes are available for an aligned read in the currently opened tag.
Definition: SWFStream.cpp:50
@ width
Definition: klash_part.cpp:329
@ DEFINEMORPHSHAPE2_
Definition: SWF.h:98
rgba readRGBA(SWFStream &in)
Read an RGBA rgba from input stream.
Definition: TypesParser.cpp:95