148 pic = draw_UseSkinFor(pic);
152 width =
eX * theSize.x;
154 if(theSize.y <= theSize.x * 2)
158 square =
eY * theSize.y * 0.5;
159 bH =
eY * (0.25 * theSize.y / (theSize.x * 2));
160 drawsubpic(theOrigin, square + width, pic,
'0 0 0',
eX + bH, theColor, theAlpha, 0);
161 drawsubpic(theOrigin + square, square + width, pic,
eY - bH,
eX + bH, theColor, theAlpha, 0);
165 square =
eY * theSize.x;
166 drawsubpic(theOrigin, width + square, pic,
'0 0 0',
'1 0.25 0', theColor, theAlpha, 0);
167 drawsubpic(theOrigin + square, theSize - 2 * square, pic,
'0 0.25 0',
'1 0.5 0', theColor, theAlpha, 0);
168 drawsubpic(theOrigin +
height - square, width + square, pic,
'0 0.75 0',
'1 0.25 0', theColor, theAlpha, 0);
185 pic = draw_UseSkinFor(pic);
190 width =
eX * theSize.x;
193 if(theSize.x <= 0 || theSize.y <= 0)
195 if(theBorderSize.x <= 0)
197 if(theBorderSize.y <= 0)
199 drawsubpic(theOrigin, width +
height, pic,
'0.25 0.25 0',
'0.5 0.5 0', theColor, theAlpha, 0);
201 else if(theSize.y <= theBorderSize.y * 2)
204 bH =
eY * (0.25 * theSize.y / (theBorderSize.y * 2));
205 drawsubpic(theOrigin, width +
height * 0.5, pic,
'0.25 0 0',
'0.5 0 0' + bH, theColor, theAlpha, 0);
206 drawsubpic(theOrigin +
height * 0.5, width +
height * 0.5, pic,
'0.25 0 0' +
eY - bH,
'0.5 0 0' + bH, theColor, theAlpha, 0);
210 dY = theBorderSize.y *
eY;
211 drawsubpic(theOrigin, width + dY, pic,
'0.25 0 0',
'0.5 0.25 0', theColor, theAlpha, 0);
212 drawsubpic(theOrigin + dY, width +
height - 2 * dY, pic,
'0.25 0.25 0',
'0.5 0.5 0', theColor, theAlpha, 0);
213 drawsubpic(theOrigin +
height - dY, width + dY, pic,
'0.25 0.75 0',
'0.5 0.25 0', theColor, theAlpha, 0);
216 else if(theSize.x <= theBorderSize.x * 2)
219 bW =
eX * (0.25 * theSize.x / (theBorderSize.x * 2));
220 if(theBorderSize.y <= 0)
222 drawsubpic(theOrigin, width * 0.5 +
height, pic,
'0 0.25 0',
'0 0.5 0' + bW, theColor, theAlpha, 0);
223 drawsubpic(theOrigin + width * 0.5, width * 0.5 +
height, pic,
'0 0.25 0' +
eX - bW,
'0 0.5 0' + bW, theColor, theAlpha, 0);
225 else if(theSize.y <= theBorderSize.y * 2)
228 bH =
eY * (0.25 * theSize.y / (theBorderSize.y * 2));
229 drawsubpic(theOrigin, width * 0.5 +
height * 0.5, pic,
'0 0 0', bW + bH, theColor, theAlpha, 0);
230 drawsubpic(theOrigin + width * 0.5, width * 0.5 +
height * 0.5, pic,
eX - bW, bW + bH, theColor, theAlpha, 0);
232 drawsubpic(theOrigin + theSize * 0.5, width * 0.5 +
height * 0.5, pic,
eX +
eY - bW - bH, bW + bH, theColor, theAlpha, 0);
236 dY = theBorderSize.y *
eY;
237 drawsubpic(theOrigin, width * 0.5 + dY, pic,
'0 0 0',
'0 0.25 0' + bW, theColor, theAlpha, 0);
238 drawsubpic(theOrigin + width * 0.5, width * 0.5 + dY, pic,
'0 0 0' +
eX - bW,
'0 0.25 0' + bW, theColor, theAlpha, 0);
239 drawsubpic(theOrigin + dY, width * 0.5 +
height - 2 * dY, pic,
'0 0.25 0',
'0 0.5 0' + bW, theColor, theAlpha, 0);
240 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);
241 drawsubpic(theOrigin +
height - dY, width * 0.5 + dY, pic,
'0 0.75 0',
'0 0.25 0' + bW, theColor, theAlpha, 0);
242 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);
247 if(theBorderSize.y <= 0)
249 dX = theBorderSize.x *
eX;
250 drawsubpic(theOrigin, dX +
height, pic,
'0 0.25 0',
'0.25 0.5 0', theColor, theAlpha, 0);
251 drawsubpic(theOrigin + dX, width - 2 * dX +
height, pic,
'0.25 0.25 0',
'0.5 0.5 0', theColor, theAlpha, 0);
252 drawsubpic(theOrigin + width - dX, dX +
height, pic,
'0.75 0.25 0',
'0.25 0.5 0', theColor, theAlpha, 0);
254 else if(theSize.y <= theBorderSize.y * 2)
257 bH =
eY * (0.25 * theSize.y / (theBorderSize.y * 2));
258 dX = theBorderSize.x *
eX;
259 drawsubpic(theOrigin, dX +
height * 0.5, pic,
'0 0 0',
'0.25 0 0' + bH, theColor, theAlpha, 0);
260 drawsubpic(theOrigin + dX, width - 2 * dX +
height * 0.5, pic,
'0.25 0 0',
'0.5 0 0' + bH, theColor, theAlpha, 0);
261 drawsubpic(theOrigin + width - dX, dX +
height * 0.5, pic,
'0.75 0 0',
'0.25 0 0' + bH, theColor, theAlpha, 0);
262 drawsubpic(theOrigin +
height * 0.5, dX +
height * 0.5, pic,
'0 0 0' +
eY - bH,
'0.25 0 0' + bH, theColor, theAlpha, 0);
263 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);
264 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);
268 dX = theBorderSize.x *
eX;
269 dY = theBorderSize.y *
eY;
270 drawsubpic(theOrigin, dX + dY, pic,
'0 0 0',
'0.25 0.25 0', theColor, theAlpha, 0);
271 drawsubpic(theOrigin + dX, width - 2 * dX + dY, pic,
'0.25 0 0',
'0.5 0.25 0', theColor, theAlpha, 0);
272 drawsubpic(theOrigin + width - dX, dX + dY, pic,
'0.75 0 0',
'0.25 0.25 0', theColor, theAlpha, 0);
273 drawsubpic(theOrigin + dY, dX +
height - 2 * dY, pic,
'0 0.25 0',
'0.25 0.5 0', theColor, theAlpha, 0);
274 drawsubpic(theOrigin + dY + dX, width - 2 * dX +
height - 2 * dY, pic,
'0.25 0.25 0',
'0.5 0.5 0', theColor, theAlpha, 0);
275 drawsubpic(theOrigin + dY + width - dX, dX +
height - 2 * dY, pic,
'0.75 0.25 0',
'0.25 0.5 0', theColor, theAlpha, 0);
276 drawsubpic(theOrigin +
height - dY, dX + dY, pic,
'0 0.75 0',
'0.25 0.25 0', theColor, theAlpha, 0);
277 drawsubpic(theOrigin +
height - dY + dX, width - 2 * dX + dY, pic,
'0.25 0.75 0',
'0.5 0.25 0', theColor, theAlpha, 0);
278 drawsubpic(theOrigin +
height - dY + width - dX, dX + dY, pic,
'0.75 0.75 0',
'0.25 0.25 0', theColor, theAlpha, 0);