MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / x11_DrawLine

Function x11_DrawLine

source/x11/x11common.cpp:1820–1853  ·  view source on GitHub ↗

int XDrawLine(Display* display, Drawable d, GC gc, int x1, int y1, int x2, int y2)

Source from the content-addressed store, hash-verified

1818
1819// int XDrawLine(Display* display, Drawable d, GC gc, int x1, int y1, int x2, int y2)
1820static void x11_DrawLine(CPU* cpu) {
1821 KThread* thread = cpu->thread;
1822 XServer* server = XServer::getServer();
1823 XDrawablePtr drawable = server->getDrawable(ARG2);
1824 if (!drawable) {
1825 EAX = BadDrawable;
1826 return;
1827 }
1828 XGCPtr gc = server->getGC(ARG3);
1829 if (!gc) {
1830 EAX = BadGC;
1831 return;
1832 }
1833 if (server->traceGC) {
1834 BString log;
1835 DisplayDataPtr data = server->getDisplayDataByAddressOfDisplay(cpu->memory, ARG1);
1836
1837 log.append(data->displayId, 16);
1838 log += " DrawLine drawable=";
1839 log.append(ARG2, 16);
1840 log += " gc=";
1841 log.append(ARG3, 16);
1842 log += " x1=";
1843 log += ARG4;
1844 log += " y1=";
1845 log += ARG5;
1846 log += " x2=";
1847 log += ARG6;
1848 log += " y2=";
1849 log += ARG7;
1850 klog(log.c_str());
1851 }
1852 EAX = drawable->drawLine(thread, gc, ARG4, ARG5, ARG6, ARG7);
1853}
1854
1855static void x11_DrawLines(CPU* cpu) {
1856 //kpanic("x11_DrawLines");

Callers

nothing calls this directly

Calls 7

klogFunction · 0.85
getDrawableMethod · 0.80
getGCMethod · 0.80
drawLineMethod · 0.80
appendMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected