}
public Graphics2D getGraphics2D(NativeWindow nw, int tx, int ty, int width, int height) {
Insets ins = nw.getInsets();
if (WinGraphicsDevice.useOpenGL) {
return new OGLGraphics2D(nw, tx - ins.left, ty - ins.top, width, height);
}
if (WinGraphicsDevice.useGDI) {
return new WinGDIGraphics2D(nw, tx - ins.left, ty - ins.top, width, height);
}
return new WinGDIPGraphics2D(nw, tx - ins.left, ty - ins.top, width, height);