100+ results for 'XDrawLine'

Not the results you expected?

X11Gui.h (https://github.com/heather162/scummvm.git) C Header · 327 lines

284 for ( unsigned i = 1; i < _testsDone; ++ i ) {

285 int x = (_width * i) / _numTotalTests;

286 XDrawLine( _display, _window, _gc, x, 0, x, _height);

287 }

288 }

XMX_grid.c (https://github.com/clothbot/Alliance-VLSI-CAD-System.git) C · 310 lines

290 ( PixelY >= GraphicY1 ) )

291 {

292 XDrawLine( XvpnGraphicDisplay,

293 XtWindow( XvpnGraphicWindow ),

294 XvpnGridGC,

296 PixelX + 2, PixelY );

297

298 XDrawLine( XvpnGraphicDisplay,

299 XtWindow( XvpnGraphicWindow ),

300 XvpnGridGC,

gui.sc (git://github.com/qobi/R6RS-AD.git) Scala · 163 lines

145 (for-each (lambda (l)

146 (let ((l (line-segment-3d->2d l)))

147 (xdrawline *display* *display-pane* *thin-gc*

148 (+ 320 (x (line-segment-p l)))

149 (- 240 (y (line-segment-p l)))

scrollbar-rxvt.c (https://gitlab.com/Jehan_ZeMarmot/mrxvt) C · 271 lines

80 /* draw base */

81 CHOOSE_GC_FG (r, (dirn == UP) ? bot : top);

82 XDrawLine(r->Xdisplay, r->scrollBar.win, r->scrollBar.gc,

83 pt[0].x, pt[0].y, pt[1].x, pt[1].y);

84

87 pt[1].y = y + (dirn == UP ? 0 : sz - 1);

88 CHOOSE_GC_FG (r, top);

89 XDrawLine(r->Xdisplay, r->scrollBar.win, r->scrollBar.gc,

90 pt[0].x, pt[0].y, pt[1].x, pt[1].y);

91

101 }

102 CHOOSE_GC_FG (r, top);

103 XDrawLine(r->Xdisplay, r->scrollBar.win, r->scrollBar.gc,

104 pt[0].x, pt[0].y, pt[1].x, pt[1].y);

105 #endif

ShapeWidg.c (git://pkgs.fedoraproject.org/nx) C · 252 lines

139 {

140 rad = width >> 1;

141 XDrawLine(dpy, p, gc, rad, rad, rad, height - rad - 1);

142 }

143 else

144 {

145 rad = height >> 1;

146 XDrawLine(dpy, p, gc, rad, rad, width - rad - 1, rad);

147 }

148 XShapeCombineMask(dpy, XtWindow(w), ShapeBounding,

159 {

160 rad = w->core.width >> 1;

161 XDrawLine(dpy, p, gc, rad, rad, rad, w->core.height - rad - 1);

162 }

163 else

scrollbar-xterm.c (git://pkgs.fedoraproject.org/mrxvt) C · 168 lines

156

157 CHOOSE_GC_FG(r, r->scrollBar.xterm_shadow);

158 XDrawLine(r->Xdisplay, r->scrollBar.win, r->scrollBar.gc,

159 xsb ? r->sb_shadow : r->sb_shadow + sbwidth, r->scrollBar.beg,

160 xsb ? r->sb_shadow : r->sb_shadow + sbwidth, r->scrollBar.end);

pango_x.cpp (https://bitbucket.org/lennonchan/cafu.git) C++ · 294 lines

156 if (uline == PANGO_UNDERLINE_SINGLE)

157 {

158 XDrawLine( wxGlobalDisplay(), drawable, gc,

159 x + (x_off + ink_rect.x) / PANGO_SCALE - 1,

160 risen_y + 1,

dialogs.pp (https://bitbucket.org/Alchemist197/elektronika-osnovnoe.git) Puppet · 217 lines

82 if vl_b then begin

83 XSetForeGround(prDisplay, GC, Colors[ColB]);

84 XDrawLine(prDisplay, Wnd, GC, 2 + iBorderX, 5 + iBorderY, (yl - iBorderX*2) div 2 + iBorderX, iBorderY + yl - iBorderY*2);

85 XDrawLine(prDisplay, Wnd, GC, (yl - iBorderX*2) div 2 + iBorderX, iBorderY + yl - iBorderY*2, iBorderX + yl - iBorderX*2, 0);

draw.c (https://bitbucket.org/HongboZhang/ocaml.git) C · 123 lines

54 caml_gr_check_open();

55 if(caml_gr_remember_modeflag)

56 XDrawLine(caml_gr_display, caml_gr_bstore.win, caml_gr_bstore.gc,

57 caml_gr_x, Bcvt(caml_gr_y), x, Bcvt(y));

58 if(caml_gr_display_modeflag) {

59 XDrawLine(caml_gr_display, caml_gr_window.win, caml_gr_window.gc,

60 caml_gr_x, Wcvt(caml_gr_y), x, Wcvt(y));

61 XFlush(caml_gr_display);

graphics.d (https://github.com/wolfwood/djehuty.git) D · 246 lines

36

37 // Draw a line

38 extern(C) void _OSXDrawLine(_OSXViewPlatformVars* viewVars, int fromWindow, int x, int y, int x2, int y2);

39 void drawLine(ViewPlatformVars* viewVars, int x, int y, int x2, int y2) {

40 _OSXDrawLine(viewVars.vars, viewVars.fromWindow == 1, x, y, x2, y2);

enemies.c (https://github.com/jayrhynas/Corridor-Defence.git) C · 269 lines

131 }

132 XDrawArc(display, buffer, enemyGC, e->x - e->size, e->y - e->size, e->size*2, e->size*3, 0, 360*32);

133 XDrawLine(display, buffer, enemyGC, e->x - e->size, e->y + e->size/2, e->x + e->size, e->y + e->size/2);

134 XDrawArc(display, buffer, enemyGC, e->x - e->size/2 - e->size/4, e->y + e->size/2, e->size/2, e->size/2, 0, 360*64);

135 XDrawArc(display, buffer, enemyGC, e->x + e->size/2 - e->size/4, e->y + e->size/2, e->size/2, e->size/2, 0, 360*64);

160 XSetForeground(display, enemyGC, black.pixel);

161 }

162 XDrawLines(display, buffer, enemyGC, points, npoints, CoordModeOrigin);

163 } else if (e->type == FLYING_FAST) {

164 int npoints = 7;

180 XSetForeground(display, enemyGC, black.pixel);

181 }

182 XDrawLines(display, buffer, enemyGC, points, npoints, CoordModeOrigin);

183 }

184 if (e->showHealth) {

buttons.c (http://segin-utils.googlecode.com/svn/trunk/) C · 215 lines

62 XDrawRectangle(dpy, b->w, (c == current) ? gc : igc, (button_size / 2) - 1, (button_size / 2) - 1, 2, 2);

63 if(b->action == B_EXPAND) {

64 XDrawLine(dpy, b->w, (c == current) ? gc : igc, button_size / 2, 3, button_size / 2, button_size - 3);

65 XDrawLine(dpy, b->w, (c == current) ? gc : igc, 3, button_size / 2, button_size - 3, button_size / 2);

70 else {

71 XDrawRectangle(dpy, b->w, (c == current) ? gc : igc, 2, 4, button_size - 7, button_size - 7);

72 XDrawLine(dpy, b->w, (c == current) ? gc : igc, 4, 4, 4, 2);

73 XDrawLine(dpy, b->w, (c == current) ? gc : igc, 4, 2, button_size - 3, 2);

74 XDrawLine(dpy, b->w, (c == current) ? gc : igc, button_size - 3, 2, button_size - 3, button_size - 5);

75 XDrawLine(dpy, b->w, (c == current) ? gc : igc, button_size - 2, button_size - 5, button_size - 5, button_size - 5);

77 }

78 if(b->action == B_CLOSE) {

79 XDrawLine(dpy, b->w, (c == current) ? gc : igc, 2, 2, button_size - 2, button_size - 2);

80 XDrawLine(dpy, b->w, (c == current) ? gc : igc, 2, button_size - 3, button_size - 2, 1);

Xlib.h (https://github.com/mantidproject/mantid.git) C Header · 52 lines

44 inline int XSetBackground( Display *, GC, unsigned long ) { return 0; }

45 inline int XFillRectangle( Display *, Window, GC, int, int, int, int ) { return 0; }

46 inline int XDrawLine( Display *, Window, GC, int, int, int, int ) { return 0; }

47 inline int XDrawString( Display *, Window, GC, int, int, const char *, int ) { return 0; }

48 inline int XFlush( Display * ) { return 0; }

xlinetest.cc (https://github.com/benadler/taser_genrob.git) C++ · 160 lines

135 for (int x=0; x<=799; x++)

136 {

137 XDrawLine (display, win, gc, x, 0, 799-x, 599);

138 }

139

DrLine.c (https://github.com/ArcticaProject/vcxsrv.git) C · 85 lines

36

37 int

38 XDrawLine (

39 register Display *dpy,

40 Drawable d,

Xlib.m (https://bitbucket.org/djerius/pgplot-autotool.git) Objective C · 661 lines

174 #ifndef XDrawLine

175 # define XDrawLine (*XlibVptr->V_XDrawLine)

176 #endif

177

178 #ifndef XDrawLines

179 # define XDrawLines (*XlibVptr->V_XDrawLines)

180 #endif

181

example5.c (https://github.com/nonstop/sandbox.git) C · 165 lines

138 case Button1:

139 /* */

140 XDrawLine( display, window, gc, x, y, new_x, new_y );

141 break;

142 case Button3:

XMX_grid.c (https://github.com/clothbot/Alliance-VLSI-CAD-System.git) C · 313 lines

293 ( PixelY >= GraphicY1 ) )

294 {

295 XDrawLine( XschGraphicDisplay,

296 XtWindow( XschGraphicWindow ),

297 XschGridGC,

299 PixelX + 2, PixelY );

300

301 XDrawLine( XschGraphicDisplay,

302 XtWindow( XschGraphicWindow ),

303 XschGridGC,

main.c (https://github.com/ereslibre/x11.git) C · 75 lines

48 std::cout << "receiving event " << e.type << std::endl;

49 if (e.type == ConfigureNotify || e.type == VisibilityNotify || e.type == Expose) {

50 XDrawLine(dpy, window, gc, 10, 60, 180, 20);

51 XDrawLine(dpy, window, gc, 10, 20, 180, 60);

graphics.c (https://github.com/andrei7c4/weatherdisplay.git) C · 540 lines

375

376

377 void ICACHE_FLASH_ATTR gfxDrawLine(int x0, int y0, int x1, int y1, char color)

378 {

379 int dx = abs(x1-x0), sx = x0<x1 ? 1 : -1;

401 if (fill)

402 {

403 gfxDrawLine(x0 - x, y0 + y, x0 + x, y0 + y, color);

404 gfxDrawLine(x0 - y, y0 + x, x0 + y, y0 + x, color);

405 gfxDrawLine(x0 - x, y0 - y, x0 + x, y0 - y, color);

406 gfxDrawLine(x0 - y, y0 - x, x0 + y, y0 - x, color);

431 }

432

433 void ICACHE_FLASH_ATTR gfxDrawLineBold(int x0, int y0, int x1, int y1, char color, char boldX, char boldY)

434 {

435 gfxDrawLine(x0, y0, x1, y1, color);

Xw_set_soft_cursor.cxx (https://github.com/mathieu/oce.git) C++ · 256 lines

248

249 points[0].x += _X ; points[0].y += _Y ;

250 XDrawLines(_DISPLAY,_DROOT,_DGC,points,npoint,CoordModePrevious) ;

251 points[0].x = xs ; points[0].y = ys ;

252 } else {

253 XDrawLines(_DISPLAY,_WINDOW,pwindow->qgwind.gchigh,

254 points,npoint,CoordModePrevious) ;

255 }

tixUnixDraw.c (https://gitlab.com/OpenSourceMirror/sourcenav) C · 307 lines

75

76 gc = XCreateGC(Tk_Display(tkwin), winId, valuemask, &values);

77 XDrawLine(Tk_Display(tkwin), winId, gc, x1, y1, x2, y2);

78 XFreeGC(Tk_Display(tkwin), gc);

79 }

S3DRect.cpp (https://github.com/AVGP/Simple3D.git) C++ · 155 lines

99 for(int i=0;i<4;i++)

100 {

101 XDrawLine(d,w,g,

102 PLANAR_DISTANCE*(vertices[i].x/vertices[i].z),

103 PLANAR_DISTANCE*(vertices[i].y/vertices[i].z),

third.c (https://github.com/koushik2506/exp.git) C · 133 lines

101 XDrawPoint(display,win,gc,width-5,height-5);

102

103 XDrawLine(display,win,gc,50,0,50,200);

104 XDrawLine(display,win,gc,0,100,200,100);

116 int npoints = sizeof(points)/sizeof(XPoint);

117

118 XDrawLines(display,win,gc,points,npoints,CoordModeOrigin);

119

120 }

xmesa_x.h (git://pkgs.fedoraproject.org/mesa-libGLw) C++ Header · 86 lines

65 #define XMesaDrawPoint XDrawPoint

66 #define XMesaDrawPoints XDrawPoints

67 #define XMesaDrawLine XDrawLine

68 #define XMesaFillRectangle XFillRectangle

69 #define XMesaPutImage XPutImage

scrollbar-xterm.c (https://rxvt.svn.sourceforge.net/svnroot/rxvt) C · 85 lines ✨ Summary

This C code implements a scrollbar for an X-term window using the rxvt terminal emulator. It creates a graphical representation of the scrollbar, including a shadow and a slider, and updates its position based on the current scroll position. The function rxvt_scrollbar_show_xterm is responsible for drawing the scrollbar in the specified window.

77 xsb + 1, r->scrollBar.top, SB_WIDTH_USE - 2, scrollbar_len);

78

79 XDrawLine(r->Xdisplay, r->scrollBar.win, r->h->ShadowGC,

80 xsb ? 0 : SB_WIDTH_USE, r->scrollBar.beg, xsb ? 0 : SB_WIDTH_USE,

81 r->scrollBar.end);

grid.c (https://github.com/kastur/ECGCS.git) C · 125 lines

88 for (i = y = 0; y < canvas_height + dy; i++, y = i*dy) {

89 if (0 < y && y < canvas_height)

90 XDrawLine(display, osb,

91 (ghflag > 1) ? draw_cgrd : draw_grd,

92 0, y, canvas_width, y);

94 for (ii = 1; ii < 5; ii++) {

95 yy = y + ii*dyfine;

96 XDrawLine(display, osb, draw_grd,

97 0, yy, canvas_width, yy);

98 }

103 for (i = x = 0; x < canvas_width + dx; i++, x = i*dx) {

104 if (0 < x && x < canvas_width)

105 XDrawLine(display, osb,

106 (gvflag > 1) ? draw_cgrd : draw_grd,

107 x, 0, x, canvas_height);

iupmot_draw.c (https://github.com/kmx/mirror-iup.git) C · 247 lines

140 XSetForeground(iupmot_display, dc->pixmap_gc, iupmotColorGetPixel(r, g, b));

141

142 XDrawLine(iupmot_display, dc->pixmap, dc->pixmap_gc, x1, y1, x2, y2);

143 }

144

189 XChangeGC(iupmot_display, dc->pixmap_gc, GCLineStyle, &gcval);

190

191 XDrawLines(iupmot_display, dc->pixmap, dc->pixmap_gc, pnt, count, CoordModeOrigin);

192 }

193

GMX_grid.c (git://pkgs.fedoraproject.org/alliance) C · 317 lines

295 ( PixelY >= GraphicY1 ) )

296 {

297 XDrawLine( DrealGraphicDisplay,

298 XtWindow( DrealGraphicWindow ),

299 DrealGridGC,

301 PixelX + 2, PixelY );

302

303 XDrawLine( DrealGraphicDisplay,

304 XtWindow( DrealGraphicWindow ),

305 DrealGridGC,

checkbox.c (https://github.com/jff/mathspad.git) C · 154 lines

55 CHECKBOXINFO *cbinfo = (CHECKBOXINFO *) data;

56 if (cbinfo->check) {

57 XDrawLine(display, cbinfo->win_id, get_GC(Normal, 0,0),

58 0, 0, CHECKBOXSIZE-1, CHECKBOXSIZE-1);

59 XDrawLine(display, cbinfo->win_id, get_GC(Normal, 0,0),

LutGraphView.cc (https://github.com/nasa/VICAR.git) C++ · 170 lines

137 XAllocNamedColor ( XtDisplay(_w), cmap, "red", &colorR, &exact);

138 XSetForeground ( XtDisplay(_w), _gc, colorR.pixel );

139 XDrawLines ( XtDisplay(_w), XtWindow(_w), _gc, graph, 256, CoordModeOrigin );

140 }

141

150 XAllocNamedColor ( XtDisplay(_w), cmap, "green", &colorG, &exact);

151 XSetForeground ( XtDisplay(_w), _gc, colorG.pixel );

152 XDrawLines ( XtDisplay(_w), XtWindow(_w), _gc, graph, 256, CoordModeOrigin );

153 }

154

163 XAllocNamedColor ( XtDisplay(_w), cmap, "blue", &colorB, &exact);

164 XSetForeground ( XtDisplay(_w), _gc, colorB.pixel );

165 XDrawLines ( XtDisplay(_w), XtWindow(_w), _gc, graph, 256, CoordModeOrigin );

166 }

167

xhello.el (https://github.com/emacsmirror/ohio-archive.git) Emacs Lisp · 122 lines

93 "Expose the hello window WIN."

94 (let ((dpy (X-window-get-display win)))

95 (XDrawLine dpy win Xhello-gc-2 5 5 100 50)

96 (XDrawPoint dpy win Xhello-gc-1 20 5)

97 (XFillRectangle dpy win Xhello-gc-2 2 38 38 15)

controlpoints_client.lua (http://mtasa-resources-rcg.googlecode.com/svn/trunk/) Lua · 185 lines

16

17 for i = 1, n do

18 dxDrawLine(centerX + math.cos(angle) * radius,

19 centerY + math.sin(angle) * radius,

20 centerX + math.cos(angle + anglePiece) * radius,

154 angles[4][2])

155

156 dxDrawLine(screenPositions[1][1] + math.cos(math.rad(angles[1][1])) * unitSizes[1] * controlPointOutsideRadius,

157 screenPositions[1][2] + math.sin(math.rad(angles[1][1])) * unitSizes[1] * controlPointOutsideRadius,

158 screenPositions[2][1] + math.cos(math.rad(angles[2][2])) * unitSizes[2] * controlPointOutsideRadius,

160 tocolor(255, 255, 255, alpha),

161 controlPointOutsideWidth)

162 dxDrawLine(screenPositions[1][1] + math.cos(math.rad(angles[1][2])) * unitSizes[1] * controlPointOutsideRadius,

163 screenPositions[1][2] + math.sin(math.rad(angles[1][2])) * unitSizes[1] * controlPointOutsideRadius,

164 screenPositions[2][1] + math.cos(math.rad(angles[3][1])) * unitSizes[2] * controlPointOutsideRadius,

deltaT.c (https://gitlab.com/fossht/irsim-9.7) C · 253 lines

236 y1 = (t1->top + t1->bot) / 2;

237 y2 = (t2->top + t2->bot) / 2;

238 XDrawLine( display, window, gcs.hilite, x1, y1, x2, y2 );

239 WaitForRelease();

240 XDrawLine( display, window, gcs.unhilite, x1, y1, x2, y2 );

pangox11.cpp (https://bitbucket.org/lennonchan/cafu.git) C++ · 277 lines

138 if (uline == PANGO_UNDERLINE_SINGLE)

139 {

140 XDrawLine( wxGlobalDisplay(), drawable, gc,

141 x + (x_off + ink_rect.x) / PANGO_SCALE - 1,

142 risen_y + 1,

speed.c (https://github.com/rhuitl/uClinux.git) C · 292 lines

92 /* Horizontal Line

93 ***********************************************/

94 printf("Horizontal Line(XDrawLine)\n");

95 start_timer();

96 for(c=0; c<count*20; c++)

98 y1=random()%480;

99 #ifdef TEST_FOR_X

100 XDrawLine(display, window, gc, 0, y1, 639, y1);

101 XFlush(display);

102 #else

114 /* Vertical Line

115 ***********************************************/

116 printf("Vertical Line(XDrawLine)\n");

117 start_timer();

118 for(c=0; c<count*19; c++)

CLuaFunctionDefs.Drawing.cpp (https://github.com/azboul/multitheftauto.git) C++ · 557 lines

20 #include "StdInc.h"

21

22 int CLuaFunctionDefs::dxDrawLine ( lua_State* luaVM )

23 {

24 // dxDrawLine ( int x,int y,int x2,int y2,int color, [float width=1,bool postGUI=false] )

39 ( iArgument5 != LUA_TNUMBER && iArgument5 != LUA_TSTRING ) )

40 {

41 m_pScriptDebugging->LogBadType ( luaVM, "dxDrawLine" );

42 lua_pushboolean ( luaVM, false );

43 return 1;

74

75

76 int CLuaFunctionDefs::dxDrawLine3D ( lua_State* luaVM )

77 {

78 // dxDrawLine3D ( float x,float y,float z,float x2,float y2,float z2,int color, [float width,bool postGUI,float zBuffer] )

main.c (https://github.com/abderrahim/anjuta.git) C · 78 lines

57 switch(event.type) {

58 case Expose:

59 XDrawLine(dpy, win, gc, 0, 0, 100, 100);

60 XDrawRectangle(dpy, win, gc, 140, 140, 50, 50);

61 XDrawString(dpy, win, gc, 100, 100, "hello X world", 13);

natGC.cc (https://github.com/joekoolade/JEI.git) C++ · 262 lines

124 ::Drawable drawableXID = target->getXID();

125 ::GC gc = (::GC) structure;

126 XDrawLine(dpy, drawableXID, gc, x1, y1, x2, y2);

127 // no fast fail

128 }

draw.c (https://github.com/kakaroto/e17.git) C · 238 lines

41

42 for (w += x - 1, h += y - 1; shadow > 0; shadow--, w--, h--) {

43 XDrawLine(Xdisplay, d, gc_top, x, y, w, y);

44 XDrawLine(Xdisplay, d, gc_top, x, y, x, h);

45 x++;

46 y++;

47 XDrawLine(Xdisplay, d, gc_bottom, w, h, w, y);

48 XDrawLine(Xdisplay, d, gc_bottom, w, h, x, h);

74 case DRAW_ARROW_UP:

75 for (; shadow > 0; shadow--, x++, y++, w--) {

76 XDrawLine(Xdisplay, d, gc_top, x, y + w, x + w / 2, y);

77 XDrawLine(Xdisplay, d, gc_bottom, x + w, y + w, x + w / 2, y);

78 XDrawLine(Xdisplay, d, gc_bottom, x + w, y + w, x, y + w);

79 }

80 break;

draw.h (https://github.com/xorg62/wmfs.git) C Header · 134 lines

111 draw_line(Drawable d, int x1, int y1, int x2, int y2)

112 {

113 XDrawLine(W->dpy, d, W->gc, x1, y1, x2, y2);

114 }

115

admin_color.lua (https://github.com/multitheftauto/mtasa-resources.git) Lua · 277 lines

175 end

176

177 dxDrawLine(x + 133, y + 10, x + 200, y + 10, tocolor(color.r, color.g, color.b, 255), 20, true)

178

179 x = x + color.h * 127

181

182 local c = tocolor(0, 0, 0, 255)

183 dxDrawLine(x - 7, y, x - 2, y, c, 2, true)

184 dxDrawLine(x + 2, y, x + 7, y, c, 2, true)

185 dxDrawLine(x, y - 7, x, y - 2, c, 2, true)

186 dxDrawLine(x, y + 2, x, y + 7, c, 2, true)

lines.c (https://bitbucket.org/dpgrote/pygist.git) C · 109 lines

40 while (n>1) {

41 if (n<nmx) nmx = n;

42 XDrawLines(dpy, w->d, gc, x_pt_list, nmx, CoordModeOrigin);

43 n -= nmx;

44 }

linedrawer.lua (https://github.com/multitheftauto/mtasa-resources.git) Lua · 128 lines

81

82 if ENABLE_FAILISH_ATTEMPT_AT_ANTI_ALIASING then

83 dxDrawLine ( prevX - 1, prevY - 1, newX - 1, newY - 1, OVERLAY_LINE_AA, OVERLAY_LINE_WIDTH )

84 dxDrawLine ( prevX + 1, prevY - 1, newX + 1, newY - 1, OVERLAY_LINE_AA, OVERLAY_LINE_WIDTH )

85 dxDrawLine ( prevX - 1, prevY + 1, newX - 1, newY + 1, OVERLAY_LINE_AA, OVERLAY_LINE_WIDTH )

86 dxDrawLine ( prevX + 1, prevY + 1, newX + 1, newY + 1, OVERLAY_LINE_AA, OVERLAY_LINE_WIDTH )

87 end

88

89 dxDrawLine ( prevX, prevY, newX, newY, OVERLAY_LINE_COLOR, OVERLAY_LINE_WIDTH )

90

91 prevX = newX

GMX_grid.c (https://github.com/clothbot/Alliance-VLSI-CAD-System.git) C · 313 lines

293 ( PixelY >= GraphicY1 ) )

294 {

295 XDrawLine( GraalGraphicDisplay,

296 XtWindow( GraalGraphicWindow ),

297 GraalGridGC,

299 PixelX + 2, PixelY );

300

301 XDrawLine( GraalGraphicDisplay,

302 XtWindow( GraalGraphicWindow ),

303 GraalGridGC,

Xlib.h (https://bitbucket.org/preining/tex-live.git) C Header · 151 lines

51 extern int XDestroyWindow _ANSI_ARGS_((Display *, Window));

52 extern int XDrawArc _ANSI_ARGS_((Display *, Drawable, GC, int, int, unsigned int, unsigned int, int, int));

53 extern int XDrawLine _ANSI_ARGS_((Display *, Drawable, GC, int, int, int, int));

54 extern int XDrawLines _ANSI_ARGS_((Display *, Drawable, GC, XPoint *, int, int));

tkIntXlibDecls.h (https://bitbucket.org/vrrm/brl-cad-copy-for-fast-history-browsing-in-git.git) C Header · 1374 lines

227 unsigned int ui2, int i3, int i4));

228 #endif

229 #ifndef XDrawLines_TCL_DECLARED

230 #define XDrawLines_TCL_DECLARED

231 /* 31 */

232 EXTERN void XDrawLines _ANSI_ARGS_((Display * d, Drawable dr,

233 GC g, XPoint * x, int i1, int i2));

234 #endif

665 int count, XTextProperty * text_prop_return));

666 #endif

667 #ifndef XDrawLine_TCL_DECLARED

668 #define XDrawLine_TCL_DECLARED

669 /* 104 */

670 EXTERN void XDrawLine _ANSI_ARGS_((Display * d, Drawable dr,

671 GC g, int x1, int y1, int x2, int y2));

672 #endif

edf_client_cp_lines.lua (https://gitlab.com/yasin3223/mtasa-resources) Lua · 206 lines

101 end

102

103 dxDrawLine3D ( line.s.x,line.s.y,line.s.z, line.d.x,line.d.y,line.d.z, color, width, postGui )

104 dxDrawLine3D ( line.d.x,line.d.y,line.d.z, line.p1.x,line.p1.y,line.p1.z, color, width, postGui )

105 dxDrawLine3D ( line.d.x,line.d.y,line.d.z, line.p2.x,line.p2.y,line.p2.z, color, width, postGui )

106 end

107 end

gcl_dwimportsb.lsp (git://pkgs.fedoraproject.org/gcl) Lisp · 77 lines

45 xlib::Xsync xlib::XsetFunction xlib::GXxor xlib::GXcopy

46 xlib::XsetLineAttributes xlib::LineSolid xlib::CapButt xlib::JoinMiter

47 xlib::XDrawLine xlib::XdrawArc xlib::XClearArea xlib::XCopyArea

48 xlib::XFillRectangle xlib::XdrawImageString xlib::XTextExtents

49 xlib::XDestroyWindow xlib::XFreeGC xlib::XMoveWindow xlib::Xsync

XMX_grid.c (https://github.com/clothbot/Alliance-VLSI-CAD-System.git) C · 310 lines

290 ( PixelY >= GraphicY1 ) )

291 {

292 XDrawLine( XgraGraphicDisplay,

293 XtWindow( XgraGraphicWindow ),

294 XgraGridGC,

296 PixelX + 2, PixelY );

297

298 XDrawLine( XgraGraphicDisplay,

299 XtWindow( XgraGraphicWindow ),

300 XgraGridGC,

FbDrawable.cc (https://github.com/rpavlik/fluxbox.git) C++ · 161 lines

72 if (drawable() == 0 || gc == 0)

73 return;

74 XDrawLine(display(),

75 drawable(),

76 gc,

qplot.c (https://github.com/mattkoes/antelope_contrib.git) C · 805 lines

616 if (n > 0) {

617 ntot += n;

618 if (n > 1) XDrawLines (display, drawable, gcl,

619 xps, n,CoordModeOrigin);

620 n = 0;

625 if (n > 0) {

626 ntot += n;

627 if (n > 1) XDrawLines (display, drawable, gcl, xps,

628 n, CoordModeOrigin);

629 }

view.m (https://github.com/wolfwood/djehuty.git) Objective C · 269 lines

88 // Shapes //

89

90 void _OSXDrawLine(struct _OSXViewPlatformVars* viewVars, int fromWindow, int x, int y, int x2, int y2) {

91 if (!fromWindow) {

92 [ viewVars->dib_image lockFocus ];

CLuaDrawingDefs.h (https://github.com/multitheftauto/mtasa-blue.git) C Header · 92 lines

22 static void AddClass(lua_State* luaVM);

23

24 LUA_DECLARE(DxDrawLine);

25 LUA_DECLARE(DxDrawLine3D);

Xw_draw_line.cxx (https://github.com/hmeyer/oce.git) C++ · 518 lines

182 }

183 if( ppoint && npoint > 1 ) {

184 XDrawLines(_DISPLAY,_DRAWABLE,gc,ppoint,npoint,CoordModeOrigin) ;

185 }

186 }

admin_color.lua (https://gitlab.com/yasin3223/mtasa-resources) Lua · 260 lines

166 end

167

168 dxDrawLine ( x + 133, y + 10, x + 200, y + 10, tocolor ( color.r, color.g, color.b, 255 ), 20, true )

169

170 x = x + color.h * 127

172

173 local c = tocolor ( 0, 0, 0, 255 )

174 dxDrawLine ( x - 7, y, x - 2, y, c, 2, true)

175 dxDrawLine ( x + 2, y, x + 7, y, c, 2, true)

176 dxDrawLine ( x, y - 7, x, y - 2, c, 2, true)

177 dxDrawLine ( x, y + 2, x, y + 7, c, 2, true)

bindings-x11-functions.ads (https://github.com/joewing/tabfx.git) Ada · 215 lines

151 pragma Import(C, XSelectInput, "XSelectInput");

152

153 procedure XDrawLine(display : Display_Pointer;

154 d : Drawable_Type; g : GC_Type;

155 x1, y1, x2, y2 : int);

156 pragma Import(C, XDrawLine, "XDrawLine");

157

158 procedure XDrawRectangle(

scrollbar.c (https://rxvt.svn.sourceforge.net/svnroot/rxvt) C · 324 lines ✨ Summary

This C code is part of a terminal emulator, specifically handling the scrollbar functionality. It creates and updates the graphical representation of the scrollbar, including its position, size, and shadow effects. The code also handles user input to move the scrollbar up or down, updating the corresponding window content accordingly.

73

74 /* draw base */

75 XDrawLine(Xdisplay, scrollBar.win, bot,

76 pt[0].x, pt[0].y, pt[1].x, pt[1].y);

77

79 pt[1].x = x + sz2 - 1;

80 pt[1].y = y;

81 XDrawLine(Xdisplay, scrollBar.win, top,

82 pt[0].x, pt[0].y, pt[1].x, pt[1].y);

83 #if (SHADOW > 1)

86 pt[0].y--;

87 pt[1].y++;

88 XDrawLine(Xdisplay, scrollBar.win, top,

89 pt[0].x, pt[0].y, pt[1].x, pt[1].y);

90 #endif

Fl_Xlib_Graphics_Driver_vertex.cxx (https://github.com/fltk/fltk.git) C++ · 95 lines

38 return;

39 }

40 if (n>1) XDrawLines(fl_display, fl_window, gc_, (XPoint*)p, n, 0);

41 }

42

TLStoryConfiguration.swift (https://github.com/timelessg/TLStoryCamera.git) Swift · 82 lines

63

64 //最大笔触

65 public static let maxDrawLineWeight:CGFloat = 30

66 //最小笔触

67 public static let minDrawLineWeight:CGFloat = 5

hello.ss (git://github.com/ramrunner/sicp-solutions.git) Scheme · 151 lines ✨ Summary

This Scheme code creates a window with a black background and displays the text “Paranoia is being computed…” using a custom painter function kota. The painter function takes a frame as input, maps its coordinates to a new origin, and draws a line segment between two points on the screen. The program then waits for 10 seconds before closing.

This Scheme code creates a window with a black background and displays the text “Paranoia is being computed…” using a custom painter function kota. The painter function takes a frame as input, maps its coordinates to a new origin, and draws a line segment between two points on the screen. The program then waits for 10 seconds before closing.

138 ; (cond ((< num 10)

139 ; (xdrawarc display window gc x y (/ s1 num) (/ s2 num) 0 (/ 19000 num))

140 ; ;(xdrawline display window gc (+ x (/ x num)) (+ y (/ y num)) (/ s1 2) (/ s2 2))

141 ; (if (> num 2)

142 ; (xdrawrectangle display window gc (+ x (/ s1 num)) (+ y (/ s2 num)) (/ s1 num ) (/ s2 num )))

xdraw.c (https://bitbucket.org/vrrm/brl-cad-copy-for-fast-history-browsing-in-git.git) C · 82 lines

18 *----------------------------------------------------------------------

19 *

20 * XDrawLine --

21 *

22 * Draw a single line between two points in a given drawable.

32

33 void

34 XDrawLine(display, d, gc, x1, y1, x2, y2)

35 Display* display;

36 Drawable d;

44 points[1].x = x2;

45 points[1].y = y2;

46 XDrawLines(display, d, gc, points, 2, CoordModeOrigin);

47 }

48

gridlines.lua (http://mtasa-resources.googlecode.com/svn/trunk/) Lua · 0 lines

132 end

133

134 return dxDrawLine ( startX,startY,endX,endY,color,thickness, false)

135 end

136

MSWidgetOutput.H (git://pkgs.fedoraproject.org/aplus-fsf) C Header · 212 lines

76 void XDrawArc(Display *,Window,GC,int,int,int,int,int,int);

77 void XDrawArcs(Display *,Window,GC,XArc *,int);

78 void XDrawLine(Display *,Window,GC,int,int,int,int);

79 void XDrawLines(Display *,Window,GC,XPoint *,int,int);

XMX_cursor.c (https://github.com/clothbot/Alliance-VLSI-CAD-System.git) C · 514 lines

275 autbegin();

276

277 XDrawLine( XvpnGraphicDisplay,

278 XtWindow( XvpnGraphicWindow ),

279 XvpnXorGC,

283 XvpnCursorSaveY + XVPN_CURSOR_SIZE );

284

285 XDrawLine( XvpnGraphicDisplay,

286 XtWindow( XvpnGraphicWindow ),

287 XvpnXorGC,

321 case XVPN_INPUT_LINE :

322

323 XDrawLine( XvpnGraphicDisplay,

324 XtWindow( XvpnGraphicWindow ),

325 XvpnXorGC,

XMX_view.c (https://github.com/clothbot/Alliance-VLSI-CAD-System.git) C · 1943 lines

332 x = X1r + cs;

333

334 XDrawLine( XschGraphicDisplay,

335 XschGraphicPixmap,

336 XschDrawGC,

338 x, y1 + is_y/2);

339

340 XDrawLine(XschGraphicDisplay, XschGraphicPixmap, XschDrawGC,

341 x , y1 - is_y/2,

342 x + is_x, y1);

343 XDrawLine(XschGraphicDisplay, XschGraphicPixmap, XschDrawGC,

344 x , y1 + is_y/2,

345 x + is_x, y1);

XMX_cursor.c (https://github.com/clothbot/Alliance-VLSI-CAD-System.git) C · 515 lines

276 autbegin();

277

278 XDrawLine( XschGraphicDisplay,

279 XtWindow( XschGraphicWindow ),

280 XschXorGC,

284 XschCursorSaveY + XSCH_CURSOR_SIZE );

285

286 XDrawLine( XschGraphicDisplay,

287 XtWindow( XschGraphicWindow ),

288 XschXorGC,

322 case XSCH_INPUT_LINE :

323

324 XDrawLine( XschGraphicDisplay,

325 XtWindow( XschGraphicWindow ),

326 XschXorGC,

XMX_cursor.c (https://github.com/clothbot/Alliance-VLSI-CAD-System.git) C · 575 lines

328 autbegin();

329

330 XDrawLine( XpatGraphicDisplay,

331 XtWindow( XpatGraphicWindow ),

332 XpatXorGC,

336 XpatCursorSaveY + XPAT_CURSOR_SIZE );

337

338 XDrawLine( XpatGraphicDisplay,

339 XtWindow( XpatGraphicWindow ),

340 XpatXorGC,

374 case XPAT_INPUT_LINE :

375

376 XDrawLine( XpatGraphicDisplay,

377 XtWindow( XpatGraphicWindow ),

378 XpatXorGC,

XMX_cursor.c (https://github.com/clothbot/Alliance-VLSI-CAD-System.git) C · 514 lines

275 autbegin();

276

277 XDrawLine( XgraGraphicDisplay,

278 XtWindow( XgraGraphicWindow ),

279 XgraXorGC,

283 XgraCursorSaveY + XGRA_CURSOR_SIZE );

284

285 XDrawLine( XgraGraphicDisplay,

286 XtWindow( XgraGraphicWindow ),

287 XgraXorGC,

321 case XGRA_INPUT_LINE :

322

323 XDrawLine( XgraGraphicDisplay,

324 XtWindow( XgraGraphicWindow ),

325 XgraXorGC,

GMX_view.c (https://github.com/clothbot/Alliance-VLSI-CAD-System.git) C · 1026 lines

306 Xcr = ( X1r + X2r ) >> 1;

307

308 XDrawLine( GraalGraphicDisplay,

309 GraalGraphicPixmap,

310 GraalDrawGC,

316 Ycr = ( Y1r + Y2r ) >> 1;

317

318 XDrawLine( GraalGraphicDisplay,

319 GraalGraphicPixmap,

320 GraalDrawGC,

371 if ( ( DrawLine & GRAAL_WEST_MASK ) == 0 )

372 {

373 XDrawLine( GraalGraphicDisplay,

374 GraalGraphicPixmap,

375 GraalDrawGC,

GMX_cursor.c (https://github.com/clothbot/Alliance-VLSI-CAD-System.git) C · 534 lines

280 rdsbegin();

281

282 XDrawLine( GraalGraphicDisplay,

283 XtWindow( GraalGraphicWindow ),

284 GraalXorGC,

288 GraalCursorSaveY + GRAAL_CURSOR_SIZE );

289

290 XDrawLine( GraalGraphicDisplay,

291 XtWindow( GraalGraphicWindow ),

292 GraalXorGC,

326 case GRAAL_INPUT_LINE :

327

328 XDrawLine( GraalGraphicDisplay,

329 XtWindow( GraalGraphicWindow ),

330 GraalXorGC,

tkIntXlibDecls.m (https://bitbucket.org/preining/tex-live.git) Objective C · 446 lines

93 #ifndef XDrawLine

94 # define XDrawLine (*TkintxlibdeclsVptr->V_XDrawLine)

95 #endif

96

97 #ifndef XDrawLines

98 # define XDrawLines (*TkintxlibdeclsVptr->V_XDrawLines)

99 #endif

100

dwsyms.lsp (https://github.com/huangjs/peval.git) Lisp · 148 lines

96 xlib::XDRAWARC

97 xlib::XDRAWIMAGESTRING

98 xlib::XDRAWLINE

99 xlib::XFILLRECTANGLE

100 xlib::XFONTSTRUCT-FID

frame.c (https://gitlab.com/pheinzlr/CodeVault) C · 118 lines

68 XiSetPixVal(XiWin,(Rgn->is_in !=0) ? Hi : Lo);

69 if (o <= 1)

70 XDrawLines(XiWin->disp,XiDrawable(XiWin),XiWin->gc.set,

71 high,7,CoordModeOrigin);

72 else

75 XiSetPixVal(XiWin,(Rgn->is_in !=0) ? Lo : Hi);

76 if (o <= 1)

77 XDrawLines(XiWin->disp,XiDrawable(XiWin),XiWin->gc.set,

78 low,7,CoordModeOrigin);

79 else

TXMenu.cxx (https://github.com/mcr/xorg-xvnc4.git) C++ · 186 lines

101 text[i], strlen(text[i]));

102 } else {

103 XDrawLine(dpy, win(), defaultGC, bevel + xPad, y + entryHeight(i) / 2,

104 width() - bevel - xPad, y + entryHeight(i) / 2);

105 }

admin_gui.lua (https://github.com/multitheftauto/mtasa-resources.git) Lua · 294 lines

136 local x, y = guiGetAbsolutePosition(mask)

137 local sx, sy = guiGetSize(mask, false)

138 dxDrawLine(x, y + sy / 2, x + sx, y + sy / 2, tocolor(info.r, info.g, info.b, 255), sy, true)

139 end

140 end

slider.cc (git://pkgs.fedoraproject.org/clxclient) C++ · 357 lines

152 {

153 x = _x + *p++;

154 XDrawLine (dpy (), win (), gc, x, 0, x, _y);

155 }

156 k = _y / 2;

157 XSetForeground (dpy (), gc, _style->dark);

158 XDrawLine (dpy (), win (), gc, _x, k - 1, _x + _scale->pixlen (), k - 1);

159 XSetForeground (dpy (), gc, _style->lite);

160 XDrawLine (dpy (), win (), gc, _x, k, _x + _scale->pixlen (), k);

176 XFillRectangle (dpy (), win (), gc, x, y, h, w);

177 XSetForeground (dpy (), gc, _mark);

178 XDrawLine (dpy (), win (), gc, x + h / 2, y, x + h / 2, y + w);

179

180 XSetForeground (dpy (), gc, _style->lite);

radio.c (https://github.com/drafnel/Vis5d.git) C · 182 lines

43 y = LUI_Border + i * (LUI_Font_height+4) - 2;

44 if (i>0) {

45 XDrawLine( LUI_Display, r->window, LUI_GC_black, x1, y, x2, y );

46 }

47 XDrawRectangle( LUI_Display, r->window, LUI_GC_black,

widgets.c (https://udeproject.svn.sourceforge.net/svnroot/udeproject) C · 222 lines

45 int a;

46 for(a=0;a<width;a++){

47 XDrawLine(disp,win,NW,x1+a,y1+a,x2-a-1,y1+a);

48 XDrawLine(disp,win,NW,x1+a,y1+a+1,x1+a,y2-a);

49 XDrawLine(disp,win,SE,x1+a+1,y2-a,x2-1-a,y2-a);

50 XDrawLine(disp,win,SE,x2-a,y1+a,x2-a,y2-a);

95 xa = xc + i; xb = xd - i;

96 ya = yc + i; yb = yd - i;

97 XDrawLine(disp,uc->border, i?LightGC:ShadowGC, xa, ya, xb, ya);

98 XDrawLine(disp,uc->border, i?ShadowGC:TheScreen.blackcontext,xb,ya,xb,yb);

99 XDrawLine(disp,uc->border, i?ShadowGC:TheScreen.blackcontext,xb,yb,xa,yb);

100 XDrawLine(disp,uc->border, i?LightGC:ShadowGC, xa, yb, xa, ya);

179 i=i/2+TheScreen.FrameBevelWidth;

180 if(InitS.BorderTitleFlags & BT_GROOVE){

181 XDrawLine(disp, uc->title.win, LightGC,

182 (InitS.BorderTitleFlags & BT_CENTER_TITLE) ? 2 : 0,

183 uc->title.height-2, uc->title.width-2, uc->title.height-2);

xdraw.cc (git://pkgs.fedoraproject.org/clxclient) C++ · 138 lines

96 if (n > m) k = m;

97 else k = n;

98 XDrawLines (_dpy, _drw, _gct, P, k, CoordModeOrigin);

99 P += k - 1;

100 n -= k - 1;

gfx.c (https://github.com/blaws/Eye.git) C · 204 lines

90 void gfx_line( int x1, int y1, int x2, int y2 )

91 {

92 XDrawLine(gfx_display,gfx_window,gfx_gc,x1,y1,x2,y2);

93 }

94

HCIWindow.cc (https://bitbucket.org/SRIHARIP/xvision-revised.git) C++ · 108 lines

59 found_reg->PosY()+y,

60 found_reg->Width(), found_reg->Height());

61 //XDrawLine(dpy,win,gc_window[12],width-sx,sy,width-ex,ey);

62 }

63 else

66 found_reg->PosX()+x,found_reg->PosY()+y,

67 found_reg->Width(),found_reg->Height());

68 //XDrawLine(dpy,win,gc_window[12],sx,sy,ex,ey);

69 }

70 }

admin_gui.lua (https://gitlab.com/yasin3223/mtasa-resources) Lua · 240 lines

125 local x, y = guiGetAbsolutePosition ( mask )

126 local sx, sy = guiGetSize ( mask, false )

127 dxDrawLine ( x, y + sy / 2, x + sx, y + sy / 2, tocolor ( info.r, info.g, info.b, 255 ), sy, true )

128 end

129 end

gfx_draw.c (https://github.com/freebasic/fbc.git) C · 276 lines

245 }

246 if (draw) {

247 fb_GfxDrawLine( context, CINT(x), CINT(y), CINT(x2), CINT(y2), context->fg_color, 0xffff );

248 }

249 if (move) {

XMX_grid.c (https://github.com/clothbot/Alliance-VLSI-CAD-System.git) C · 312 lines

292 ( PixelY >= GraphicY1 ) )

293 {

294 XDrawLine( XpatGraphicDisplay,

295 XtWindow( XpatGraphicWindow ),

296 XpatGridGC,

298 PixelX + 2, PixelY );

299

300 XDrawLine( XpatGraphicDisplay,

301 XtWindow( XpatGraphicWindow ),

302 XpatGridGC,

srgp_echo_X.c (https://gitlab.com/bratner/graphics.git) C · 339 lines

135 /* DRAWS BETWEEN rubber_anchor AND previous_position */

136 {

137 XDrawLine (srgpx__display, srgpx__screenwin,

138 echo__locator_gc,

139 ExplodePt(echo__locator_previous_position),

tixWCmpt.c (https://gitlab.com/OpenSourceMirror/sourcenav) C · 184 lines

74

75 for (i=0; i<npoints; i++) {

76 XDrawLine(display, d, gc, points[i].x, points[i].y,

77 points[i].x, points[i].y);

78 }

video.c (https://gitlab.com/amiloradovsky/synth) C · 92 lines

64 for ( j = 0 ; j < COLORS_COUNT ; j ++ ) {

65 XSetForeground ( dpy, gc, *( colors + j ) );

66 XDrawLine ( dpy, win, gc,

67 i - 1, (1.0 + *(*(buffers + j) + i - 1)) * height / 2,

68 i , (1.0 + *(*(buffers + j) + i )) * height / 2

graphics_context.hpp (https://github.com/ereslibre/x11.git) C++ Header · 202 lines

66 void draw_line ( line l )

67 {

68 XDrawLine ( m_display,

69 m_window_id,

70 m_gc,

test11.c (git://pkgs.fedoraproject.org/lesstif) C · 186 lines

53 NULL);

54

55 XDrawLine(XtDisplay(da), XtWindow(da), gc, 0, 0, 500, 500);

56 }

57

DrArc.c (git://pkgs.fedoraproject.org/nx) C · 85 lines

28

29 /* Note to future maintainers: XDrawArc does NOT batch successive PolyArc

30 requests into a single request like XDrawLine, XDrawPoint, etc.

31 We don't do this because X_PolyArc applies the GC's join-style if

32 the last point in one arc coincides with the first point in another.

gfx_line.c (https://github.com/freebasic/fbc.git) C · 240 lines

16

17 /* Caller is expected to hold FB_GRAPHICS_LOCK() */

18 void fb_GfxDrawLine(FB_GFXCTX *context, int x1, int y1, int x2, int y2, unsigned int color, unsigned int style)

19 {

20 int x, y, d, dx, dy, ax, ay, skip, rot, bit;

231

232 if (type == LINE_TYPE_LINE) {

233 fb_GfxDrawLine( context, x1, y1, x2, y2, color, style );

234 } else {

235 fb_hFixCoordsOrder(&x1, &y1, &x2, &y2);

TLStoryEditContainerView.swift (https://github.com/timelessg/TLStoryCamera.git) Swift · 234 lines

229

230 internal func storyColorPickerDidChange(percent: CGFloat) {

231 let lineWidth = (TLStoryConfiguration.maxDrawLineWeight - TLStoryConfiguration.minDrawLineWeight) * percent + TLStoryConfiguration.minDrawLineWeight

232 doodleView?.lineWidth = lineWidth

233 }

mxcustom.js (https://github.com/3xxx/engineercms.git) JavaScript · 346 lines

328

329

330 var line = mxOcx.NewEntity("IMxDrawLine");

331 line.EndPoint = ept;

332 line.StartPoint = stp;

client.lua (https://gitlab.com/yasin3223/mtasa-resources) Lua · 90 lines

79 if not drawn[neighbourid .. '-' .. id] then

80 local neighbour = getNodeByID(db, neighbourid)

81 dxDrawLine3D(node.x, node.y, node.z + 1, neighbour.x, neighbour.y, neighbour.z + 1, tocolor(0, 0, 200, 255), 3)

82 drawn[id .. '-' .. neighbourid] = true

83 end

drawing.scm (https://github.com/bitwize/rscheme.git) Scheme · 278 lines

36 (to <point>))

37 {

38 XDrawLine( ctx_dsp, ctx_win, ctx_gc,

39 POINT_X(from) + ctx_origin_x,

40 POINT_Y(from) + ctx_origin_y,

DrawOpX11.cpp (https://github.com/ultimatepp/mirror.git) C++ · 311 lines

140 SetLineStyle(width);

141 SetForeground(color);

142 XDrawLine(Xdisplay, dw, gc,

143 x1 + actual_offset.x, y1 + actual_offset.y,

144 x2 + actual_offset.x, y2 + actual_offset.y);

159 gcv_new.foreground = GetXPixel(color) ^ (IsNull(doxor) ? 0 : GetXPixel(doxor));

160 XChangeGC(Xdisplay, GetGC(), GCForeground | GCFunction, &gcv_new);

161 enum { REQUEST_LENGTH = 256 }; // X server XDrawLines request length (heuristic)

162 Point offset = GetOffset();

163 if(vertex_count == 2)

164 XDrawLine(Xdisplay, GetDrawable(), GetGC(),

165 vertices[0].x + offset.x, vertices[0].y + offset.y,

166 vertices[1].x + offset.x, vertices[1].y + offset.y);

cppwrapper.h (https://github.com/TotalCross/totalcross.git) C Header · 112 lines

70 void dxGetPixels(Pixel* dstPixels, int32 srcX, int32 srcY, int32 width, int32 height, int32 pitch);

71 void dxUpdateScreen();

72 void dxDrawLines(Context currentContext, TCObject g, int32* x, int32* y, int32 n, int32 tx, int32 ty, int32 color, bool fill);

73 void dxDrawLine(int x1, int y1, int x2, int y2, int color);

scrollbar-xterm.c (https://rxvt.svn.sourceforge.net/svnroot/rxvt) C · 87 lines ✨ Summary

This C code is part of a scrollbar implementation for an X-term emulator, specifically rxvt. It creates and manages the graphical representation of the scrollbar, including its appearance, position, and behavior. The function rxvt_scrollbar_show_xterm updates the scrollbar’s display based on user input and scroll positions.

79 xsb + 1, r->scrollBar.top, SB_WIDTH_USE - 2, scrollbar_len);

80

81 XDrawLine(r->Xdisplay, r->scrollBar.win, ShadowGC,

82 xsb ? 0 : SB_WIDTH_USE, r->scrollBar.beg, xsb ? 0 : SB_WIDTH_USE,

83 r->scrollBar.end);

SlopeBox.C (git://pkgs.fedoraproject.org/ddd) C · 131 lines

52 BoxPoint origin = r.origin();

53

54 XDrawLine(XtDisplay(w), XtWindow(w), gc, origin[X], origin[Y],

55 origin[X] + space[X], origin[Y] + space[Y]);

56 }

100 BoxPoint origin = r.origin();

101

102 XDrawLine(XtDisplay(w), XtWindow(w), gc, origin[X], origin[Y] + space[Y],

103 origin[X] + space[X], origin[Y]);

104 }

Dx.cs (https://github.com/mta-slipe/Slipe-Core.git) C# · 215 lines

94 public static bool DrawLine(Vector2 startPosition, Vector2 endPosition, Color color, float width = 1, bool postGui = false)

95 {

96 return MtaClient.DxDrawLine((int) startPosition.X, (int)startPosition.Y, (int)endPosition.X, (int)endPosition.Y, color.Hex, width, postGui);

97 }

98 #endregion

101 public static bool DrawLine3D(Vector3 startPosition, Vector3 endPosition, Color color, float width = 1, bool postGui = false)

102 {

103 return MtaClient.DxDrawLine3D(startPosition.X, startPosition.Y, startPosition.Z, endPosition.X, endPosition.Y, endPosition.Z, color.Hex, width, postGui);

104 }

105 #endregion

HCIWindow.cc (https://bitbucket.org/SRIHARIP/xvision-revised.git) C++ · 130 lines

75 region[index].ex-region[index].sx,

76 region[index].ey-region[index].sy);

77 XDrawLine(dpy,win,gc_window[0],width-sx,sy,width-ex,ey);

78 }

79 else

83 region[index].ex-region[index].sx,

84 region[index].ey-region[index].sy);

85 XDrawLine(dpy,win,gc_window[0],sx,sy,ex,ey);

86 }

87 }

Xz88dk.h (git://pkgs.fedoraproject.org/z88dk) C Header · 131 lines

98 extern void __LIB__ XDrawRectangle(struct _XDisplay *display, Window win, struct _XGC gc, int x, int y, int width, int height);

99 extern void __LIB__ XDrawPoint(struct _XDisplay *display, Window win, struct _XGC gc, int x, int y);

100 extern void __LIB__ XDrawLine(struct _XDisplay *display, Window win, struct _XGC gc, int x1, int y1, int x2, int y2);

101 extern void __LIB__ XClearWindow(struct _XDisplay *display, Window win, struct _XGC gc, int x, int y, int width, int height, Bool Exposures);

102

tooltip.lua (https://gitlab.com/yasin3223/mtasa-resources) Lua · 387 lines

367

368 -- Draw the tooltip borders

369 dxDrawLine(x, y, x + width + 6, y, borderColor, 1, true)

370 dxDrawLine(x, y + height + 4, x + width + 6, y + height + 4, borderColor, 1, true)

371 dxDrawLine(x, y, x, y + height + 4, borderColor, 1, true)

372 dxDrawLine(x + width + 6, y, x + width + 6, y + height + 4, borderColor, 1, true)

linedrawer.lua (https://gitlab.com/yasin3223/mtasa-resources) Lua · 128 lines

81

82 if ENABLE_FAILISH_ATTEMPT_AT_ANTI_ALIASING then

83 dxDrawLine ( prevX - 1, prevY - 1, newX - 1, newY - 1, OVERLAY_LINE_AA, OVERLAY_LINE_WIDTH )

84 dxDrawLine ( prevX + 1, prevY - 1, newX + 1, newY - 1, OVERLAY_LINE_AA, OVERLAY_LINE_WIDTH )

85 dxDrawLine ( prevX - 1, prevY + 1, newX - 1, newY + 1, OVERLAY_LINE_AA, OVERLAY_LINE_WIDTH )

86 dxDrawLine ( prevX + 1, prevY + 1, newX + 1, newY + 1, OVERLAY_LINE_AA, OVERLAY_LINE_WIDTH )

87 end

88

89 dxDrawLine ( prevX, prevY, newX, newY, OVERLAY_LINE_COLOR, OVERLAY_LINE_WIDTH )

90

91 prevX = newX

main.c (https://github.com/ereslibre/x11.git) C · 86 lines

45 if (e.type == VisibilityNotify) {

46 XClearWindow(dpy, e.xany.window);

47 //XDrawLine(dpy, e.xany.window, gc, 10, 60, 180, 20);

48 //XDrawLine(dpy, e.xany.window, gc, 10, 20, 180, 60);

drawcurve.c (https://github.com/ahay/src.git) C · 163 lines

156 XDrawPoints(dpy,win,gcc,lpoints,ncurve,CoordModeOrigin);

157 else if (ncurve > 1)

158 XDrawLines(dpy,win,gcc,lpoints,ncurve,CoordModeOrigin);

159

160 /* free resources before returning */

shot.c (https://github.com/PedroLopes/SpaceInvadersOSC.git) C · 254 lines

251 GC gc;

252 {

253 XDrawLine(dpy, gamewindow, gc, fromx, fromy, tox, toy);

254 }

255