~ubuntu-branches/ubuntu/saucy/gnash/saucy-proposed

« back to all changes in this revision

Viewing changes to server/styles.h

  • Committer: Bazaar Package Importer
  • Author(s): Alexander Sack
  • Date: 2008-10-13 14:29:49 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20081013142949-f6qdvnu4mn05ltdc
Tags: 0.8.4~~bzr9980-0ubuntu1
* new upstream release 0.8.4 (LP: #240325)
* ship new lib usr/lib/gnash/libmozsdk.so.* in mozilla-plugin-gnash
  - update debian/mozilla-plugin-gnash.install
* ship new lib usr/lib/gnash/libgnashnet.so.* in gnash-common
  - update debian/gnash-common.install
* add basic debian/build_head script to build latest CVS head packages.
  - add debian/build_head
* new sound architecture requires build depend on libsdl1.2-dev
  - update debian/control
* head build script now has been completely migrated to bzr (upstream +
  ubuntu)
  - update debian/build_head
* disable kde gui until klash/qt4 has been fixed; keep kde packages as empty
  packages for now.
  - update debian/rules
  - debian/klash.install
  - debian/klash.links
  - debian/klash.manpages
  - debian/konqueror-plugin-gnash.install
* drop libkonq5-dev build dependency accordingly
  - update debian/control
* don't install headers manually anymore. gnash doesnt provide a -dev
  package after all
  - update debian/rules
* update libs installed in gnash-common; libgnashserver-*.so is not available
  anymore (removed); in turn we add the new libgnashcore-*.so
  - update debian/gnash-common.install
* use -Os for optimization and properly pass CXXFLAGS=$(CFLAGS) to configure
  - update debian/rules
* touch firefox .autoreg in postinst of mozilla plugin
  - update debian/mozilla-plugin-gnash.postinst
* link gnash in ubufox plugins directory for the plugin alternative switcher
  - add debian/mozilla-plugin-gnash.links
* suggest ubufox accordingly
  - update debian/control
* add new required build-depends on libgif-dev
  - update debian/control
* add Xb-Npp-Description and Xb-Npp-File as new plugin database meta data
  - update debian/control

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// styles.h     -- Thatcher Ulrich <tu@tulrich.com> 2003
2
 
 
3
 
// This source code has been donated to the Public Domain.  Do
4
 
// whatever you want with it.
5
 
 
6
 
// line style types.
7
 
 
8
 
/* $Id: styles.h,v 1.23 2007/12/04 11:45:29 strk Exp $ */
9
 
 
10
 
#ifndef GNASH_STYLES_H
11
 
#define GNASH_STYLES_H
12
 
 
13
 
#include "impl.h"
14
 
#include "types.h"
15
 
#include "bitmap_character_def.h"
16
 
#include "fill_style.h"
17
 
 
18
 
namespace gnash {
19
 
 
20
 
class stream;
21
 
class movie_definition;
22
 
 
23
 
class base_line_style
24
 
{
25
 
public:
26
 
        virtual ~base_line_style(){};
27
 
        
28
 
};
29
 
 
30
 
/// For the outside of outline shapes, or just bare lines.
31
 
class line_style : public base_line_style
32
 
{
33
 
public:
34
 
        line_style();
35
 
 
36
 
        /// Construct a line style with explicit values
37
 
        ///
38
 
        /// @param width
39
 
        ///     Thickness of line, in TWIPS. 
40
 
        ///     Zero for hair line
41
 
        ///
42
 
        /// @param color
43
 
        ///     Line color
44
 
        ///
45
 
        line_style(boost::uint16_t width, const rgba& color)
46
 
                :
47
 
                m_width(width),
48
 
                m_color(color)
49
 
        {
50
 
        }
51
 
 
52
 
        /// Read the line style from an SWF stream
53
 
        //
54
 
        /// Stream is assumed to be positioned at 
55
 
        /// the right place.
56
 
        ///
57
 
        /// Throw a ParserException if there's no enough bytes in the
58
 
        /// currently opened tag for reading. See stream::ensureBytes()
59
 
        ///
60
 
        void    read(stream* in, int tag_type, movie_definition *md);
61
 
        
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,
65
 
                line_style *pOther);
66
 
 
67
 
        /// Return thickness of the line, in TWIPS
68
 
        boost::uint16_t get_width() const { return m_width; }
69
 
 
70
 
        /// Return line color and alpha
71
 
        const rgba&     get_color() const { return m_color; }
72
 
        
73
 
private:
74
 
        friend class morph2_character_def;
75
 
        friend class triangulating_render_handler;
76
 
        
77
 
        boost::uint16_t m_width;        // in TWIPS
78
 
        rgba    m_color;
79
 
};
80
 
 
81
 
class morph_line_style : public base_line_style
82
 
{
83
 
public:
84
 
        morph_line_style();
85
 
        morph_line_style(stream* in);
86
 
        
87
 
        void read(stream* in);
88
 
        
89
 
private:
90
 
        boost::uint16_t m_width[2];
91
 
        rgba   m_color[2];
92
 
};
93
 
 
94
 
} // namespace gnash
95
 
 
96
 
 
97
 
#endif // GNASH_STYLES_H
98
 
 
99
 
 
100
 
// Local Variables:
101
 
// mode: C++
102
 
// indent-tabs-mode: t
103
 
// End: