idraw.h

Go to the documentation of this file.
00001 #ifndef ocidraw_h
00002 #define ocidraw_h
00003 /*
00004 Hooks for special processing make use of the request() method in Glyphs.
00005 */
00006 #include <ivstream.h>
00007 
00008 class Canvas;
00009 class Transformer;
00010 class Font;
00011 class Color;
00012 class Brush;
00013 
00014 class OcIdraw {
00015 public:
00016    static void prologue();
00017    static void epilog();
00018    static void pict();
00019    static void pict(const Transformer&);
00020    static void end();
00021    static void text(Canvas*, const char*, const Transformer&,
00022       const Font* f=nil, const Color* c=nil);
00023    static void mline(Canvas*, int count,  const Coord* x, const Coord* y,
00024       const Color* c=nil, const Brush* b=nil);
00025    static void polygon(Canvas*, int count,  const Coord* x, const Coord* y,
00026       const Color* c=nil, const Brush* b=nil, boolean fill = false);
00027    static void rect(Canvas*, Coord x1, Coord y1, Coord x2, Coord y2,
00028       const Color* c=nil, const Brush* b=nil, boolean fill = false);
00029    static void line(Canvas*, Coord x1, Coord y1, Coord x2, Coord y2,
00030       const Color* c=nil, const Brush* b=nil);
00031    static void ellipse(Canvas*, Coord x1, Coord y1,
00032       Coord width, Coord height,
00033       const Color* c=nil, const Brush* b= nil, boolean fill = false);
00034 
00035    static void new_path();
00036    static void move_to(Coord x, Coord y);
00037    static void line_to(Coord x, Coord y);
00038    static void curve_to(Coord x, Coord y, Coord x1, Coord y1, Coord x2, Coord y2);
00039    static void close_path();
00040    static void stroke(Canvas*, const Color*, const Brush*);
00041    static void fill(Canvas*, const Color*);
00042    static void bspl(Canvas*, int count,  const Coord* x, const Coord* y,
00043       const Color* c=nil, const Brush* b=nil);
00044    static void cbspl(Canvas*, int count,  const Coord* x, const Coord* y,
00045       const Color* c=nil, const Brush* b=nil, boolean fill = false);
00046 public:
00047    static ostream* idraw_stream;
00048 private:
00049    static void rcurve(int level, Coord x, Coord y, Coord x1, Coord y1, Coord x2, Coord y2);
00050    static void poly(int count,  const Coord* x, const Coord* y,
00051       const Color* c=nil, const Brush* b=nil, boolean fill = false);
00052    static void add(Coord, Coord);
00053    static void brush(const Brush*);
00054    static void ifill(const Color*, boolean);
00055    static boolean closed_;
00056    static boolean curved_;
00057    static Coord *xpath_, *ypath_;
00058    static int ipath_, capacity_;
00059 };
00060    
00061 #define IfIdraw(arg)    if (OcIdraw::idraw_stream) {OcIdraw::arg;}
00062 
00063 
00064 #endif
Generated on Mon Jun 13 08:10:23 2011 for NEURON by  doxygen 1.6.3