for (iGObject src : source) {
// Get base geometrie
Object base = src.GetPrimitive(rect.class);
if (base != null) {
rect oRect = (rect) base;
// Looping new Objects:
for (GExpressionItem item : exp.Items) { // Bsp: "5m ; Xm:Perimeter ; 5m"
if (directionX) { // Split X
float length = oRect.width;
// absolut, x or percentage
if (item.isNumber && (item.isAbsolut || item.isX || item.isPercentage)) // Bsp: 5m
new PRect (core, item.getString(), new rect (oRect.p1.x + item.getOffset(length, exp), oRect.p1.y, oRect.p1.x + item.getOffset(length, exp) + item.getNumber(length, 0), oRect.p2.y, oRect.z), src);
// Tilde
if (item.isTilde) {
for (int ii=0;ii<item.getCount(length);ii++) {
float num = item.getNumber(length, 0);
new PRect (core, item.getString(), new rect (oRect.p1.x, oRect.p1.y + item.getOffset(length, exp) + ii * num, oRect.p2.x, oRect.p1.y + item.getOffset(length, exp) + (ii + 1) * num, oRect.z), src);
}
}
} else { // Split Y
float length = oRect.depth;
if (item.isNumber && item.isAbsolut) // Bsp: 5m
new PRect (core, item.getString(), new rect (oRect.p1.x, oRect.p1.y + item.getOffset(length, exp), oRect.p2.x, oRect.p1.y + item.getOffset(length, exp) + item.getNumber(0, 0), oRect.z), src);
// X
if (item.isNumber && item.isX) // Bsp: Xm
new PRect (core, item.getString(), new rect (oRect.p1.x, oRect.p1.y + item.getOffset(length, exp), oRect.p2.x, oRect.p1.y + item.getOffset(length, exp) + item.getNumber(length, 0), oRect.z), src);
// Tilde
if (item.isTilde) {
for (int ii=0;ii<item.getCount(length);ii++) {
float num = item.getNumber(length, 0);
new PRect (core, item.getString(), new rect (oRect.p1.x, oRect.p1.y + item.getOffset(length, exp) + ii * num, oRect.p2.x, oRect.p1.y + item.getOffset(length, exp) + (ii + 1) * num, oRect.z), src);
}
}
}