.TH DRAW 2.SH NAMEImage, draw, gendraw, drawreplxy, drawrepl,replclipr, line, poly, fillpoly, bezier, bezspline, fillbezier, fillbezspline, ellipse,fillellipse, arc, fillarc, icossin, icossin2, border, string, stringn,runestring, runestringn, stringbg, stringnbg, runestringbg,runestringnbg, _string, ARROW, drawsetdebug \- graphics functions.de PB.PP.ft L.nf...SH SYNOPSIS.de PB.PP.ft L.nf...PB#include <u.h>#include <libc.h>#include <draw.h>.PBtypedefstruct Image{ Display *display; /* display holding data */ int id; /* id of system-held Image */ Rectangle r; /* rectangle in data area, local coords */ Rectangle clipr; /* clipping region */ ulong chan; /* pixel channel format descriptor */ int depth; /* number of bits per pixel */ int repl; /* flag: data replicates to tile clipr */ Screen *screen; /* 0 if not a window */ Image *next; /* next in list of windows */} Image;.PBtypedef enum{ /* Porter-Duff compositing operators */ Clear = 0,.sp 0.1 SinD = 8, DinS = 4, SoutD = 2, DoutS = 1,.sp 0.1 S = SinD|SoutD, SoverD = SinD|SoutD|DoutS, SatopD = SinD|DoutS, SxorD = SoutD|DoutS,.sp 0.1 D = DinS|DoutS, DoverS = DinS|DoutS|SoutD, DatopS = DinS|SoutD, DxorS = DoutS|SoutD, /* == SxorD */.sp 0.1 Ncomp = 12,} Drawop;.PB.PD 0.ta +\w'\fL 'u +\w'\fL 'u +6n +4nvoid draw(Image *dst, Rectangle r, Image *src, Image *mask, Point p).PBvoid drawop(Image *dst, Rectangle r, Image *src, Image *mask, Point p, Drawop op).PBvoid gendraw(Image *dst, Rectangle r, Image *src, Point sp, Image *mask, Point mp).PBvoid gendrawop(Image *dst, Rectangle r, Image *src, Point sp, Image *mask, Point mp, Drawop op).PBint drawreplxy(int min, int max, int x).PBPoint drawrepl(Rectangle r, Point p).PBvoid replclipr(Image *i, int repl, Rectangle clipr).PBvoid line(Image *dst, Point p0, Point p1, int end0, int end1, int radius, Image *src, Point sp).PBvoid lineop(Image *dst, Point p0, Point p1, int end0, int end1, int radius, Image *src, Point sp, Drawop op).PBvoid poly(Image *dst, Point *p, int np, int end0, int end1, int radius, Image *src, Point sp).PBvoid polyop(Image *dst, Point *p, int np, int end0, int end1, int radius, Image *src, Point sp, Drawop op).PBvoid fillpoly(Image *dst, Point *p, int np, int wind, Image *src, Point sp).PBvoid fillpolyop(Image *dst, Point *p, int np, int wind, Image *src, Point sp, Drawop op).PBint bezier(Image *dst, Point p0, Point p1, Point p2, Point p3, int end0, int end1, int radius, Image *src, Point sp).PBint bezierop(Image *dst, Point p0, Point p1, Point p2, Point p3, int end0, int end1, int radius, Image *src, Point sp, Drawop op).PBint bezspline(Image *dst, Point *pt, int npt, int end0, int end1, int radius, Image *src, Point sp).PBint bezsplineop(Image *dst, Point *pt, int npt, int end0, int end1, int radius, Image *src, Point sp, Drawop op).PBint bezsplinepts(Point *pt, int npt, Point **pp).PBint fillbezier(Image *dst, Point p0, Point p1, Point p2, Point p3, int w, Image *src, Point sp).PBint fillbezierop(Image *dst, Point p0, Point p1, Point p2, Point p3, int w, Image *src, Point sp, Drawop op).PBint fillbezspline(Image *dst, Point *pt, int npt, int w, Image *src, Point sp).PBint fillbezsplineop(Image *dst, Point *pt, int npt, int w, Image *src, Point sp, Drawop op).PBvoid ellipse(Image *dst, Point c, int a, int b, int thick, Image *src, Point sp).PBvoid ellipseop(Image *dst, Point c, int a, int b, int thick, Image *src, Point sp, Drawop op).PBvoid fillellipse(Image *dst, Point c, int a, int b, Image *src, Point sp).PBvoid fillellipseop(Image *dst, Point c, int a, int b, Image *src, Point sp, Drawop op).PBvoid arc(Image *dst, Point c, int a, int b, int thick, Image *src, Point sp, int alpha, int phi).PBvoid arcop(Image *dst, Point c, int a, int b, int thick, Image *src, Point sp, int alpha, int phi, Drawop op).PBvoid fillarc(Image *dst, Point c, int a, int b, Image *src, Point sp, int alpha, int phi).PBvoid fillarcop(Image *dst, Point c, int a, int b, Image *src, Point sp, int alpha, int phi, Drawop op).PBint icossin(int deg, int *cosp, int *sinp).PBint icossin2(int x, int y, int *cosp, int *sinp).PBvoid border(Image *dst, Rectangle r, int i, Image *color, Point sp).br.PBPoint string(Image *dst, Point p, Image *src, Point sp, Font *f, char *s).PBPoint stringop(Image *dst, Point p, Image *src, Point sp, Font *f, char *s, Drawop op).PBPoint stringn(Image *dst, Point p, Image *src, Point sp, Font *f, char *s, int len).PBPoint stringnop(Image *dst, Point p, Image *src, Point sp, Font *f, char *s, int len, Drawop op).PBPoint runestring(Image *dst, Point p, Image *src, Point sp, Font *f, Rune *r).PBPoint runestringop(Image *dst, Point p, Image *src, Point sp, Font *f, Rune *r, Drawop op).PBPoint runestringn(Image *dst, Point p, Image *src, Point sp, Font *f, Rune *r, int len).PBPoint runestringnop(Image *dst, Point p, Image *src, Point sp, Font *f, Rune *r, int len, Drawop op).PBPoint stringbg(Image *dst, Point p, Image *src, Point sp, Font *f, char *s, Image *bg, Point bgp).PBPoint stringbgop(Image *dst, Point p, Image *src, Point sp, Font *f, char *s, Image *bg, Point bgp, Drawop op).PBPoint stringnbg(Image *dst, Point p, Image *src, Point sp, Font *f, char *s, int len, Image *bg, Point bgp).PBPoint stringnbgop(Image *dst, Point p, Image *src, Point sp, Font *f, char *s, int len, Image *bg, Point bgp, Drawop op).PBPoint runestringbg(Image *dst, Point p, Image *src, Point sp, Font *f, Rune *r, Image *bg, Point bgp).PBPoint runestringbgop(Image *dst, Point p, Image *src, Point sp, Font *f, Rune *r, Image *bg, Point bgp, Drawop op).PBPoint runestringnbg(Image *dst, Point p, Image *src, Point sp, Font *f, Rune *r, int len, Image *bg, Point bgp).PBPoint runestringnbgop(Image *dst, Point p, Image *src, Point sp, Font *f, Rune *r, int len, Image *bg, Point bgp, Drawop op).PBPoint _string(Image *dst, Point p, Image *src, Point sp, Font *f, char *s, Rune *r, int len, Rectangle clipr, Image *bg, Point bgp, Drawop op).PBvoid drawsetdebug(int on).PD.PBenum{ /* line ends */ Endsquare = 0, Enddisc = 1, Endarrow = 2, Endmask = 0x1F};.PB#define ARROW(a, b, c) (Endarrow|((a)<<5)|((b)<<14)|((c)<<23)).SH DESCRIPTIONThe.B Imagetype defines rectangular pictures and the methods to draw upon them;it is also the building block for higher level objects such aswindows and fonts.In particular, a window is represented as an.BR Image ;no special operators are needed to draw on a window..PP.TP 10.B rThe coordinates of the rectangle in the plane for which the.B Imagehas defined pixel values.It should not be modified after the image is created..TP.B cliprThe clipping rectangle: operations that read or writethe image will not access pixels outside.BR clipr .Frequently,.B clipris the same as.BR r ,but it may differ; see in particular the discussion of.BR repl .The clipping region may be modified dynamically using.I replclipr.RI ( q.v. )..TP.B chanThe pixel channel format descriptor, as described in.IR image (6).The value should not be modified after the image is created..TP.B depthThenumber of bits per pixel in the picture;it is identically.B chantodepth(chan)(see.IR graphics (2))and is provided as a convenience.The value should not be modified after the image is created..TP.B replA boolean value specifying whether the image is tiled to coverthe plane when used as a source for a drawing operation.If.B replis zero, operations are restricted to the intersection of.B rand.BR clipr .If.B replis set,.B rdefines the tile to be replicated and.B cliprdefines the portion of the plane covered by the tiling, in other words,.B ris replicated to cover.BR clipr ;in such cases.B rand.B cliprare independent..IPFor example, a replicated image with.B rset to ((0,\ 0),\ (1,\ 1)) and.B cliprset to ((0,\ 0),\ (100,\ 100)),with the single pixel of.B rset to blue,behaves identically to an image with.B rand.B cliprboth set to ((0,\ 0),\ (100,\ 100)) and all pixels set to blue.However,the first image requires far less memory.The replication flag may be modified dynamically using.I replclipr.RI ( q.v. )..PPMost of the drawing functions come in two forms:a basic form, and an extended form that takes an extra.B Drawopto specify a Porter-Duff compositing operator to use.The basic forms assume the operator is.BR SoverD ,which suffices for the vast majority of applications.The extended forms are named by adding an.RB - opsuffix to the basic form.Only the basic forms are listed below..TP.BI draw( dst\fP,\fP\ r\fP,\fP\ src\fP,\fP\ mask\fP,\fP\ p ).I Drawis the standard drawing function.Only those pixels within the intersection of.IB dst ->rand.IB dst ->cliprwill be affected;.I drawignores.IB dst ->repl\fR.The operation proceeds as follows(this is a description of the behavior, not the implementation):.RS.IP 1.If.B replis set in.I srcor.IR mask ,replicate their contents to filltheir clip rectangles..IP 2.Translate.I srcand.I maskso.I pis aligned with.IB r .min\fR..IP 3.Set.I rto the intersection of.I rand.IB dst ->r\fR..IP 4.Intersect.I rwith.IB src ->clipr\fR.If.IB src ->replis false, also intersect.I rwith.IB src ->r\fR..IP 5.Intersect.I rwith.IB mask ->clipr\fR.If.IB mask ->replis false, also intersect.I rwith.IB mask ->r\fR..IP 6.For each location in.IR r ,combine the.I dstpixel with the.I srcpixel using the alpha valuecorresponding to the.I maskpixel.If the.I maskhas an explicit alpha channel, the alpha valuecorresponding to the.I maskpixel is simply that pixel's alpha channel.Otherwise, the alpha value is the NTSC greyscale equivalentof the color value, with white meaning opaque and black transparent.In terms of the Porter-Duff compositing algebra,.I drawreplaces the.I dstpixels with.RI ( srcin.IR mask )over.IR dst .(In the extended form,``over'' is replaced by.IR op )..RE.IPThe variouspixel channel formatsinvolved need not be identical.If the channels involved are smaller than 8-bits, they willbe promoted before the calculation by replicating the extant bits;after the calculation, they will be truncated to their proper sizes..TP\f5gendraw(\f2dst\fP, \f2r\fP, \f2src\fP, \f2p0\fP, \f2mask\fP, \f2p1\f5)\fPSimilar to.I drawexcept that.I gendrawaligns the source and mask differently:.I srcis aligned so.I p0corresponds to.IB r .minand.I maskis aligned so.I p1corresponds to.IB r .min .For most purposes with simple masks and source images,.B drawis sufficient, but.B gendrawis the general operator and the one all other drawing primitives are built upon..TP.BI drawreplxy( min , max , x\f5)Clips.I xto be in the half-open interval [\fImin\fP, \fImax\fP) by addingor subtracting a multiple of \fImax-min\fP..TP.BI drawrepl( r , p )Clips the point \fIp\fP to be within the rectangle \fIr\fPby translating the point horizontally by an integer multiple of rectangle widthand vertically by the height..TP.BI replclipr( i , repl , clipr\f5)Because the image data is stored on the server, local modifications to the.B Imagedata structure itself will have no effect..I Repcliprmodifies the local.B Imagedata structure's.B repland.B cliprfields, and notifies the server of their modification..TP\f5line(\f2dst\fP, \f2p0\fP, \f2p1\fP, \f2end0\fP, \f2end1\fP, \f2thick\fP, \f2src\fP, \f2sp\fP)Linedraws in.I dsta line of width.RI 1+2* thickpixels joining points.I p0and.IR p1 .The line is drawn using pixels from the.I srcimage aligned so.I spin the source corresponds to.I p0in the destination.The line touches both.I p0and.IR p1 ,and.I end0and.I end1specify how the ends of the line are drawn..B Endsquareterminates the line perpendicularly to the direction of the line; a thick line withLines 1–500 of 821. Load more
.TH DRAW 2 .SH NAME Image, draw, gendraw, drawreplxy, drawrepl, replclipr, line, poly, fillpoly, bezier, bezspline, fillbezier, fillbezspline, ellipse, fillellipse, arc, fillarc, icossin, icossin2, border, string, stringn, runestring, runestringn, stringbg, stringnbg, runestringbg, runestringnbg, _string, ARROW, drawsetdebug \- graphics functions .de PB .PP .ft L .nf .. .SH SYNOPSIS .de PB .PP .ft L .nf .. .PB #include <u.h> #include <libc.h> #include <draw.h> .PB typedef struct Image { Display *display; /* display holding data */ int id; /* id of system-held Image */ Rectangle r; /* rectangle in data area, local coords */ Rectangle clipr; /* clipping region */ ulong chan; /* pixel channel format descriptor */ int depth; /* number of bits per pixel */ int repl; /* flag: data replicates to tile clipr */ Screen *screen; /* 0 if not a window */ Image *next; /* next in list of windows */ } Image; .PB typedef enum { /* Porter-Duff compositing operators */ Clear = 0, .sp 0.1 SinD = 8, DinS = 4, SoutD = 2, DoutS = 1, .sp 0.1 S = SinD|SoutD, SoverD = SinD|SoutD|DoutS, SatopD = SinD|DoutS, SxorD = SoutD|DoutS, .sp 0.1 D = DinS|DoutS, DoverS = DinS|DoutS|SoutD, DatopS = DinS|SoutD, DxorS = DoutS|SoutD, /* == SxorD */ .sp 0.1 Ncomp = 12, } Drawop; .PB .PD 0 .ta +\w'\fL 'u +\w'\fL 'u +6n +4n void draw(Image *dst, Rectangle r, Image *src, Image *mask, Point p) .PB void drawop(Image *dst, Rectangle r, Image *src, Image *mask, Point p, Drawop op) .PB void gendraw(Image *dst, Rectangle r, Image *src, Point sp, Image *mask, Point mp) .PB void gendrawop(Image *dst, Rectangle r, Image *src, Point sp, Image *mask, Point mp, Drawop op) .PB int drawreplxy(int min, int max, int x) .PB Point drawrepl(Rectangle r, Point p) .PB void replclipr(Image *i, int repl, Rectangle clipr) .PB void line(Image *dst, Point p0, Point p1, int end0, int end1, int radius, Image *src, Point sp) .PB void lineop(Image *dst, Point p0, Point p1, int end0, int end1, int radius, Image *src, Point sp, Drawop op) .PB void poly(Image *dst, Point *p, int np, int end0, int end1, int radius, Image *src, Point sp) .PB void polyop(Image *dst, Point *p, int np, int end0, int end1, int radius, Image *src, Point sp, Drawop op) .PB void fillpoly(Image *dst, Point *p, int np, int wind, Image *src, Point sp) .PB void fillpolyop(Image *dst, Point *p, int np, int wind, Image *src, Point sp, Drawop op) .PB int bezier(Image *dst, Point p0, Point p1, Point p2, Point p3, int end0, int end1, int radius, Image *src, Point sp) .PB int bezierop(Image *dst, Point p0, Point p1, Point p2, Point p3, int end0, int end1, int radius, Image *src, Point sp, Drawop op) .PB int bezspline(Image *dst, Point *pt, int npt, int end0, int end1, int radius, Image *src, Point sp) .PB int bezsplineop(Image *dst, Point *pt, int npt, int end0, int end1, int radius, Image *src, Point sp, Drawop op) .PB int bezsplinepts(Point *pt, int npt, Point **pp) .PB int fillbezier(Image *dst, Point p0, Point p1, Point p2, Point p3, int w, Image *src, Point sp) .PB int fillbezierop(Image *dst, Point p0, Point p1, Point p2, Point p3, int w, Image *src, Point sp, Drawop op) .PB int fillbezspline(Image *dst, Point *pt, int npt, int w, Image *src, Point sp) .PB int fillbezsplineop(Image *dst, Point *pt, int npt, int w, Image *src, Point sp, Drawop op) .PB void ellipse(Image *dst, Point c, int a, int b, int thick, Image *src, Point sp) .PB void ellipseop(Image *dst, Point c, int a, int b, int thick, Image *src, Point sp, Drawop op) .PB void fillellipse(Image *dst, Point c, int a, int b, Image *src, Point sp) .PB void fillellipseop(Image *dst, Point c, int a, int b, Image *src, Point sp, Drawop op) .PB void arc(Image *dst, Point c, int a, int b, int thick, Image *src, Point sp, int alpha, int phi) .PB void arcop(Image *dst, Point c, int a, int b, int thick, Image *src, Point sp, int alpha, int phi, Drawop op) .PB void fillarc(Image *dst, Point c, int a, int b, Image *src, Point sp, int alpha, int phi) .PB void fillarcop(Image *dst, Point c, int a, int b, Image *src, Point sp, int alpha, int phi, Drawop op) .PB int icossin(int deg, int *cosp, int *sinp) .PB int icossin2(int x, int y, int *cosp, int *sinp) .PB void border(Image *dst, Rectangle r, int i, Image *color, Point sp) .br .PB Point string(Image *dst, Point p, Image *src, Point sp, Font *f, char *s) .PB Point stringop(Image *dst, Point p, Image *src, Point sp, Font *f, char *s, Drawop op) .PB Point stringn(Image *dst, Point p, Image *src, Point sp, Font *f, char *s, int len) .PB Point stringnop(Image *dst, Point p, Image *src, Point sp, Font *f, char *s, int len, Drawop op) .PB Point runestring(Image *dst, Point p, Image *src, Point sp, Font *f, Rune *r) .PB Point runestringop(Image *dst, Point p, Image *src, Point sp, Font *f, Rune *r, Drawop op) .PB Point runestringn(Image *dst, Point p, Image *src, Point sp, Font *f, Rune *r, int len) .PB Point runestringnop(Image *dst, Point p, Image *src, Point sp, Font *f, Rune *r, int len, Drawop op) .PB Point stringbg(Image *dst, Point p, Image *src, Point sp, Font *f, char *s, Image *bg, Point bgp) .PB Point stringbgop(Image *dst, Point p, Image *src, Point sp, Font *f, char *s, Image *bg, Point bgp, Drawop op) .PB Point stringnbg(Image *dst, Point p, Image *src, Point sp, Font *f, char *s, int len, Image *bg, Point bgp) .PB Point stringnbgop(Image *dst, Point p, Image *src, Point sp, Font *f, char *s, int len, Image *bg, Point bgp, Drawop op) .PB Point runestringbg(Image *dst, Point p, Image *src, Point sp, Font *f, Rune *r, Image *bg, Point bgp) .PB Point runestringbgop(Image *dst, Point p, Image *src, Point sp, Font *f, Rune *r, Image *bg, Point bgp, Drawop op) .PB Point runestringnbg(Image *dst, Point p, Image *src, Point sp, Font *f, Rune *r, int len, Image *bg, Point bgp) .PB Point runestringnbgop(Image *dst, Point p, Image *src, Point sp, Font *f, Rune *r, int len, Image *bg, Point bgp, Drawop op) .PB Point _string(Image *dst, Point p, Image *src, Point sp, Font *f, char *s, Rune *r, int len, Rectangle clipr, Image *bg, Point bgp, Drawop op) .PB void drawsetdebug(int on) .PD .PB enum { /* line ends */ Endsquare = 0, Enddisc = 1, Endarrow = 2, Endmask = 0x1F }; .PB #define ARROW(a, b, c) (Endarrow|((a)<<5)|((b)<<14)|((c)<<23)) .SH DESCRIPTION The .B Image type defines rectangular pictures and the methods to draw upon them; it is also the building block for higher level objects such as windows and fonts. In particular, a window is represented as an .BR Image ; no special operators are needed to draw on a window. .PP .TP 10 .B r The coordinates of the rectangle in the plane for which the .B Image has defined pixel values. It should not be modified after the image is created. .TP .B clipr The clipping rectangle: operations that read or write the image will not access pixels outside .BR clipr . Frequently, .B clipr is the same as .BR r , but it may differ; see in particular the discussion of .BR repl . The clipping region may be modified dynamically using .I replclipr .RI ( q.v. ). .TP .B chan The pixel channel format descriptor, as described in .IR image (6). The value should not be modified after the image is created. .TP .B depth The number of bits per pixel in the picture; it is identically .B chantodepth(chan) (see .IR graphics (2)) and is provided as a convenience. The value should not be modified after the image is created. .TP .B repl A boolean value specifying whether the image is tiled to cover the plane when used as a source for a drawing operation. If .B repl is zero, operations are restricted to the intersection of .B r and .BR clipr . If .B repl is set, .B r defines the tile to be replicated and .B clipr defines the portion of the plane covered by the tiling, in other words, .B r is replicated to cover .BR clipr ; in such cases .B r and .B clipr are independent. .IP For example, a replicated image with .B r set to ((0,\ 0),\ (1,\ 1)) and .B clipr set to ((0,\ 0),\ (100,\ 100)), with the single pixel of .B r set to blue, behaves identically to an image with .B r and .B clipr both set to ((0,\ 0),\ (100,\ 100)) and all pixels set to blue. However, the first image requires far less memory. The replication flag may be modified dynamically using .I replclipr .RI ( q.v. ). .PP Most of the drawing functions come in two forms: a basic form, and an extended form that takes an extra .B Drawop to specify a Porter-Duff compositing operator to use. The basic forms assume the operator is .BR SoverD , which suffices for the vast majority of applications. The extended forms are named by adding an .RB - op suffix to the basic form. Only the basic forms are listed below. .TP .BI draw( dst\fP,\fP\ r\fP,\fP\ src\fP,\fP\ mask\fP,\fP\ p ) .I Draw is the standard drawing function. Only those pixels within the intersection of .IB dst ->r and .IB dst ->clipr will be affected; .I draw ignores .IB dst ->repl\fR. The operation proceeds as follows (this is a description of the behavior, not the implementation): .RS .IP 1. If .B repl is set in .I src or .IR mask , replicate their contents to fill their clip rectangles. .IP 2. Translate .I src and .I mask so .I p is aligned with .IB r .min\fR. .IP 3. Set .I r to the intersection of .I r and .IB dst ->r\fR. .IP 4. Intersect .I r with .IB src ->clipr\fR. If .IB src ->repl is false, also intersect .I r with .IB src ->r\fR. .IP 5. Intersect .I r with .IB mask ->clipr\fR. If .IB mask ->repl is false, also intersect .I r with .IB mask ->r\fR. .IP 6. For each location in .IR r , combine the .I dst pixel with the .I src pixel using the alpha value corresponding to the .I mask pixel. If the .I mask has an explicit alpha channel, the alpha value corresponding to the .I mask pixel is simply that pixel's alpha channel. Otherwise, the alpha value is the NTSC greyscale equivalent of the color value, with white meaning opaque and black transparent. In terms of the Porter-Duff compositing algebra, .I draw replaces the .I dst pixels with .RI ( src in .IR mask ) over .IR dst . (In the extended form, ``over'' is replaced by .IR op ). .RE .IP The various pixel channel formats involved need not be identical. If the channels involved are smaller than 8-bits, they will be promoted before the calculation by replicating the extant bits; after the calculation, they will be truncated to their proper sizes. .TP \f5gendraw(\f2dst\fP, \f2r\fP, \f2src\fP, \f2p0\fP, \f2mask\fP, \f2p1\f5)\fP Similar to .I draw except that .I gendraw aligns the source and mask differently: .I src is aligned so .I p0 corresponds to .IB r .min and .I mask is aligned so .I p1 corresponds to .IB r .min . For most purposes with simple masks and source images, .B draw is sufficient, but .B gendraw is the general operator and the one all other drawing primitives are built upon. .TP .BI drawreplxy( min , max , x\f5) Clips .I x to be in the half-open interval [\fImin\fP, \fImax\fP) by adding or subtracting a multiple of \fImax-min\fP. .TP .BI drawrepl( r , p ) Clips the point \fIp\fP to be within the rectangle \fIr\fP by translating the point horizontally by an integer multiple of rectangle width and vertically by the height. .TP .BI replclipr( i , repl , clipr\f5) Because the image data is stored on the server, local modifications to the .B Image data structure itself will have no effect. .I Repclipr modifies the local .B Image data structure's .B repl and .B clipr fields, and notifies the server of their modification. .TP \f5line(\f2dst\fP, \f2p0\fP, \f2p1\fP, \f2end0\fP, \f2end1\fP, \f2thick\fP, \f2src\fP, \f2sp\fP) Line draws in .I dst a line of width .RI 1+2* thick pixels joining points .I p0 and .IR p1 . The line is drawn using pixels from the .I src image aligned so .I sp in the source corresponds to .I p0 in the destination. The line touches both .I p0 and .IR p1 , and .I end0 and .I end1 specify how the ends of the line are drawn. .B Endsquare terminates the line perpendicularly to the direction of the line; a thick line with