[go: up one dir, main page]

File: svg.h

package info (click to toggle)
seaview 1%3A4.3.3-3
  • links: PTS, VCS
  • area: non-free
  • in suites: wheezy
  • size: 1,480 kB
  • sloc: cpp: 25,034; ansic: 7,442; xml: 135; makefile: 55
file content (53 lines) | stat: -rw-r--r-- 1,721 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef FL_SVG_GRAPHICS_DRIVER_H
#define FL_SVG_GRAPHICS_DRIVER_H

#include <stdio.h>
#include <FL/Fl_Device.H>

class Fl_SVG_Graphics_Driver : public Fl_Graphics_Driver {
  FILE *out_;
  int width_;
  const char *linecap_;
  char *family_;
  const char *bold_;
  const char *style_;
  uchar red_, green_, blue_;
public:
  Fl_SVG_Graphics_Driver(FILE*);
  ~Fl_SVG_Graphics_Driver();
  FILE* file() {return out_;}
protected:
  void rect(int x, int y, int w, int h);
  void rectf(int x, int y, int w, int h);
  void line_style(int style, int width, char *dashes=0);
  void line(int x1, int y1, int x2, int y2);
  void font(int f, int s);
  void draw(const char *str, int n, int x, int y);
  void draw(const char*, int, float, float) ;
  void draw(int, const char*, int, int, int) ;
  void rtl_draw(const char*, int, int, int) ;
  void color(uchar r, uchar g, uchar b);
  void color(Fl_Color c);
  void draw_image(const uchar*, int, int, int, int, int, int) ;
  void draw_image_mono(const uchar*, int, int, int, int, int, int) ;
  void draw_image(void (*)(void*, int, int, int, uchar*), void*, int, int, int, int, int) ;
  void draw_image_mono(void (*)(void*, int, int, int, uchar*), void*, int, int, int, int, int) ;
  void draw(Fl_RGB_Image*, int, int, int, int, int, int) ;
  void draw(Fl_Pixmap*, int, int, int, int, int, int) ;
  void draw(Fl_Bitmap*, int, int, int, int, int, int) ;
  double width(const char*, int) ;
  int height() ;
  int descent() ;
};

class Fl_SVG_File_Surface : public Fl_Surface_Device {
public:
  static const char *class_id;
  const char *class_name() {return class_id;};
  Fl_SVG_File_Surface(int, int, FILE*);
  void end();
  ~Fl_SVG_File_Surface();
};

#endif // FL_SVG_GRAPHICS_DRIVER_H