~ubuntu-branches/ubuntu/karmic/gnash/karmic

« back to all changes in this revision

Viewing changes to libbase/postscript.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
 
// postscript.h -- by Thatcher Ulrich <tu@tulrich.com>
2
 
 
3
 
// This source code has been donated to the Public Domain.  Do
4
 
// whatever you want with it.
5
 
 
6
 
// Some helpers for generating Postscript graphics.
7
 
 
8
 
#ifndef POSTSCRIPT_H
9
 
#define POSTSCRIPT_H
10
 
 
11
 
 
12
 
#include "tu_config.h"
13
 
 
14
 
// Loosely translated into C++ from:
15
 
// -- ps.lua
16
 
// -- lua interface to postscript
17
 
// -- Luiz Henrique de Figueiredo (lhf@csg.uwaterloo.ca)
18
 
// -- 14 May 96
19
 
//
20
 
// From the Lua 4.0.1 distribution, see http://www.lua.org
21
 
 
22
 
 
23
 
class tu_file;
24
 
 
25
 
 
26
 
// Postscript units are 72 per inch.
27
 
 
28
 
// @@ TODO all these functions need to take floats, not ints...
29
 
 
30
 
class DSOEXPORT postscript
31
 
{
32
 
public:
33
 
        postscript(tu_file* out, const char* title, bool encapsulated = true);
34
 
        ~postscript();
35
 
 
36
 
        void    clear();        // New page
37
 
        void    comment(const char* s);
38
 
        void    rgbcolor(float r, float g, float b);
39
 
        void    black();
40
 
        void    gray(float amount);     // 0 == black, 1 == white
41
 
 
42
 
        void    line(float x0, float y0, float x1, float y1);
43
 
        void    moveto(float x0, float y0);
44
 
        void    lineto(float x0, float y0);
45
 
        void    linewidth(float w);
46
 
        // linestyle ?
47
 
 
48
 
        void    fill(); // after a sequence of moveto/lineto
49
 
        
50
 
        void    font(const char* name, float size);
51
 
        void    printf(float x, float y, const char* fmt, ...); // printf-style output
52
 
 
53
 
        void    circle(float x, float y, float radius);
54
 
        void    disk(float x, float y, float radius);
55
 
        void    dot(float x, float y);
56
 
 
57
 
        void    rectangle(float x0, float x1, float y0, float y1);
58
 
        void    box(float x0, float x1, float y0, float y1);
59
 
 
60
 
private:
61
 
        void    update(float x0, float y0);     // enlarge the bounding box if necessary.
62
 
 
63
 
        tu_file*        m_out;
64
 
        int     m_page;
65
 
        float   m_x0, m_x1, m_y0, m_y1; // bounding box
66
 
        bool    m_empty;
67
 
};
68
 
 
69
 
 
70
 
#endif // POSTSCRIPT_H
71
 
 
72
 
 
73
 
 
74
 
// Local Variables:
75
 
// mode: C++
76
 
// c-basic-offset: 8 
77
 
// tab-width: 8
78
 
// indent-tabs-mode: t
79
 
// End: