Mispy
Mispy

Reputation: 879

Rendering a specific region of a BufferedGraphics buffer

I need to render a large PDF document into a Windows form control. For this to be performant, it would make sense to prerender the entire PDF into a graphics buffer and then blit the relevant part of that buffer in OnPaint.

However, BufferedGraphics.Render does not accept any arguments other than the target Graphics. How can I make it only render a certain region?

Upvotes: 2

Views: 280

Answers (1)

Chubosaurus Software
Chubosaurus Software

Reputation: 8161

Use the bounding Clip on the Graphics

MSDN Graphics.Clip Property

Another option is to Import the old BitBlt function.

Upvotes: 1

Related Questions