For the outside of outline shapes, or just bare lines. More...
#include <LineStyle.h>
Public Member Functions | |
LineStyle () | |
Construct a default LineStyle. | |
LineStyle (boost::uint16_t width, const 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) | |
void | read (SWFStream &in, SWF::TagType t, movie_definition &md, const RunResources &r) |
Read the line style from an SWF stream. | |
void | read_morph (SWFStream &in, SWF::TagType t, movie_definition &md, const RunResources &r, LineStyle *pOther) |
boost::uint16_t | getThickness () const |
Return thickness of the line, in TWIPS. | |
bool | scaleThicknessVertically () const |
Return true if line thickness should be scaled vertically. | |
bool | scaleThicknessHorizontally () const |
Return true if line thickness should be scaled horizontally. | |
CapStyle | startCapStyle () const |
Return the start cap style. | |
CapStyle | endCapStyle () const |
Return the end cap style. | |
JoinStyle | joinStyle () const |
Return the join style. | |
float | miterLimitFactor () const |
Return the miter limit factor. | |
bool | noClose () const |
bool | doPixelHinting () const |
Return true if pixel hinting should be activated. | |
const rgba & | get_color () const |
Return line color and alpha. | |
void | set_lerp (const LineStyle &ls1, const LineStyle &ls2, float ratio) |
Set this style to the interpolation of the given one. |
For the outside of outline shapes, or just bare lines.
gnash::LineStyle::LineStyle | ( | ) |
Construct a default LineStyle.
gnash::LineStyle::LineStyle | ( | boost::uint16_t | width, | |
const 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 | |||
) | [inline] |
Construct a line style with explicit values
width | Thickness of line in twips. Zero for hair line | |
color | Line color | |
scaleThicknessVertically | ||
scaleThicknessHorizontally | ||
noClose | ||
startCapStyle | ||
endCapStyle | ||
joinStyle | ||
miterLimitFactor |
bool gnash::LineStyle::doPixelHinting | ( | ) | const [inline] |
Return true if pixel hinting should be activated.
CapStyle gnash::LineStyle::endCapStyle | ( | ) | const [inline] |
Return the end cap style.
const rgba& gnash::LineStyle::get_color | ( | ) | const [inline] |
Return line color and alpha.
boost::uint16_t gnash::LineStyle::getThickness | ( | ) | const [inline] |
Return thickness of the line, in TWIPS.
JoinStyle gnash::LineStyle::joinStyle | ( | ) | const [inline] |
Return the join style.
float gnash::LineStyle::miterLimitFactor | ( | ) | const [inline] |
Return the miter limit factor.
bool gnash::LineStyle::noClose | ( | ) | const [inline] |
Return true if stroke should not be closed if the stroke's last point matches the first point. Caps should be applied instead of a join
void gnash::LineStyle::read | ( | SWFStream & | in, | |
SWF::TagType | t, | |||
movie_definition & | md, | |||
const RunResources & | r | |||
) |
Read the line style from an SWF stream.
Stream is assumed to be positioned at the right place.
Throw a ParserException if there's no enough bytes in the currently opened tag for reading. See stream::ensureBytes()
void gnash::LineStyle::read_morph | ( | SWFStream & | in, | |
SWF::TagType | t, | |||
movie_definition & | md, | |||
const RunResources & | r, | |||
LineStyle * | pOther | |||
) |
Read two lines styles from the SWF stream at the same time -- this is used in morphing.
bool gnash::LineStyle::scaleThicknessHorizontally | ( | ) | const [inline] |
Return true if line thickness should be scaled horizontally.
bool gnash::LineStyle::scaleThicknessVertically | ( | ) | const [inline] |
Return true if line thickness should be scaled vertically.
Set this style to the interpolation of the given one.
ls1 | First LineStyle to interpolate. | |
ls2 | Second LineStyle to interpolate. The interpolation factor (0..1). When 0, this will be equal to ls1, when 1 this will be equal to ls2. |
Referenced by gnash::setLerp().
CapStyle gnash::LineStyle::startCapStyle | ( | ) | const [inline] |
Return the start cap style.