File: shadow_8h-source.html

package info (click to toggle)
paintlib 2.6.2-8
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 7,900 kB
  • ctags: 3,875
  • sloc: cpp: 25,209; sh: 10,600; ansic: 1,891; makefile: 119
file content (121 lines) | stat: -rw-r--r-- 6,716 bytes parent folder | download | duplicates (2)
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>paintlib: shadow.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.2 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Compound&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Compound&nbsp;Members</a></div>
<h1>shadow.h</h1><div class="fragment"><pre>00001 <span class="comment">/*</span>
00002 <span class="comment">/--------------------------------------------------------------------</span>
00003 <span class="comment">|</span>
00004 <span class="comment">|      $Id: shadow_8h-source.html,v 1.2 2004/09/15 15:26:32 uzadow Exp $</span>
00005 <span class="comment">|      Shadow Graphic item class</span>
00006 <span class="comment">|</span>
00007 <span class="comment">|      A shadowed region on a canvas. The item is basically a</span>
00008 <span class="comment">|      partially transparent region. Transparency is defined by an</span>
00009 <span class="comment">|      alpha DIB and a global transparency value. Most of the code</span>
00010 <span class="comment">|      was just copied from CDIBGrItem &amp; changed a bit.</span>
00011 <span class="comment">|</span>
00012 <span class="comment">|      Copyright (c) 1996-2002 Ulrich von Zadow</span>
00013 <span class="comment">|</span>
00014 <span class="comment">\--------------------------------------------------------------------</span>
00015 <span class="comment">*/</span>
00016 
00017 <span class="preprocessor">#ifndef INCL_SHADOW</span>
00018 <span class="preprocessor"></span><span class="preprocessor">#define INCL_SHADOW</span>
00019 <span class="preprocessor"></span>
00020 <span class="preprocessor">#include "plbitmap.h"</span>
00021 <span class="preprocessor">#include "gritem.h"</span>
00022 
00023 <span class="keyword">class </span>CShadowItem : <span class="keyword">public</span> CGrItem
00024 {
00025 
00026 DECLARE_DYNAMIC (CShadowItem);
00027 
00028 <span class="keyword">public</span>:
00029   CShadowItem
00030     ( <span class="keywordtype">int</span> x,             <span class="comment">// Position on the canvas</span>
00031       <span class="keywordtype">int</span> y,
00032       <span class="keywordtype">int</span> w,             <span class="comment">// Width</span>
00033       <span class="keywordtype">int</span> h,             <span class="comment">// Height</span>
00034       <span class="keywordtype">int</span> z,             <span class="comment">// Position in z-Order</span>
00035       PLBYTE Opacity,      <span class="comment">// Opacity of the object. 255 is completely</span>
00036                          <span class="comment">// opaque, 0 is completely transparent.</span>
00037       <a class="code" href="classPLPixel32.html">PLPixel32</a> * pColor, <span class="comment">// Shadow color.</span>
00038       <a class="code" href="classPLBmp.html">PLBmp</a> * pAlphaBmp   <span class="comment">// Alpha channel (must be 8 bpp). Can be NULL.</span>
00039     );
00040 
00041   ~CShadowItem
00042     ();
00043 
00044   <span class="keyword">virtual</span> <span class="keywordtype">void</span> Draw
00045     ( <a class="code" href="classPLBmp.html">PLBmp</a> * pCanvas,
00046       CRect * pUpdateRect
00047     );
00048     <span class="comment">// Responsible for drawing the object on the canvas.</span>
00049 
00050   <span class="comment">// Member variables.</span>
00051 
00052   <a class="code" href="classPLPixel32.html">PLPixel32</a>  m_Color;        <span class="comment">// Shadow color</span>
00053   <a class="code" href="classPLBmp.html">PLBmp</a>    * m_pAlphaBmp;
00054   PLBYTE   ** m_pLineArray;
00055 
00056 <span class="keyword">private</span>:
00057 
00058   <span class="keywordtype">void</span> drawClippedNoScale
00059     ( <a class="code" href="classPLBmp.html">PLBmp</a> * pCanvas,
00060       CRect * pRect
00061     );
00062     <span class="comment">// Draws the object. pRect must have been clipped already.</span>
00063     <span class="comment">// Assumes that no scaling is nessesary.</span>
00064 
00065   <span class="keywordtype">void</span> drawAlphaLine
00066     ( PLBYTE * pDest,
00067       PLBYTE * pAlpha,
00068       CRect * pRect
00069     );
00070 
00071   <span class="keywordtype">void</span> drawFadeLine
00072     ( PLBYTE * pDest,
00073       CRect * pRect
00074     );
00075     <span class="comment">// Draws one line. No scaling. Assumes alpha channel doesn't</span>
00076     <span class="comment">// exist.</span>
00077 
00078   <span class="keywordtype">void</span> drawClipped
00079     ( <a class="code" href="classPLBmp.html">PLBmp</a> * pCanvas,
00080       CRect * pRect
00081     );
00082     <span class="comment">// Draws the object. pRect must have been clipped already.</span>
00083 
00084   <span class="keywordtype">void</span> drawScaleLine
00085     ( PLBYTE * pDest,
00086       PLBYTE * pAlpha,
00087       CRect * pRect
00088     );
00089 
00090 };
00091 
00092 <span class="preprocessor">#endif</span>
00093 <span class="preprocessor"></span><span class="comment">/*</span>
00094 <span class="comment">/--------------------------------------------------------------------</span>
00095 <span class="comment">|</span>
00096 <span class="comment">|      $Log: shadow_8h-source.html,v $
00096 <span class="comment">|      Revision 1.2  2004/09/15 15:26:32  uzadow
00096 <span class="comment">|      Linux compatibility changes, doc update.
00096 <span class="comment">|</span>
00097 <span class="comment">|      Revision 1.5  2002/03/31 13:36:42  uzadow</span>
00098 <span class="comment">|      Updated copyright.</span>
00099 <span class="comment">|</span>
00100 <span class="comment">|      Revision 1.4  2001/09/16 19:03:23  uzadow</span>
00101 <span class="comment">|      Added global name prefix PL, changed most filenames.</span>
00102 <span class="comment">|</span>
00103 <span class="comment">|</span>
00104 <span class="comment">--------------------------------------------------------------------</span>
00105 <span class="comment">*/</span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Sep 13 16:16:41 2004 for paintlib by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
</a>1.3.2 </small></address>
</body>
</html>