VMemoryDC: Difference between revisions
Appearance
mNo edit summary |
mNo edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 2: | Line 2: | ||
==Synopsis== | ==Synopsis== | ||
; | ;Header: <tt><v/vmemdc.h></tt> | ||
: <tt><v/vmemdc.h></tt> | ;Class name: vMemoryDC | ||
; | |||
: vMemoryDC | |||
==Description== | ==Description== | ||
Line 11: | Line 9: | ||
==Methods== | ==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 <tt>Redraw</tt> events, then it should be initialized to be big enough to repaint whatever you will be drawing on the physical screen. The methods <tt>vApp::ScreenWidth()</tt> and <tt>vApp::ScreenHeight()</tt> can be used to obtain the maximum size of the physical screen. | |||
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 <tt>Redraw</tt> events, then it should be initialized to be big enough to repaint whatever you will be drawing on the physical screen. The methods <tt>vApp::ScreenWidth()</tt> and <tt>vApp::ScreenHeight()</tt> can be used to obtain the maximum size of the physical screen. | |||
The method <tt>CopyFromMemoryDC</tt> 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. | The method <tt>CopyFromMemoryDC</tt> 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. | ||
[[Category:V C++ GUI Framework]] | [[Category:V C++ GUI Framework]] |
Latest revision as of 22:20, 9 April 2020
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.