Using ifDraw2D with SceneGraph

I would like to draw some more complex objects on my Roku channel. I have been using SceneGraph for everything but would like to utilize ifDraw2D functions in order to draw shapes, etc. What is the best way to do so? When I create my channel I use

screen = CreateObject("roSGScreen")

Do I just save a reference to this when I need to draw to the screen? I assume this means that I can’t draw from component code and there is no way for the drawn pixels to be “contained” by a SceneGraph node correct?

Start a task in scengraph , set up a roBitmap and draw what you need. use getPng(..) and save the result to device filesystem. use that path for a poster image in scenegraph.

Function SaveTestPng()
    w = 200 : h = 100
    bm = CreateObject("roBitmap", {width: w, height: h, AlphaEnable: true})
    bm.DrawRect(10, 10, w-20, h-20, &hFF0000FF)
    bm.Finish()
    ba = bm.GetPng(0, 0, w, h)
    ba.WriteFile("tmp:/test.png")
 End Function

This is code snippet gold, thank you!