I spent hours trying to figure out why this wouldn't work for me tonight, and finally found the problem...
DrawScaledObject() only works when the target is an roBitmap if SetScaleMode() is set to 0. If the scale mode is set to 1, it won't error, but it also won't draw anything. If the target is an roRegion, it will work with a scale mode of either 0 or 1, so the workaround is to create an roRegion for the bitmap and draw to that instead of the bitmap directly.
To further confound things, the documentation fails to mention that roRegion implements the ifDraw2D interface.
Re: [SDK Bug] DrawScaledObject and SetScaleMode(1)
IDK if I could be doing something wrong, but DrawScaledObject() isn't behaving as expected, even when it does draw. For example, I'm scaling a bitmap up by 2x in each direction. This is done so that I only need 1/4 of the space to store the bitmap. The bitmap is wider than the screen/viewport. I use an roRegion object to scroll through it. regionStart% represents the x-offset into that source bitmap. The ViewBM is the destination bitmap that receives the scaled object.
There is an extra line of testing code as noted by the arrow. It shows an unscaled version of the source in the upper left of the viewport.
The issue: the unscaled bitmap works fine and scrolls as expected as regionStart% is incremented. bw% and bh% are set to the correct sub-section of the source bitmap. The scaled result is moving diagonally even though the source region's Y value is 0. The scaled map at source-region 0,0 looks fine (hard to tell with overscan).
Thus, there seems to be an issue with a source region not at 0,0. This could be remedied by blitting it to a temp bitmap 1st, then scaling that, but I thought I should mention it since it is supposed to work on an roRegion. Or did I miss something/mess up my code and/or not understand the function?
Anyone else have an issue with a scaling bitmap using roRegion/DrawScaledObject at non 0,0 source?