TheEndless
14 years agoChannel Surfer
[SDK Bug] DrawScaledObject and SetScaleMode(1)
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.
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.