23 #ifndef _LAX_DISPLAYER_XLIB_H
24 #define _LAX_DISPLAYER_XLIB_H
26 #include <lax/anxapp.h>
27 #include <lax/vectors.h>
28 #include <lax/pancontroller.h>
29 #include <lax/panuser.h>
30 #include <lax/laxutils.h>
31 #include <lax/doublebbox.h>
32 #include <lax/laximages.h>
33 #include <lax/screencolor.h>
35 #define DISPLAYER_NO_SHEAR (1<<0)
61 virtual int Clip(Region newregion,
int append);
67 int needtobuildxpoints;
68 int maxxpoints_allocated;
75 unsigned long fgcolor,bgcolor;
87 virtual Display *GetDpy() {
return dpy; }
89 virtual Drawable GetXDrawable() {
return w; }
90 virtual GC GetGC() {
return gc; }
91 XftDraw *
textdraw(Window xlib_window);
96 virtual void SwapBuffers();
99 virtual int MakeCurrent(aDrawable *buffer);
101 virtual int CreateSurface(
int width,
int height,
int type=-1);
109 virtual unsigned long NewFG(
double r,
double g,
double b,
double a=1.0);
110 virtual unsigned long NewFG(
unsigned long ncol);
111 virtual unsigned long NewFG(ScreenColor *col);
112 virtual unsigned long NewFG(
int r,
int g,
int b,
int a=255);
113 virtual unsigned long NewBG(
double r,
double g,
double b);
114 virtual unsigned long NewBG(
int r,
int g,
int b);
115 virtual unsigned long NewBG(
unsigned long nc);
116 virtual unsigned long FG() {
return fgcolor; }
117 virtual unsigned long BG() {
return bgcolor; }
118 virtual void LineAttributes(
double width,
int dash,
int cap,
int join);
133 virtual void PushClip(
int startfresh);
141 virtual void DrawOnMask();
142 virtual void DrawOnSrc();
145 virtual void fill(
int preserve);
146 virtual void stroke(
int preserve);
153 virtual void drawpoint(
double x,
double y,
double radius,
int fill);
156 virtual void drawline(
double ax,
double ay,
double bx,
double by);
160 virtual int font(LaxFont *nfont,
double size=-1);
161 virtual int font(
const char *fontconfigpattern);
162 virtual int font(
const char *family,
const char *style,
double pixelsize);
163 virtual int fontsize(
double size);
164 virtual double textextent(LaxFont *thisfont,
const char *str,
int len,
double *width,
double *height,
double *ascent,
double *descent,
char real);
165 virtual double textout_line(
double x,
double y,
const char *str,
int len=0,
unsigned long align=LAX_CENTER);
166 virtual double textout(
double x,
double y,
const char *str,
int len=0,
unsigned long align=LAX_CENTER);
167 virtual double textout(
double *matrix,
double x,
double y,
const char *str,
int len=0,
unsigned long align=LAX_CENTER);
168 virtual double textout(
double angle,
double x,
double y,
const char *str,
int len=0,
unsigned long align=LAX_CENTER);
171 virtual int imageout(LaxImage *image,
double x,
double y,
double w,
double h);
172 virtual void imageout(LaxImage *img,
double x,
double y);
173 virtual void imageout(LaxImage *img,
double *matrix);
174 virtual void imageout(LaxImage *img,
double angle,
double x,
double y);
175 virtual void imageout_rotated(LaxImage *img,
double x,
double y,
double ulx,
double uly);
176 virtual void imageout_skewed(LaxImage *img,
double ulx,
double uly,
double urx,
double ury,
double llx,
double lly);
181 virtual double *
m() {
return ctm; }
182 virtual const double *Getctm() {
return ctm; }
183 virtual const double *Getictm() {
return ictm; }
187 virtual void ShiftReal(
double dx,
double dy);
189 virtual void NewTransform(
double a,
double b,
double c,
double d,
double x0,
double y0);
195 virtual void Rotate(
double angle,
int x,
int y,
int dec=1);
196 virtual void Newmag(
double xs,
double ys=-1);
198 virtual void Zoom(
double m,
int x,
int y);
199 virtual void Zoom(
double m);
200 virtual double Getmag(
int c=0);
201 virtual double GetVMag(
int x,
int y);