added framebuffer to canvas

Enhanced subRegion to support rendering into a texture using a framebuffer.