1 #include <../../nrnconf.h>
4 #include <InterViews/glyph.h>
5 #include <InterViews/session.h>
6 #include <InterViews/style.h>
7 #include <InterViews/canvas.h>
8 #include <InterViews/color.h>
9 #include <InterViews/hit.h>
10 #include <InterViews/brush.h>
11 #include <InterViews/transformer.h>
12 #include <IV-look/kit.h>
13 #include <OS/string.h>
63 Style*
s = Session::instance()->style();
65 s->find_attribute(
"default_brush", b);
101 Coord y = h.bottom();
103 h.target(depth,
this, 0);
166 Coord y = h.bottom();
174 h.target(depth,
this, 0);
204 const Coord p0 = 1.00000000 * r;
205 const Coord p1 = 0.89657547 * r;
206 const Coord p2 = 0.70710678 * r;
207 const Coord p3 = 0.51763809 * r;
208 const Coord p4 = 0.26794919 * r;
210 c->move_to(x + p0, y);
211 c->curve_to(x + p2, y + p2, x + p0, y + p4, x + p1, y + p3);
212 c->curve_to(x, y + p0, x + p3, y + p1, x + p4, y + p0);
213 c->curve_to(x - p2, y + p2, x - p4, y + p0, x - p3, y + p1);
214 c->curve_to(x - p0, y, x - p1, y + p3, x - p0, y + p4);
215 c->curve_to(x - p2, y - p2, x - p0, y - p4, x - p1, y - p3);
216 c->curve_to(x, y - p0, x - p3, y - p1, x - p4, y - p0);
217 c->curve_to(x + p2, y - p2, x + p4, y - p0, x + p3, y - p1);
218 c->curve_to(x + p0, y, x + p1, y - p3, x + p0, y - p4);
256 c->fill_rect(x - dx, y - dy, x + dx, y + dy,
color());
258 c->rect(x - dx, y - dy, x + dx, y + dy,
color(),
brush());
287 const Coord x = a.
x(), y = a.
y();
291 c->move_to(x, y + radius);
292 c->line_to(x +
side_, y - radius);
293 c->line_to(x -
side_, y - radius);
305 xList[1] = x +
side_;
306 xList[2] = x -
side_;
309 yList[0] = y + radius;
310 yList[1] = y - radius;
311 yList[2] = y - radius;
312 yList[3] = y + radius;
const Color * color() const
static const Color * default_color()
Appear(const Color *color=NULL, const Brush *brush=NULL)
static const Brush * default_brush()
const Brush * brush() const
Circle(float radius, bool filled=false, const Color *color=NULL, const Brush *brush=NULL)
virtual void draw(Canvas *, const Allocation &) const
virtual void request(Requisition &) const
virtual void allocate(Canvas *, const Allocation &, Extension &)
void merge(const Extension &)
void set(Canvas *, const Allocation &)
virtual void request(Requisition &) const
virtual void allocate(Canvas *, const Allocation &, Extension &)
Line(Coord dx, Coord dy, const Color *color=NULL, const Brush *brush=NULL)
virtual void draw(Canvas *, const Allocation &) const
virtual void pick(Canvas *, const Allocation &, int depth, Hit &)
static bool near_line(Coord x, Coord y, Coord x1, Coord y1, Coord x2, Coord y2, float epsilon)
static void extend(Extension &, Coord)
static bool inside(Coord x, Coord min, Coord max)
Rect(Coord left, Coord bottom, Coord width, Coord height, const Color *c=NULL, const Brush *b=NULL)
virtual void allocate(Canvas *, const Allocation &, Extension &)
virtual void pick(Canvas *, const Allocation &, int depth, Hit &)
virtual void request(Requisition &) const
virtual void draw(Canvas *, const Allocation &) const
virtual void request(Requisition &) const
virtual void draw(Canvas *, const Allocation &) const
Rectangle(float height, float width, bool filled=false, const Color *color=NULL, const Brush *brush=NULL)
virtual void allocate(Canvas *, const Allocation &, Extension &)
void require_x(const Requirement &)
void require(DimensionName, const Requirement &)
void require_y(const Requirement &)
virtual void unref() const
static const Color * default_foreground()
virtual void allocate(Canvas *, const Allocation &, Extension &)
virtual void request(Requisition &) const
virtual void draw(Canvas *, const Allocation &) const
Triangle(float side, bool filled=false, const Color *color=NULL, const Brush *brush=NULL)
static XYView * current_draw_view()
virtual void stroke(Canvas *, const Color *, const Brush *)
#define y_(arg)
Crout matrix decomposition : Forward/Backward substitution.