private void prepareFinalGraphicsAndSurface() { graphics = createGraphics(width, height); surface = graphics.GetSurface(); surface.InitFrame(this); if (!string.IsNullOrEmpty(internalTitle)) { surface.SetTitle(internalTitle); } if (internalFrameRate > 0) { surface.SetFrameRate(internalFrameRate); } foreach (Action <PGraphics> pendingAction in graphicsBuffer.PendingActions) { pendingAction(graphics); } }
public Sketch() { graphicsBuffer = new PGraphicsBuffer(); graphics = graphicsBuffer; colorMode(ColorMode.RGB); }