SELECT t1
MOD 100B
FROM
16 => {
-- Manhattan Rectangle
x, width, y, height: INT;
height ← t1/100B + 1;
width ← CDMEBESScan.ReadMebesWord[source];
x ← CDMEBESScan.ReadMebesWord[source];
y ← CDMEBESScan.ReadMebesWord[source];
InsertRectangle[x, y, width, height];
};
17 => {
-- Parallelogram
tmp1, x, width, leftEdge, y, height: INT;
height ← t1/100B + 1;
width ← CDMEBESScan.ReadMebesWord[source];
x ← CDMEBESScan.ReadMebesWord[source];
y ← CDMEBESScan.ReadMebesWord[source];
leftEdge ← CDMEBESScan.ReadMebesWord[source];
tmp1 ← CDMEBESScan.ReadMebesWord[source];
width ← width + (tmp1 MOD 40B)*200000B;
tmp1 ← tmp1/40B;
x ← x + (tmp1 MOD 40B)*200000B;
tmp1 ← tmp1/40B;
leftEdge ←
leftEdge + (tmp1
MOD 100B)*200000B -
(IF tmp1/40B # 0 THEN 20000000B ELSE 0);
InsertTrapezoid[x, width, y, height, leftEdge, leftEdge];
};
18 => {
-- Trapezoid 1
tmp1, x, width, leftEdge, y, height: INT;
height ← t1/100B + 1;
width ← CDMEBESScan.ReadMebesWord[source];
x ← CDMEBESScan.ReadMebesWord[source];
y ← CDMEBESScan.ReadMebesWord[source];
leftEdge ← CDMEBESScan.ReadMebesWord[source];
tmp1 ← CDMEBESScan.ReadMebesWord[source];
width ← width + (tmp1 MOD 40B)*200000B;
tmp1 ← tmp1/40B;
x ← x + (tmp1 MOD 40B)*200000B;
tmp1 ← tmp1/40B;
leftEdge ←
leftEdge + (tmp1
MOD 100B)*200000B -
(IF tmp1/40B # 0 THEN 20000000B ELSE 0);
InsertTrapezoid[x, width, y, height, leftEdge, 0];
};
19 => {
-- Trapezoid 2
tmp1, x, width, rightEdge, y, height: INT;
height ← t1/100B + 1;
width ← CDMEBESScan.ReadMebesWord[source];
x ← CDMEBESScan.ReadMebesWord[source];
y ← CDMEBESScan.ReadMebesWord[source];
rightEdge ← CDMEBESScan.ReadMebesWord[source];
tmp1 ← CDMEBESScan.ReadMebesWord[source];
width ← width + (tmp1 MOD 40B)*200000B;
tmp1 ← tmp1/40B;
x ← x + (tmp1 MOD 40B)*200000B;
tmp1 ← tmp1/40B;
rightEdge ←
rightEdge + (tmp1
MOD 100B)*200000B -
(IF tmp1/40B # 0 THEN 20000000B ELSE 0);
InsertTrapezoid[x, width, y, height, 0, rightEdge];
};
20 => {
-- Trapezoid 3
tmp1, x, width, leftEdge, rightEdge, y, height: INT;
height ← t1/100B + 1;
width ← CDMEBESScan.ReadMebesWord[source];
x ← CDMEBESScan.ReadMebesWord[source];
y ← CDMEBESScan.ReadMebesWord[source];
leftEdge ← CDMEBESScan.ReadMebesWord[source];
rightEdge ← CDMEBESScan.ReadMebesWord[source];
tmp1 ← CDMEBESScan.ReadMebesWord[source];
width ← width + (tmp1 MOD 40B)*200000B;
tmp1 ← tmp1/40B;
x ← x + (tmp1 MOD 40B)*200000B;
tmp1 ← tmp1/40B;
leftEdge ←
leftEdge + (tmp1
MOD 100B)*200000B -
(IF tmp1/40B # 0 THEN 20000000B ELSE 0);
tmp1 ← y/2000B;
y ← y MOD 2000B;
rightEdge ←
rightEdge + (tmp1
MOD 100B)*200000B -
(IF tmp1/40B # 0 THEN 20000000B ELSE 0);
InsertTrapezoid[x, width, y, height, leftEdge, rightEdge];
};
10, 7 => NULL; -- start of segment or small stripe number
2 => [] ← CDMEBESScan.ReadMebesWord[source]; -- start of large stripe number
8 => RETURN; -- end of stripe
4 => RETURN; -- end of drawing
9 => {
-- end of buffer
i: INT = source.GetIndex[]+CDMEBES.mebesBlockSize-1;
source.SetIndex[i - (i MOD CDMEBES.mebesBlockSize)];
};
ENDCASE => ERROR CDMEBESScan.NotMEBESFormat;