100+ results for 'XDrawLine'
Not the results you expected?
X11Gui.h (https://github.com/heather162/scummvm.git) C Header · 327 lines
XMX_grid.c (https://github.com/clothbot/Alliance-VLSI-CAD-System.git) C · 310 lines
gui.sc (git://github.com/qobi/R6RS-AD.git) Scala · 163 lines
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);
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);
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
pango_x.cpp (https://bitbucket.org/lennonchan/cafu.git) C++ · 294 lines
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
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
DrLine.c (https://github.com/ArcticaProject/vcxsrv.git) C · 85 lines
Xlib.m (https://bitbucket.org/djerius/pgplot-autotool.git) Objective C · 661 lines
example5.c (https://github.com/nonstop/sandbox.git) C · 165 lines
XMX_grid.c (https://github.com/clothbot/Alliance-VLSI-CAD-System.git) C · 313 lines
main.c (https://github.com/ereslibre/x11.git) C · 75 lines
graphics.c (https://github.com/andrei7c4/weatherdisplay.git) C · 540 lines
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 }
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
tixUnixDraw.c (https://gitlab.com/OpenSourceMirror/sourcenav) C · 307 lines
S3DRect.cpp (https://github.com/AVGP/Simple3D.git) C++ · 155 lines
third.c (https://github.com/koushik2506/exp.git) C · 133 lines
xmesa_x.h (git://pkgs.fedoraproject.org/mesa-libGLw) C++ Header · 86 lines
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.
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.
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));
142 XDrawLine(iupmot_display, dc->pixmap, dc->pixmap_gc, x1, y1, x2, y2);
143 }
189 XChangeGC(iupmot_display, dc->pixmap_gc, GCLineStyle, &gcval);
191 XDrawLines(iupmot_display, dc->pixmap, dc->pixmap_gc, pnt, count, CoordModeOrigin);
192 }
GMX_grid.c (git://pkgs.fedoraproject.org/alliance) C · 317 lines
checkbox.c (https://github.com/jff/mathspad.git) C · 154 lines
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 }
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 }
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 }
xhello.el (https://github.com/emacsmirror/ohio-archive.git) Emacs Lisp · 122 lines
controlpoints_client.lua (http://mtasa-resources-rcg.googlecode.com/svn/trunk/) Lua · 185 lines
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])
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
pangox11.cpp (https://bitbucket.org/lennonchan/cafu.git) C++ · 277 lines
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"
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;
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
natGC.cc (https://github.com/joekoolade/JEI.git) C++ · 262 lines
draw.c (https://github.com/kakaroto/e17.git) C · 238 lines
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
admin_color.lua (https://github.com/multitheftauto/mtasa-resources.git) Lua · 277 lines
175 end
177 dxDrawLine(x + 133, y + 10, x + 200, y + 10, tocolor(color.r, color.g, color.b, 255), 20, true)
179 x = x + color.h * 127
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
linedrawer.lua (https://github.com/multitheftauto/mtasa-resources.git) Lua · 128 lines
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
89 dxDrawLine ( prevX, prevY, newX, newY, OVERLAY_LINE_COLOR, OVERLAY_LINE_WIDTH )
91 prevX = newX
GMX_grid.c (https://github.com/clothbot/Alliance-VLSI-CAD-System.git) C · 313 lines
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
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
FbDrawable.cc (https://github.com/rpavlik/fluxbox.git) C++ · 161 lines
qplot.c (https://github.com/mattkoes/antelope_contrib.git) C · 805 lines
view.m (https://github.com/wolfwood/djehuty.git) Objective C · 269 lines
CLuaDrawingDefs.h (https://github.com/multitheftauto/mtasa-blue.git) C Header · 92 lines
Xw_draw_line.cxx (https://github.com/hmeyer/oce.git) C++ · 518 lines
admin_color.lua (https://gitlab.com/yasin3223/mtasa-resources) Lua · 260 lines
166 end
168 dxDrawLine ( x + 133, y + 10, x + 200, y + 10, tocolor ( color.r, color.g, color.b, 255 ), 20, true )
170 x = x + color.h * 127
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
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.
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.
74 /* draw base */
75 XDrawLine(Xdisplay, scrollBar.win, bot,
76 pt[0].x, pt[0].y, pt[1].x, pt[1].y);
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
TLStoryConfiguration.swift (https://github.com/timelessg/TLStoryCamera.git) Swift · 82 lines
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.
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.
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 }
gridlines.lua (http://mtasa-resources.googlecode.com/svn/trunk/) Lua · 0 lines
MSWidgetOutput.H (git://pkgs.fedoraproject.org/aplus-fsf) C Header · 212 lines
XMX_cursor.c (https://github.com/clothbot/Alliance-VLSI-CAD-System.git) C · 514 lines
275 autbegin();
277 XDrawLine( XvpnGraphicDisplay,
278 XtWindow( XvpnGraphicWindow ),
279 XvpnXorGC,
283 XvpnCursorSaveY + XVPN_CURSOR_SIZE );
285 XDrawLine( XvpnGraphicDisplay,
286 XtWindow( XvpnGraphicWindow ),
287 XvpnXorGC,
321 case XVPN_INPUT_LINE :
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;
334 XDrawLine( XschGraphicDisplay,
335 XschGraphicPixmap,
336 XschDrawGC,
338 x, y1 + is_y/2);
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();
278 XDrawLine( XschGraphicDisplay,
279 XtWindow( XschGraphicWindow ),
280 XschXorGC,
284 XschCursorSaveY + XSCH_CURSOR_SIZE );
286 XDrawLine( XschGraphicDisplay,
287 XtWindow( XschGraphicWindow ),
288 XschXorGC,
322 case XSCH_INPUT_LINE :
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();
330 XDrawLine( XpatGraphicDisplay,
331 XtWindow( XpatGraphicWindow ),
332 XpatXorGC,
336 XpatCursorSaveY + XPAT_CURSOR_SIZE );
338 XDrawLine( XpatGraphicDisplay,
339 XtWindow( XpatGraphicWindow ),
340 XpatXorGC,
374 case XPAT_INPUT_LINE :
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();
277 XDrawLine( XgraGraphicDisplay,
278 XtWindow( XgraGraphicWindow ),
279 XgraXorGC,
283 XgraCursorSaveY + XGRA_CURSOR_SIZE );
285 XDrawLine( XgraGraphicDisplay,
286 XtWindow( XgraGraphicWindow ),
287 XgraXorGC,
321 case XGRA_INPUT_LINE :
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;
308 XDrawLine( GraalGraphicDisplay,
309 GraalGraphicPixmap,
310 GraalDrawGC,
316 Ycr = ( Y1r + Y2r ) >> 1;
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();
282 XDrawLine( GraalGraphicDisplay,
283 XtWindow( GraalGraphicWindow ),
284 GraalXorGC,
288 GraalCursorSaveY + GRAAL_CURSOR_SIZE );
290 XDrawLine( GraalGraphicDisplay,
291 XtWindow( GraalGraphicWindow ),
292 GraalXorGC,
326 case GRAAL_INPUT_LINE :
328 XDrawLine( GraalGraphicDisplay,
329 XtWindow( GraalGraphicWindow ),
330 GraalXorGC,
tkIntXlibDecls.m (https://bitbucket.org/preining/tex-live.git) Objective C · 446 lines
dwsyms.lsp (https://github.com/huangjs/peval.git) Lisp · 148 lines
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
admin_gui.lua (https://github.com/multitheftauto/mtasa-resources.git) Lua · 294 lines
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);
180 XSetForeground (dpy (), gc, _style->lite);
radio.c (https://github.com/drafnel/Vis5d.git) C · 182 lines
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
gfx.c (https://github.com/blaws/Eye.git) C · 204 lines
HCIWindow.cc (https://bitbucket.org/SRIHARIP/xvision-revised.git) C++ · 108 lines
admin_gui.lua (https://gitlab.com/yasin3223/mtasa-resources) Lua · 240 lines
gfx_draw.c (https://github.com/freebasic/fbc.git) C · 276 lines
XMX_grid.c (https://github.com/clothbot/Alliance-VLSI-CAD-System.git) C · 312 lines
srgp_echo_X.c (https://gitlab.com/bratner/graphics.git) C · 339 lines
tixWCmpt.c (https://gitlab.com/OpenSourceMirror/sourcenav) C · 184 lines
video.c (https://gitlab.com/amiloradovsky/synth) C · 92 lines
graphics_context.hpp (https://github.com/ereslibre/x11.git) C++ Header · 202 lines
test11.c (git://pkgs.fedoraproject.org/lesstif) C · 186 lines
DrArc.c (git://pkgs.fedoraproject.org/nx) C · 85 lines
gfx_line.c (https://github.com/freebasic/fbc.git) C · 240 lines
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;
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
mxcustom.js (https://github.com/3xxx/engineercms.git) JavaScript · 346 lines
client.lua (https://gitlab.com/yasin3223/mtasa-resources) Lua · 90 lines
drawing.scm (https://github.com/bitwize/rscheme.git) Scheme · 278 lines
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.
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.
SlopeBox.C (git://pkgs.fedoraproject.org/ddd) C · 131 lines
52 BoxPoint origin = r.origin();
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();
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
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);
tooltip.lua (https://gitlab.com/yasin3223/mtasa-resources) Lua · 387 lines
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
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
89 dxDrawLine ( prevX, prevY, newX, newY, OVERLAY_LINE_COLOR, OVERLAY_LINE_WIDTH )
91 prevX = newX