SHERLOCK: Implement RT drawAllShapes and support methods

This commit is contained in:
Paul Gilbert 2015-06-02 21:26:42 -04:00
parent fdd220e9f7
commit 1f9d1e9c16
10 changed files with 325 additions and 95 deletions

View file

@ -496,4 +496,32 @@ int ImageFrame::sDrawYSize(int scaleVal) const {
return result;
}
int ImageFrame::sDrawXOffset(int scaleVal) const {
int width = _offset.x;
int scale = scaleVal == 0 ? 1 : scaleVal;
if (scaleVal >= 256)
--width;
int result = width * 256 / scale;
if (scaleVal >= 256)
++result;
return result;
}
int ImageFrame::sDrawYOffset(int scaleVal) const {
int height = _offset.y;
int scale = scaleVal == 0 ? 1 : scaleVal;
if (scaleVal >= 256)
--height;
int result = height * 256 / scale;
if (scaleVal >= 256)
++result;
return result;
}
} // End of namespace Sherlock