I have the rectangle of view and the rate.
When the page is orthographic, I can get the view that I want, but the perspective page can not.
I found I can solve the problem by Layout, but I can not do it by Ruby API.
Ruby API
bounds = Geom::Bounds2d.new(x, y, width, height)
model = Layout::SketchUpModel.new(Sketchup.active_model.path, bounds)
model.current_scene = Sketchup.active_model.pages.to_a.index(@page) + 1
model.render_mode = Layout::SketchUpModel::RASTER_RENDER
model.perspective = false
model.scale = 1.0/100
model.perspective = true
model.line_weight = 0.1
By Layout