53 for (
int i=0;i<numResources;i++)
55 p->
resources.insert(resources[i].name,&resources[i]);
63 for (it.toFirst();(res=it.current());++it)
65 if (qstrcmp(res->
category,categoryName)==0)
67 QCString pathName = QCString(targetDir)+
"/"+res->
name;
69 if (!f.open(IO_WriteOnly) || f.writeBlock((
const char *)res->
data,res->
size)!=res->
size)
71 err(
"Failed to write resource '%s' to directory '%s'\n",res->
name,targetDir);
81 QCString pathName = QCString(targetDir)+
"/"+targetName;
90 if (f.open(IO_WriteOnly) && f.writeBlock((
const char *)res->
data,res->
size)==res->
size)
99 n = n.left(n.length()-4)+
".png";
100 uchar *
p = (uchar*)res->
data;
101 int width = (p[0]<<8)+p[1];
102 int height = (p[2]<<8)+p[3];
105 images[0].
width = width;
106 images[0].
height = height;
117 n = n.left(n.length()-5)+
".png";
118 uchar *
p = (uchar*)res->
data;
119 int width = (p[0]<<8)+p[1];
120 int height = (p[2]<<8)+p[3];
123 images[0].
width = width;
124 images[0].
height = height;
126 images[0].
alpha = &p[4+width*height];
135 if (f.open(IO_WriteOnly))
137 QCString buf(res->
size+1);
138 memcpy(buf.rawData(),res->
data,res->
size);
141 if (qstrcmp(name,
"navtree.css")==0)
157 err(
"requested resource '%s' not compiled in!\n",name);
177 QCString result(res->
size+1);
178 memcpy(result.rawData(),res->
data,res->
size);