# vMemoryDC

A memory drawing canvas.

## Synopsis

Header:
  `<v/vmemdc.h>`
Class name:
  vMemoryDC

## Description

This drawing canvas can be used to draw to memory. Like all drawing canvases, the available methods are described in `vDC`. A very effective technique for using a memory canvas is to draw to both the screen canvas pane and a memory canvas during interactive drawing, and use the memory canvas to update the screen for `Redraw` events. This is especially useful if your application requires extensive computation to draw a screen.

## Methods

#### vMemoryDC(int width, int height)

The constructor is used to construct a memory DC of the specified width and height. This can be anything you need. If you are using the memory DC to update the screen for `Redraw` events, then it should be initialized to be big enough to repaint whatever you will be drawing on the physical screen. The methods `vApp::ScreenWidth()` and `vApp::ScreenHeight()` can be used to obtain the maximum size of the physical screen.

The method `CopyFromMemoryDC` is used to copy the contents of a memory DC to another DC. This can be another memory DC, but will usually be a canvas pane DC.