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

Function x11_DrawRectangle

source/x11/x11common.cpp:1872–1905  ·  view source on GitHub ↗

int XDrawRectangle(Display* display, Drawable d, GC gc, int x, int y, unsigned int width, unsigned int height)

Source from the content-addressed store, hash-verified

1870
1871// int XDrawRectangle(Display* display, Drawable d, GC gc, int x, int y, unsigned int width, unsigned int height)
1872static void x11_DrawRectangle(CPU* cpu) {
1873 KThread* thread = cpu->thread;
1874 XServer* server = XServer::getServer();
1875 XDrawablePtr drawable = server->getDrawable(ARG2);
1876 if (!drawable) {
1877 EAX = BadDrawable;
1878 return;
1879 }
1880 XGCPtr gc = server->getGC(ARG3);
1881 if (!gc) {
1882 EAX = BadGC;
1883 return;
1884 }
1885 if (server->traceGC) {
1886 BString log;
1887 DisplayDataPtr data = server->getDisplayDataByAddressOfDisplay(cpu->memory, ARG1);
1888
1889 log.append(data->displayId, 16);
1890 log += " DrawRectangle drawable=";
1891 log.append(ARG2, 16);
1892 log += " gc=";
1893 log.append(ARG3, 16);
1894 log += " x=";
1895 log += ARG4;
1896 log += " y=";
1897 log += ARG5;
1898 log += " width=";
1899 log += ARG6;
1900 log += " height=";
1901 log += ARG7;
1902 klog(log.c_str());
1903 }
1904 EAX = drawable->drawRectangle(thread, gc, ARG4, ARG5, ARG6, ARG7);
1905}
1906
1907// int XFillRectangle(Display* display, Drawable d, GC gc, int x, int y, unsigned int width, unsigned int height)
1908static void x11_FillRectangle(CPU* cpu) {

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected