diff options
author | lecoanet | 2001-10-12 07:16:49 +0000 |
---|---|---|
committer | lecoanet | 2001-10-12 07:16:49 +0000 |
commit | 687abcd3214f880b152686a6a5e8567ee73c9812 (patch) | |
tree | 3958031c19c6eb558a44e5967d28eea8dc0721e0 /generic/Draw.h | |
parent | 4859abd118efbeb20d132db7ffcbd43a10c41da6 (diff) | |
download | tkzinc-687abcd3214f880b152686a6a5e8567ee73c9812.zip tkzinc-687abcd3214f880b152686a6a5e8567ee73c9812.tar.gz tkzinc-687abcd3214f880b152686a6a5e8567ee73c9812.tar.bz2 tkzinc-687abcd3214f880b152686a6a5e8567ee73c9812.tar.xz |
Ajout des prototypes des nouvelles fonctions GL.
Suppression des routines de remplissage des gradients en X.
Diffstat (limited to 'generic/Draw.h')
-rw-r--r-- | generic/Draw.h | 80 |
1 files changed, 74 insertions, 6 deletions
diff --git a/generic/Draw.h b/generic/Draw.h index 99e1b48..1161273 100644 --- a/generic/Draw.h +++ b/generic/Draw.h @@ -44,11 +44,11 @@ #define STRAIGHT_POINTS 2 #define LINE_SHAPE_POINTS 4 /* Maximum of all above */ - struct _WidgetInfo; +struct _ImageBits; -void SetLineStyle(Display *display, GC gc, LineStyle line_style); +void SetLineStyle(struct _WidgetInfo *wi, LineStyle line_style); void GetLineShape(ZnPoint *p1, ZnPoint *p2, unsigned int line_width, LineShape shape, ZnBBox *bbox, ZnList to_points); void DrawLineShape(struct _WidgetInfo *wi, ZnPoint *points, int num_points, @@ -66,11 +66,79 @@ void DrawRectangleRelief(struct _WidgetInfo *wi, void DrawPolygonRelief(struct _WidgetInfo *wi, ReliefStyle relief, ZnGradient *gradient, ZnPoint *points, int num_points, int line_width); -void DrawRectangleGradient(struct _WidgetInfo *wi, ZnGradient *gradient, - XRectangle *bbox); -void DrawPolygonGradient(struct _WidgetInfo *wi, ZnGradient *gradient, - ZnPoly *poly, ZnBBox *bbox); +#ifdef GLX +void RenderPolygonRelief(struct _WidgetInfo *wi, ReliefStyle relief, + ZnGradient *gradient, int alpha, ZnBool smooth, + ZnPoint *points, int num_points, int line_width); +void RenderGradient(struct _WidgetInfo *wi, ZnGradient *gradient, + void cb(void *), void *closure, ZnPoint *quad); +void RenderTile(struct _WidgetInfo *wi, struct _ImageBits *tile, + ZnGradient *gradient, void cb(void *), void *closure, + ZnPoint *quad); +void RenderImage(struct _WidgetInfo *wi, struct _ImageBits *image, + XColor *color, int alpha, ZnPoint *origin); +void RenderHollowDot(struct _WidgetInfo *wi, ZnPoint *p, ZnReal size); +#endif + +#ifdef GLX +/* Copyright (c) Mark J. Kilgard, 1997. */ + +/* This program is freely distributable without licensing fees and is + provided without guarantee or warrantee expressed or implied. This + program is -not- in the public domain. */ + +#include <GL/gl.h> + +typedef struct { + unsigned short c; /* Potentially support 16-bit glyphs. */ + unsigned char width; + unsigned char height; + signed char xoffset; + signed char yoffset; + signed char advance; + char dummy; /* Space holder for alignment reasons. */ + short x; + short y; +} TexGlyphInfo; + +typedef struct { + GLfloat t0[2]; + GLshort v0[2]; + GLfloat t1[2]; + GLshort v1[2]; + GLfloat t2[2]; + GLshort v2[2]; + GLfloat t3[2]; + GLshort v3[2]; + GLfloat advance; +} TexGlyphVertexInfo; + +typedef struct { + GLuint texobj; + int tex_width; + int tex_height; + int max_ascent; + int max_descent; + int num_glyphs; + int min_glyph; + int range; + unsigned char *teximage; + TexGlyphInfo *tgi; + TexGlyphVertexInfo *tgvi; + TexGlyphVertexInfo **lut; +} TexFont; + +extern void txfRenderGlyph(TexFont */* txf */, + int /* c */); + +extern void txfRenderString(TexFont */* txf */, + unsigned char */* string */, + int /* len */); +extern void txfRenderFancyString(TexFont */* txf */, + unsigned char */* string */, + int /* len */); +#endif #endif /* _Draw_h */ |