Initialize graphics engine from widget.