blob: 37b5c8937e305b6ced6ca67a2542650b31b1aa11 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
<!doctype HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>CD_DBUFFER</title>
<link rel="stylesheet" type="text/css" href="../../style.css">
</head>
<body>
<h2>CD_DBUFFER - Double Buffer Driver using a server image (cddbuf.h)</h2>
<p>Implements the concept of offscreen drawing. It is based on a Server Image
(the back buffer) and a Window canvas (the front buffer).</p>
<h3>Use</h3>
<p>The canvas is created by means of a call to function
<a href="../func/init.html#cdCreateCanvas">
<font face="Courier"><strong>cdCreateCanvas</strong></font></a><font face="Courier">(CD_DBUFFER,
Data)</font>, after which other functions in the CD library can be called as
usual. This function creates a CD canvas to use with an existing window canvas
(Native Windows or IUP). The parameter <font face="Courier">Data</font> is a
pointer to the already created canvas.</p>
<p>Any amount of such canvases may exist simultaneously. It is important to
note that a call to function
<a href="../func/init.html#cdKillCanvas">
<font face="Courier"><strong>cdKillCanvas</strong></font></a> is required to
properly <b>end</b> the driver. Call function
<a href="../func/init.html#cdKillCanvas">
<font face="Courier"><strong>cdKillCanvas</strong></font></a> for this driver
before calling <font face="Courier"><strong>cdKillCanvas</strong></font> for
the window driver.</p>
<p>The drawing functions will work normally as if they were drawn on
the server image driver. When function <font face="Courier"><b>
<a href="../func/control.html#cdFlush">
cdCanvasFlush</a></b></font> is executed, the image is drawn in the window canvas
passed as parameter in the canvas creation.</p>
<p>When the window's size changes, the server image is automatically recreated
using the same size as the canvas. This is done in the function
<font face="Courier"><b>
<a href="../func/init.html#cdActivate">
cdCanvasActivate</a></b></font>.</p>
<p>We suggest you to implement rubber bands using XOR directly on the front
buffer.</p>
<p>To use this driver in Windows using GDI+ is necessary to call
<font face="Courier"><strong>
cdUseContextPlus</strong></font><strong><font face="Courier">(1)</font></strong>
before creating the canvas.</p>
<h3>Behavior of Functions</h3>
<p>This driver is greatly platform-dependent. For further detail, see the <b>
Behavior of Functions</b> in each platform: <a href="win32.html">Microsoft
Windows (GDI)</a>, <a href="gdiplus.html">Windows Using GDI+</a>,
<a href="xwin.html">X-Windows (XLIB)</a>. However, it should be noted that
some functions behave differently from the basic functions of each platform.</p>
<h4>Control</h4>
<ul>
<li><a href="../func/control.html#cdFlush"><font face="Courier"><strong>Flush</strong></font></a>:
draws the contents of the image into the window. It is affected by <strong>
Origin</strong> and <strong>Clipping</strong>, but not by <strong>WriteMode</strong>.</li>
</ul>
<p> </p>
</body>
</html>
|