74 if(theSize.x == 0 || theSize.y <= 0)
106 width =
eX * theSize.x;
107 height =
eY * theSize.y;
108 if(theSize.x <= theSize.y * 2)
112 square =
eX * theSize.x * 0.5;
113 bW =
eX * (0.25 * theSize.x / (theSize.y * 2));
114 drawsubpic(theOrigin, square + height, pic,
'0 0 0',
eY + bW, theColor, theAlpha, 0);
115 drawsubpic(theOrigin + square, square + height, pic,
eX - bW,
eY + bW, theColor, theAlpha, 0);
119 square =
eX * theSize.y;
120 drawsubpic(theOrigin, height + square, pic,
'0 0 0',
'0.25 1 0', theColor, theAlpha, 0);
121 drawsubpic(theOrigin + square, theSize - 2 * square, pic,
'0.25 0 0',
'0.5 1 0', theColor, theAlpha, 0);
122 drawsubpic(theOrigin + width - square, height + square, pic,
'0.75 0 0',
'0.25 1 0', theColor, theAlpha, 0);
141 width =
eX * theSize.x;
142 height =
eY * theSize.y;
143 if(theSize.y <= theSize.x * 2)
147 square =
eY * theSize.y * 0.5;
148 bH =
eY * (0.25 * theSize.y / (theSize.x * 2));
149 drawsubpic(theOrigin, square + width, pic,
'0 0 0',
eX + bH, theColor, theAlpha, 0);
150 drawsubpic(theOrigin + square, square + width, pic,
eY - bH,
eX + bH, theColor, theAlpha, 0);
154 square =
eY * theSize.x;
155 drawsubpic(theOrigin, width + square, pic,
'0 0 0',
'1 0.25 0', theColor, theAlpha, 0);
156 drawsubpic(theOrigin + square, theSize - 2 * square, pic,
'0 0.25 0',
'1 0.5 0', theColor, theAlpha, 0);
157 drawsubpic(theOrigin + height - square, width + square, pic,
'0 0.75 0',
'1 0.25 0', theColor, theAlpha, 0);
179 width =
eX * theSize.x;
180 height =
eY * theSize.y;
182 if(theSize.x <= 0 || theSize.y <= 0)
184 if(theBorderSize.x <= 0)
186 if(theBorderSize.y <= 0)
188 drawsubpic(theOrigin, width + height, pic,
'0.25 0.25 0',
'0.5 0.5 0', theColor, theAlpha, 0);
190 else if(theSize.y <= theBorderSize.y * 2)
193 bH =
eY * (0.25 * theSize.y / (theBorderSize.y * 2));
194 drawsubpic(theOrigin, width + height * 0.5, pic,
'0.25 0 0',
'0.5 0 0' + bH, theColor, theAlpha, 0);
195 drawsubpic(theOrigin + height * 0.5, width + height * 0.5, pic,
'0.25 0 0' +
eY - bH,
'0.5 0 0' + bH, theColor, theAlpha, 0);
199 dY = theBorderSize.y *
eY;
200 drawsubpic(theOrigin, width + dY, pic,
'0.25 0 0',
'0.5 0.25 0', theColor, theAlpha, 0);
201 drawsubpic(theOrigin + dY, width + height - 2 * dY, pic,
'0.25 0.25 0',
'0.5 0.5 0', theColor, theAlpha, 0);
202 drawsubpic(theOrigin + height - dY, width + dY, pic,
'0.25 0.75 0',
'0.5 0.25 0', theColor, theAlpha, 0);
205 else if(theSize.x <= theBorderSize.x * 2)
208 bW =
eX * (0.25 * theSize.x / (theBorderSize.x * 2));
209 if(theBorderSize.y <= 0)
211 drawsubpic(theOrigin, width * 0.5 + height, pic,
'0 0.25 0',
'0 0.5 0' + bW, theColor, theAlpha, 0);
212 drawsubpic(theOrigin + width * 0.5, width * 0.5 + height, pic,
'0 0.25 0' +
eX - bW,
'0 0.5 0' + bW, theColor, theAlpha, 0);
214 else if(theSize.y <= theBorderSize.y * 2)
217 bH =
eY * (0.25 * theSize.y / (theBorderSize.y * 2));
218 drawsubpic(theOrigin, width * 0.5 + height * 0.5, pic,
'0 0 0', bW + bH, theColor, theAlpha, 0);
219 drawsubpic(theOrigin + width * 0.5, width * 0.5 + height * 0.5, pic,
eX - bW, bW + bH, theColor, theAlpha, 0);
220 drawsubpic(theOrigin + height * 0.5, width * 0.5 + height * 0.5, pic,
eY - bH, bW + bH, theColor, theAlpha, 0);
221 drawsubpic(theOrigin + theSize * 0.5, width * 0.5 + height * 0.5, pic,
eX +
eY - bW - bH, bW + bH, theColor, theAlpha, 0);
225 dY = theBorderSize.y *
eY;
226 drawsubpic(theOrigin, width * 0.5 + dY, pic,
'0 0 0',
'0 0.25 0' + bW, theColor, theAlpha, 0);
227 drawsubpic(theOrigin + width * 0.5, width * 0.5 + dY, pic,
'0 0 0' +
eX - bW,
'0 0.25 0' + bW, theColor, theAlpha, 0);
228 drawsubpic(theOrigin + dY, width * 0.5 + height - 2 * dY, pic,
'0 0.25 0',
'0 0.5 0' + bW, theColor, theAlpha, 0);
229 drawsubpic(theOrigin + width * 0.5 + dY, width * 0.5 + height - 2 * dY, pic,
'0 0.25 0' +
eX - bW,
'0 0.5 0' + bW, theColor, theAlpha, 0);
230 drawsubpic(theOrigin + height - dY, width * 0.5 + dY, pic,
'0 0.75 0',
'0 0.25 0' + bW, theColor, theAlpha, 0);
231 drawsubpic(theOrigin + width * 0.5 + height - dY, width * 0.5 + dY, pic,
'0 0.75 0' +
eX - bW,
'0 0.25 0' + bW, theColor, theAlpha, 0);
236 if(theBorderSize.y <= 0)
238 dX = theBorderSize.x *
eX;
239 drawsubpic(theOrigin, dX + height, pic,
'0 0.25 0',
'0.25 0.5 0', theColor, theAlpha, 0);
240 drawsubpic(theOrigin + dX, width - 2 * dX + height, pic,
'0.25 0.25 0',
'0.5 0.5 0', theColor, theAlpha, 0);
241 drawsubpic(theOrigin + width - dX, dX + height, pic,
'0.75 0.25 0',
'0.25 0.5 0', theColor, theAlpha, 0);
243 else if(theSize.y <= theBorderSize.y * 2)
246 bH =
eY * (0.25 * theSize.y / (theBorderSize.y * 2));
247 dX = theBorderSize.x *
eX;
248 drawsubpic(theOrigin, dX + height * 0.5, pic,
'0 0 0',
'0.25 0 0' + bH, theColor, theAlpha, 0);
249 drawsubpic(theOrigin + dX, width - 2 * dX + height * 0.5, pic,
'0.25 0 0',
'0.5 0 0' + bH, theColor, theAlpha, 0);
250 drawsubpic(theOrigin + width - dX, dX + height * 0.5, pic,
'0.75 0 0',
'0.25 0 0' + bH, theColor, theAlpha, 0);
251 drawsubpic(theOrigin + height * 0.5, dX + height * 0.5, pic,
'0 0 0' +
eY - bH,
'0.25 0 0' + bH, theColor, theAlpha, 0);
252 drawsubpic(theOrigin + dX + height * 0.5, width - 2 * dX + height * 0.5, pic,
'0.25 0 0' +
eY - bH,
'0.5 0 0' + bH, theColor, theAlpha, 0);
253 drawsubpic(theOrigin + width - dX + height * 0.5, dX + height * 0.5, pic,
'0.75 0 0' +
eY - bH,
'0.25 0 0' + bH, theColor, theAlpha, 0);
257 dX = theBorderSize.x *
eX;
258 dY = theBorderSize.y *
eY;
259 drawsubpic(theOrigin, dX + dY, pic,
'0 0 0',
'0.25 0.25 0', theColor, theAlpha, 0);
260 drawsubpic(theOrigin + dX, width - 2 * dX + dY, pic,
'0.25 0 0',
'0.5 0.25 0', theColor, theAlpha, 0);
261 drawsubpic(theOrigin + width - dX, dX + dY, pic,
'0.75 0 0',
'0.25 0.25 0', theColor, theAlpha, 0);
262 drawsubpic(theOrigin + dY, dX + height - 2 * dY, pic,
'0 0.25 0',
'0.25 0.5 0', theColor, theAlpha, 0);
263 drawsubpic(theOrigin + dY + dX, width - 2 * dX + height - 2 * dY, pic,
'0.25 0.25 0',
'0.5 0.5 0', theColor, theAlpha, 0);
264 drawsubpic(theOrigin + dY + width - dX, dX + height - 2 * dY, pic,
'0.75 0.25 0',
'0.25 0.5 0', theColor, theAlpha, 0);
265 drawsubpic(theOrigin + height - dY, dX + dY, pic,
'0 0.75 0',
'0.25 0.25 0', theColor, theAlpha, 0);
266 drawsubpic(theOrigin + height - dY + dX, width - 2 * dX + dY, pic,
'0.25 0.75 0',
'0.5 0.25 0', theColor, theAlpha, 0);
267 drawsubpic(theOrigin + height - dY + width - dX, dX + dY, pic,
'0.75 0.75 0',
'0.25 0.25 0', theColor, theAlpha, 0);
273 if(theSize.x <= 0 || theSize.y <= 0) {
290 draw_Text(theOrigin -
eX * 0.5 *
draw_TextWidth(theText, ICanHasKallerz, theSize), theText, theSize, theColor, theAlpha, ICanHasKallerz);
319 ATTRIB(ClipFrame, clip_scale, vector, '0 0 0');
331 ClipFrame e =
NEW(ClipFrame);
354 LOG_FATAL(
"Not clipping, can't clear it then");
358 delete(currentSettings);
ERASEABLE void IL_REMOVE(IntrusiveList this, entity it)
Remove any element, anywhere in the list.
#define draw_endBoldFont()
float textLengthUpToWidth(string theText, float maxWidth, vector theSize, textLengthUpToWidth_widthFunction_t w)
string textShortenToWidth(string theText, float maxWidth, vector theFontSize, textLengthUpToWidth_widthFunction_t tw)
limitations: NULL cannot be present elements can only be present once a maximum of IL_MAX lists can e...
vector drawgetimagesize(string pic)
float stringwidth(string text, float handleColors, vector sz)
string draw_UseSkinFor(string pic)
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
vector(float skel, float bonenum) _skel_get_boneabs_hidden
float drawsubpic(vector position, vector size, string pic, vector srcPosition, vector srcSize, vector rgb, float alpha, float flag)