added setFrameByRatio