IF drawOutline
THEN {
OPEN h: cI.hint;
path: ImagerPath.Trajectory;
sw, se, ne, nw: IPCoTab.CornerSpace;
originX, originY: REAL;
dimX, dimY: REAL;
[originX, originY] ← co.origin;
originX ← xOffset + (originX * scaleFactor);
originY ← yOffset + (originY *scaleFactor);
[dimX, dimY] ← CT.GetDim[co];
dimX ← dimX * scaleFactor;
dimY ← dimY * scaleFactor;
[sw, se, ne, nw] ← CT.GetCornerSps[co];
Imager.SetGray[context, IPConstants.Black];
IF h.sw
THEN {
path ← ImagerPath.MoveTo[[originX, originY + sw.y * scaleFactor]];
path ← ImagerPath.LineToX[path, originX + sw.x * scaleFactor];
path ← ImagerPath.LineToY[path, originY]} ELSE {
path ← ImagerPath.MoveTo[[originX, originY]]};
IF h.se
THEN {
path ← ImagerPath.LineToX[path, originX+ dimX - se.x * scaleFactor];
path ← ImagerPath.LineToY[path, originY + se.y * scaleFactor];
path ← ImagerPath.LineToX[path, originX + dimX];} ELSE{
path ← ImagerPath.LineToX[path, originX + dimX];};
IF h.ne
THEN {
path ← ImagerPath.LineToY[path, originY +dimY - ne.y * scaleFactor];
path ← ImagerPath.LineToX[path, originX + dimX - ne.x * scaleFactor];
path ← ImagerPath.LineToY[path, originY + dimY];} ELSE {
path ← ImagerPath.LineToY[path, originY + dimY]};
IF h.nw
THEN {
path ← ImagerPath.LineToX[path, originX + nw.x * scaleFactor];
path ← ImagerPath.LineToY[path, originY + dimY - nw.y * scaleFactor];
path ← ImagerPath.LineToX[path, originX];} ELSE {
path ← ImagerPath.LineToX[path, originX]};
IF h.sw
THEN {
path ← ImagerPath.LineToY[path, originY + sw.y * scaleFactor];} ELSE {
path ← ImagerPath.LineToY[path, originY]};
Imager.MaskStrokeTrajectory[context, path];};