Drawing context and p5.Graphics

I was using this function to generate quick shadows:

  drawingContext.shadowColor = color(0, 0, 0, 0.6);
  drawingContext.shadowBlur = 50;
  drawingContext.shadowOffsetX = -25;
  drawingContext.shadowOffsetY = -25;

but now im inside a pgraphics and cant it make it work. Its possible?
Any ideas?

A p5.Graphics object has a property named _renderer which points to a p5.Renderer object:

Which in turn has a property called drawingContext that you’re looking for: