1
// styles.h -- Thatcher Ulrich <tu@tulrich.com> 2003
3
// This source code has been donated to the Public Domain. Do
4
// whatever you want with it.
8
/* $Id: styles.h,v 1.23 2007/12/04 11:45:29 strk Exp $ */
10
#ifndef GNASH_STYLES_H
11
#define GNASH_STYLES_H
15
#include "bitmap_character_def.h"
16
#include "fill_style.h"
21
class movie_definition;
26
virtual ~base_line_style(){};
30
/// For the outside of outline shapes, or just bare lines.
31
class line_style : public base_line_style
36
/// Construct a line style with explicit values
39
/// Thickness of line, in TWIPS.
40
/// Zero for hair line
45
line_style(boost::uint16_t width, const rgba& color)
52
/// Read the line style from an SWF stream
54
/// Stream is assumed to be positioned at
57
/// Throw a ParserException if there's no enough bytes in the
58
/// currently opened tag for reading. See stream::ensureBytes()
60
void read(stream* in, int tag_type, movie_definition *md);
62
/// Read two lines styles from the SWF stream
63
/// at the same time -- this is used in morphing.
64
void read_morph(stream* in, int tag_type, movie_definition *md,
67
/// Return thickness of the line, in TWIPS
68
boost::uint16_t get_width() const { return m_width; }
70
/// Return line color and alpha
71
const rgba& get_color() const { return m_color; }
74
friend class morph2_character_def;
75
friend class triangulating_render_handler;
77
boost::uint16_t m_width; // in TWIPS
81
class morph_line_style : public base_line_style
85
morph_line_style(stream* in);
87
void read(stream* in);
90
boost::uint16_t m_width[2];
97
#endif // GNASH_STYLES_H
102
// indent-tabs-mode: t