# GFX/DRAW.D # public method void Frame.drawPoint(int x, int y) { this.xDrawPoint(this.xid, this.pen->gcid, this.wpos.x + x, this.wpos.y + y); this.last_draw.x = x; this.last_draw.y = y; } public method void Frame.drawLine(int sx, int sy, int dx, int dy) { this.xDrawLine(this.xid, this.pen->gcid, this.wpos.x + sx, this.wpos.y + sy, this.wpos.x + dx, this.wpos.y + dy); this.last_draw.x = dx; this.last_draw.y = dy; } public method void Frame.drawLineTo(int dx, int dy) { this.xDrawLine(this.xid, this.pen->gcid, this.wpos.x + this.last_draw.x, this.wpos.y + this.last_draw.y, this.wpos.x + dx, this.wpos.y + dy); this.last_draw.x = dx; this.last_draw.y = dy; } public method void Frame.drawRect(int sx, int sy, int w, int h) { this.xDrawRect(this.xid, this.pen->gcid, this.wpos.x + sx, this.wpos.y + sy, w, h); this.last_draw.x = sx + w; this.last_draw.y = sy + h; } public method void Frame.drawText(int x, int y, const char *buf, int len) { this.xDrawString(this.xid, this.pen->gcid, this.wpos.x + x, this.wpos.y + y, buf, len); this.last_draw.x = x + this.xTextWidth(this.pen->fontid, buf, len); this.last_draw.y = y; } public method int Frame.textWidth(const char *buf, int len) { return(this.xTextWidth(this.pen->fontid, buf, len)); } public method int Frame.drawShadowedBorder(int sx, int sy, int w, int h, Pen @pen1, Pen @pen2) { this.pen = pen1; this.drawLine(sx, sy, sx + w - 2, sy); this.drawLine(sx, sy + 1, sx + w - 3, sy + 1); this.drawLine(sx, sy, sx, sy + h - 1); this.drawLine(sx + 1, sy, sx + 1, sy + h - 2); this.pen = pen2; this.drawLine(sx + 1, sy + h - 1, sx + w - 1, sy + h - 1); this.drawLine(sx + 2, sy + h - 2, sx + w - 1, sy + h - 2); this.drawLine(sx + w - 1, sy, sx + w - 1, sy + h - 1); this.drawLine(sx + w - 2, sy + 1, sx + w - 2, sy + h - 1); }