[prev in list] [next in list] [prev in thread] [next in thread]
List: ros-diffs
Subject: [ros-diffs] [CVS reactos] 1. implemented hatched brushes
From: weiden () osexperts ! com
Date: 2004-04-25 11:34:13
Message-ID: 20040425113413.3C4C643AA () mok ! osexperts ! com
[Download RAW message or body]
<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>reactos</tt></b><span id="info"> on \
MAIN</span></td></tr> <tr><td><tt>include/win32k/<a \
href="#file1">brush.h</a></tt></td><td align="right" id="added">+2</td><td \
align="right" id="removed">-2</td><td nowrap="nowrap" align="center"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/include/win32k/brush.h?rev=1.14&content-type=text/x-cvsweb-markup">1.14</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/include/win32k/brush.h.diff?r1=text&tr1=1.14&r2=text&tr2=1.15&f=h">-></a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/include/win32k/brush.h?rev=1.15&content-type=text/x-cvsweb-markup">1.15</a></td></tr>
<tr class="alt"><td><tt>subsys/win32k/dib/<a \
href="#file2">dib16bpp.c</a></tt></td><td align="right" id="added">+5</td><td \
align="right" id="removed">-5</td><td nowrap="nowrap" align="center"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/dib/dib16bpp.c?rev=1.29&content-type=text/x-cvsweb-markup">1.29</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/dib/dib16bpp.c.diff?r1=text&tr1=1.29&r2=text&tr2=1.30&f=h">-></a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/dib/dib16bpp.c?rev=1.30&content-type=text/x-cvsweb-markup">1.30</a></td></tr>
<tr><td><tt> /<a \
href="#file3">dib1bpp.c</a></tt></td><td align="right" id="added">+8</td><td \
align="right" id="removed">-8</td><td nowrap="nowrap" align="center"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/dib/dib1bpp.c?rev=1.24&content-type=text/x-cvsweb-markup">1.24</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/dib/dib1bpp.c.diff?r1=text&tr1=1.24&r2=text&tr2=1.25&f=h">-></a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/dib/dib1bpp.c?rev=1.25&content-type=text/x-cvsweb-markup">1.25</a></td></tr>
<tr class="alt"><td><tt> /<a \
href="#file4">dib24bpp.c</a></tt></td><td align="right" id="added">+3</td><td \
align="right" id="removed">-3</td><td nowrap="nowrap" align="center"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/dib/dib24bpp.c?rev=1.24&content-type=text/x-cvsweb-markup">1.24</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/dib/dib24bpp.c.diff?r1=text&tr1=1.24&r2=text&tr2=1.25&f=h">-></a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/dib/dib24bpp.c?rev=1.25&content-type=text/x-cvsweb-markup">1.25</a></td></tr>
<tr><td><tt> /<a \
href="#file5">dib32bpp.c</a></tt></td><td align="right" id="added">+3</td><td \
align="right" id="removed">-3</td><td nowrap="nowrap" align="center"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/dib/dib32bpp.c?rev=1.24&content-type=text/x-cvsweb-markup">1.24</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/dib/dib32bpp.c.diff?r1=text&tr1=1.24&r2=text&tr2=1.25&f=h">-></a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/dib/dib32bpp.c?rev=1.25&content-type=text/x-cvsweb-markup">1.25</a></td></tr>
<tr class="alt"><td><tt> /<a \
href="#file6">dib8bpp.c</a></tt></td><td align="right" id="added">+7</td><td \
align="right" id="removed">-7</td><td nowrap="nowrap" align="center"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/dib/dib8bpp.c?rev=1.22&content-type=text/x-cvsweb-markup">1.22</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/dib/dib8bpp.c.diff?r1=text&tr1=1.22&r2=text&tr2=1.23&f=h">-></a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/dib/dib8bpp.c?rev=1.23&content-type=text/x-cvsweb-markup">1.23</a></td></tr>
<tr><td><tt>subsys/win32k/eng/<a href="#file7">bitblt.c</a></tt></td><td \
align="right" id="added">+13</td><td align="right" id="removed">-2</td><td \
nowrap="nowrap" align="center"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/eng/bitblt.c?rev=1.51&content-type=text/x-cvsweb-markup">1.51</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/eng/bitblt.c.diff?r1=text&tr1=1.51&r2=text&tr2=1.52&f=h">-></a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/eng/bitblt.c?rev=1.52&content-type=text/x-cvsweb-markup">1.52</a></td></tr>
<tr class="alt"><td><tt>subsys/win32k/objects/<a \
href="#file8">bitmaps.c</a></tt></td><td align="right" id="added">+10</td><td \
align="right" id="removed">-3</td><td nowrap="nowrap" align="center"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/objects/bitmaps.c?rev=1.69&content-type=text/x-cvsweb-markup">1.69</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/objects/bitmaps.c.diff?r1=text&tr1=1.69&r2=text&tr2=1.70&f=h">-></a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/objects/bitmaps.c?rev=1.70&content-type=text/x-cvsweb-markup">1.70</a></td></tr>
<tr><td><tt> /<a \
href="#file9">brush.c</a></tt></td><td align="right" id="added">+64</td><td \
align="right" id="removed">-10</td><td nowrap="nowrap" align="center"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/objects/brush.c?rev=1.34&content-type=text/x-cvsweb-markup">1.34</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/objects/brush.c.diff?r1=text&tr1=1.34&r2=text&tr2=1.35&f=h">-></a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/objects/brush.c?rev=1.35&content-type=text/x-cvsweb-markup">1.35</a></td></tr>
<tr class="alt"><td><tt> /<a \
href="#file10">dc.c</a></tt></td><td align="right" id="added">+8</td><td \
align="right" id="removed">-2</td><td nowrap="nowrap" align="center"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/objects/dc.c?rev=1.128&content-type=text/x-cvsweb-markup">1.128</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/objects/dc.c.diff?r1=text&tr1=1.128&r2=text&tr2=1.129&f=h">-></a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/objects/dc.c?rev=1.129&content-type=text/x-cvsweb-markup">1.129</a></td></tr>
<tr><td></td><td align="right" id="added">+123</td><td align="right" \
id="removed">-45</td><td></td></tr> </table>
<small id="info">10 modified files</small><br />
<pre class="comment">
1. implemented hatched brushes
2. fixed memory leak when deleting patterned brushes
3. use brush origin in dib code
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos">reactos</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/include">include</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/include/win32k">win32k</a><br \
/></span> <div class="fileheader"><big><b>brush.h</b></big> <small id="info"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/include/win32k/brush.h?rev=1.14&content-type=text/x-cvsweb-markup">1.14</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/include/win32k/brush.h.diff?r1=text&tr1=1.14&r2=text&tr2=1.15&f=h">-></a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/include/win32k/brush.h?rev=1.15&content-type=text/x-cvsweb-markup">1.15</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.14 -r1.15
--- brush.h 9 Apr 2004 20:03:11 -0000 1.14
+++ brush.h 25 Apr 2004 11:34:12 -0000 1.15
@@ -31,7 +31,7 @@
</small></pre><pre class="diff" id="context"> ULONG ulBrushUnique;
BRUSHATTR *pBrushAttr;
BRUSHATTR BrushAttr;
</pre><pre class="diff" id="removed">- ULONG Unknown30;
</pre><pre class="diff" id="added">+ POINT ptOrigin;
</pre><pre class="diff" id="context"> ULONG bCacheGrabbed;
COLORREF crBack;
COLORREF crFore;
</pre><pre class="diff"><small id="info">@@ -66,7 +66,7 @@
</small></pre><pre class="diff" id="context"> #define GDIBRUSH_IS_MASKING 0x8000 /* \
Pattern bitmap is used as transparent mask (?) */ #define \
GDIBRUSH_CACHED_IS_SOLID 0x80000000
</pre><pre class="diff" id="removed">-#define BRUSHOBJ_AllocBrush() ((HBRUSH) \
GDIOBJ_AllocObj (sizeof(GDIBRUSHOBJ), GDI_OBJECT_TYPE_BRUSH, <span \
id="removedchars">NULL</span>)) </pre><pre class="diff" id="added">+#define \
BRUSHOBJ_AllocBrush() ((HBRUSH) GDIOBJ_AllocObj (sizeof(GDIBRUSHOBJ), \
GDI_OBJECT_TYPE_BRUSH, <span \
id="addedchars">(GDICLEANUPPROC) Brush_InternalDelete</span>)) </pre><pre \
class="diff" id="context"> #define BRUSHOBJ_FreeBrush(hBrush) \
GDIOBJ_FreeObj((HGDIOBJ)hBrush, GDI_OBJECT_TYPE_BRUSH, GDIOBJFLAG_DEFAULT) #define \
BRUSHOBJ_LockBrush(hBrush) ((PGDIBRUSHOBJ)GDIOBJ_LockObj((HGDIOBJ)hBrush, \
GDI_OBJECT_TYPE_BRUSH)) #define BRUSHOBJ_UnlockBrush(hBrush) \
GDIOBJ_UnlockObj((HGDIOBJ)hBrush, GDI_OBJECT_TYPE_BRUSH) </pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos">reactos</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys">subsys</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k">win32k</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/dib">dib</a><br \
/></span> <div class="fileheader"><big><b>dib16bpp.c</b></big> <small id="info"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/dib/dib16bpp.c?rev=1.29&content-type=text/x-cvsweb-markup">1.29</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/dib/dib16bpp.c.diff?r1=text&tr1=1.29&r2=text&tr2=1.30&f=h">-></a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/dib/dib16bpp.c?rev=1.30&content-type=text/x-cvsweb-markup">1.30</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.29 -r1.30
--- dib16bpp.c 9 Apr 2004 22:00:38 -0000 1.29
+++ dib16bpp.c 25 Apr 2004 11:34:12 -0000 1.30
@@ -16,7 +16,7 @@
</small></pre><pre class="diff" id="context"> * along with this program; if not, \
write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
</pre><pre class="diff" id="removed">-/* $Id: dib16bpp.c,v 1.29 2004/04/09 22:00:38 \
navaraf Exp $ */ </pre><pre class="diff" id="added">+/* $Id: dib16bpp.c,v 1.30 \
2004/04/25 11:34:12 weiden Exp $ */ </pre><pre class="diff" id="context"> #undef \
WIN32_LEAN_AND_MEAN #include <windows.h>
#include <stdlib.h>
</pre><pre class="diff"><small id="info">@@ -351,7 +351,7 @@
</small></pre><pre class="diff" id="context"> SourceX = SourcePoint->x;
if(UsesPattern)
</pre><pre class="diff" id="removed">- PatternY = <span \
id="removedchars">Y</span> % PatternHeight; </pre><pre class="diff" id="added">+ \
PatternY = <span id="addedchars">(Y + BrushOrigin.y)</span> % \
PatternHeight; </pre><pre class="diff" id="context">
for (X = DestRect->left; X < RoundedRight; X += 2, DestBits++, SourceX \
+= 2) {
</pre><pre class="diff"><small id="info">@@ -365,8 +365,8 @@
</small></pre><pre class="diff" id="context">
if (UsesPattern)
{
</pre><pre class="diff" id="removed">- Pattern = \
(DIB_1BPP_GetPixel(PatternObj, X % PatternWidth, PatternY) ? GdiBrush->crFore : \
GdiBrush->crBack);
- Pattern |= (DIB_1BPP_GetPixel(PatternObj, (X + 1) % PatternWidth, \
PatternY) ? GdiBrush->crFore : GdiBrush->crBack) << 16; </pre><pre \
class="diff" id="added">+ Pattern = (DIB_1BPP_GetPixel(PatternObj, (X + \
BrushOrigin.x) % PatternWidth, PatternY) ? GdiBrush->crFore : \
GdiBrush->crBack); + Pattern |= (DIB_1BPP_GetPixel(PatternObj, (X + \
BrushOrigin.x + 1) % PatternWidth, PatternY) ? GdiBrush->crFore : \
GdiBrush->crBack) << 16; </pre><pre class="diff" id="context"> }
*DestBits = DIB_DoRop(Rop4, Dest, Source, Pattern);
</pre><pre class="diff"><small id="info">@@ -383,7 +383,7 @@
</small></pre><pre class="diff" id="context">
if (UsesPattern)
{
</pre><pre class="diff" id="removed">- Pattern = \
DIB_1BPP_GetPixel(PatternObj, <span id="removedchars">X</span> % PatternWidth, \
PatternY) ? GdiBrush->crFore : GdiBrush->crBack; </pre><pre class="diff" \
id="added">+ Pattern = DIB_1BPP_GetPixel(PatternObj, <span \
id="addedchars">(X + BrushOrigin.x)</span> % PatternWidth, PatternY) ? \
GdiBrush->crFore : GdiBrush->crBack; </pre><pre class="diff" id="context"> \
}
DIB_16BPP_PutPixel(DestSurf, X, Y, DIB_DoRop(Rop4, Dest, Source, Pattern) \
& 0xFFFF); </pre></div>
<hr /><a name="file3" /><div class="file">
<span class="pathname"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos">reactos</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys">subsys</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k">win32k</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/dib">dib</a><br \
/></span> <div class="fileheader"><big><b>dib1bpp.c</b></big> <small id="info"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/dib/dib1bpp.c?rev=1.24&content-type=text/x-cvsweb-markup">1.24</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/dib/dib1bpp.c.diff?r1=text&tr1=1.24&r2=text&tr2=1.25&f=h">-></a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/dib/dib1bpp.c?rev=1.25&content-type=text/x-cvsweb-markup">1.25</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.24 -r1.25
--- dib1bpp.c 9 Apr 2004 22:00:38 -0000 1.24
+++ dib1bpp.c 25 Apr 2004 11:34:12 -0000 1.25
@@ -16,7 +16,7 @@
</small></pre><pre class="diff" id="context"> * along with this program; if not, \
write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
</pre><pre class="diff" id="removed">-/* $Id: dib1bpp.c,v 1.24 2004/04/09 22:00:38 \
navaraf Exp $ */ </pre><pre class="diff" id="added">+/* $Id: dib1bpp.c,v 1.25 \
2004/04/25 11:34:12 weiden Exp $ */ </pre><pre class="diff" id="context">
#undef WIN32_LEAN_AND_MEAN
#include <windows.h>
</pre><pre class="diff"><small id="info">@@ -423,7 +423,7 @@
</small></pre><pre class="diff" id="context"> Y * DestSurf->lDelta);
if(UsesPattern)
</pre><pre class="diff" id="removed">- PatternY = <span \
id="removedchars">Y</span> % PatternHeight; </pre><pre class="diff" id="added">+ \
PatternY = <span id="addedchars">(Y + BrushOrigin.y)</span> % \
PatternHeight; </pre><pre class="diff" id="context">
X = DestRect->left;
if (X & 31)
</pre><pre class="diff"><small id="info">@@ -444,7 +444,7 @@
</small></pre><pre class="diff" id="context"> {
Pattern = 0;
for (k = 31 - NoBits; k < NoBits; k++)
</pre><pre class="diff" id="removed">- Pattern |= \
(DIB_1BPP_GetPixel(PatternObj, (X + k) % PatternWidth, PatternY) << (31 - k)); \
</pre><pre class="diff" id="added">+ Pattern |= \
(DIB_1BPP_GetPixel(PatternObj, (X + <span \
id="addedchars">BrushOrigin.x + </span>k) % PatternWidth, PatternY) \
<< (31 - k)); </pre><pre class="diff" id="context"> }
Dest = DIB_DoRop(Rop4, Dest, Source, Pattern);
</pre><pre class="diff"><small id="info">@@ -478,10 +478,10 @@
</small></pre><pre class="diff" id="context"> Pattern = 0;
for (k = 0; k < 8; k++)
{
</pre><pre class="diff" id="removed">- Pattern |= \
(DIB_1BPP_GetPixel(PatternObj, (X + k) % PatternWidth, PatternY) \
<< (7 - k));
- Pattern |= (DIB_1BPP_GetPixel(PatternObj, (X + k + 8) % PatternWidth, \
PatternY) << (8 + (7 - k)));
- Pattern |= (DIB_1BPP_GetPixel(PatternObj, (X + k + 16) % \
PatternWidth, PatternY) << (16 + (7 - k)));
- Pattern |= (DIB_1BPP_GetPixel(PatternObj, (X + k + 24) % \
PatternWidth, PatternY) << (24 + (7 - k))); </pre><pre class="diff" \
id="added">+ Pattern |= (DIB_1BPP_GetPixel(PatternObj, (X + \
BrushOrigin.x + k) % PatternWidth, PatternY) << (7 - k)); + \
Pattern |= (DIB_1BPP_GetPixel(PatternObj, (X + BrushOrigin.x + k + 8) % PatternWidth, \
PatternY) << (8 + (7 - k))); + Pattern |= \
(DIB_1BPP_GetPixel(PatternObj, (X + BrushOrigin.x + k + 16) % PatternWidth, PatternY) \
<< (16 + (7 - k))); + Pattern |= (DIB_1BPP_GetPixel(PatternObj, \
(X + BrushOrigin.x + k + 24) % PatternWidth, PatternY) << (24 + (7 - k))); \
</pre><pre class="diff" id="context"> } }
</pre><pre class="diff"><small id="info">@@ -503,7 +503,7 @@
</small></pre><pre class="diff" id="context">
if (UsesPattern)
{
</pre><pre class="diff" id="removed">- Pattern = \
DIB_1BPP_GetPixel(PatternObj, <span id="removedchars">X</span> % PatternWidth, \
PatternY); </pre><pre class="diff" id="added">+ Pattern = \
DIB_1BPP_GetPixel(PatternObj, <span \
id="addedchars">(X + BrushOrigin.x)</span> % PatternWidth, PatternY); \
</pre><pre class="diff" id="context"> }
DIB_1BPP_PutPixel(DestSurf, X, Y, DIB_DoRop(Rop4, Dest, Source, Pattern) \
& 0xF); </pre></div>
<hr /><a name="file4" /><div class="file">
<span class="pathname"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos">reactos</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys">subsys</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k">win32k</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/dib">dib</a><br \
/></span> <div class="fileheader"><big><b>dib24bpp.c</b></big> <small id="info"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/dib/dib24bpp.c?rev=1.24&content-type=text/x-cvsweb-markup">1.24</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/dib/dib24bpp.c.diff?r1=text&tr1=1.24&r2=text&tr2=1.25&f=h">-></a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/dib/dib24bpp.c?rev=1.25&content-type=text/x-cvsweb-markup">1.25</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.24 -r1.25
--- dib24bpp.c 9 Apr 2004 22:00:38 -0000 1.24
+++ dib24bpp.c 25 Apr 2004 11:34:12 -0000 1.25
@@ -16,7 +16,7 @@
</small></pre><pre class="diff" id="context"> * along with this program; if not, \
write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
</pre><pre class="diff" id="removed">-/* $Id: dib24bpp.c,v 1.24 2004/04/09 22:00:38 \
navaraf Exp $ */ </pre><pre class="diff" id="added">+/* $Id: dib24bpp.c,v 1.25 \
2004/04/25 11:34:12 weiden Exp $ */ </pre><pre class="diff" id="context"> #undef \
WIN32_LEAN_AND_MEAN #include <windows.h>
#include <stdlib.h>
</pre><pre class="diff"><small id="info">@@ -319,7 +319,7 @@
</small></pre><pre class="diff" id="context"> SourceX = SourcePoint->x;
if(UsesPattern)
</pre><pre class="diff" id="removed">- PatternY = <span \
id="removedchars">Y</span> % PatternHeight; </pre><pre class="diff" id="added">+ \
PatternY = <span id="addedchars">(Y + BrushOrigin.y)</span> % \
PatternHeight; </pre><pre class="diff" id="context">
for (X = DestRect->left; X < DestRect->right; X++, DestBits += 3, \
SourceX++) {
</pre><pre class="diff"><small id="info">@@ -332,7 +332,7 @@
</small></pre><pre class="diff" id="context">
if (UsesPattern)
{
</pre><pre class="diff" id="removed">- Pattern = \
DIB_1BPP_GetPixel(PatternObj, <span id="removedchars">X</span> % PatternWidth, \
PatternY) ? GdiBrush->crFore : GdiBrush->crBack; </pre><pre class="diff" \
id="added">+ Pattern = DIB_1BPP_GetPixel(PatternObj, <span \
id="addedchars">(X + BrushOrigin.x)</span> % PatternWidth, PatternY) ? \
GdiBrush->crFore : GdiBrush->crBack; </pre><pre class="diff" id="context"> \
}
Dest = DIB_DoRop(Rop4, Dest, Source, Pattern) & 0xFFFFFF;
</pre></div>
<hr /><a name="file5" /><div class="file">
<span class="pathname"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos">reactos</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys">subsys</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k">win32k</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/dib">dib</a><br \
/></span> <div class="fileheader"><big><b>dib32bpp.c</b></big> <small id="info"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/dib/dib32bpp.c?rev=1.24&content-type=text/x-cvsweb-markup">1.24</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/dib/dib32bpp.c.diff?r1=text&tr1=1.24&r2=text&tr2=1.25&f=h">-></a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/dib/dib32bpp.c?rev=1.25&content-type=text/x-cvsweb-markup">1.25</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.24 -r1.25
--- dib32bpp.c 9 Apr 2004 22:00:38 -0000 1.24
+++ dib32bpp.c 25 Apr 2004 11:34:12 -0000 1.25
@@ -16,7 +16,7 @@
</small></pre><pre class="diff" id="context"> * along with this program; if not, \
write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
</pre><pre class="diff" id="removed">-/* $Id: dib32bpp.c,v 1.24 2004/04/09 22:00:38 \
navaraf Exp $ */ </pre><pre class="diff" id="added">+/* $Id: dib32bpp.c,v 1.25 \
2004/04/25 11:34:12 weiden Exp $ */ </pre><pre class="diff" id="context"> #undef \
WIN32_LEAN_AND_MEAN #include <windows.h>
#include <stdlib.h>
</pre><pre class="diff"><small id="info">@@ -370,7 +370,7 @@
</small></pre><pre class="diff" id="context"> SourceX = SourcePoint->x;
if(UsesPattern)
</pre><pre class="diff" id="removed">- PatternY = <span \
id="removedchars">Y</span> % PatternHeight; </pre><pre class="diff" id="added">+ \
PatternY = <span id="addedchars">(Y + BrushOrigin.y)</span> % \
PatternHeight; </pre><pre class="diff" id="context">
for (X = DestRect->left; X < DestRect->right; X++, DestBits++, \
SourceX++) {
</pre><pre class="diff"><small id="info">@@ -383,7 +383,7 @@
</small></pre><pre class="diff" id="context">
if (UsesPattern)
{
</pre><pre class="diff" id="removed">- Pattern = \
DIB_1BPP_GetPixel(PatternObj, <span id="removedchars">X</span> % PatternWidth, \
PatternY) ? GdiBrush->crFore : GdiBrush->crBack; </pre><pre class="diff" \
id="added">+ Pattern = DIB_1BPP_GetPixel(PatternObj, <span \
id="addedchars">(X + BrushOrigin.x)</span> % PatternWidth, PatternY) ? \
GdiBrush->crFore : GdiBrush->crBack; </pre><pre class="diff" id="context"> \
}
*DestBits = DIB_DoRop(Rop4, Dest, Source, Pattern);
</pre></div>
<hr /><a name="file6" /><div class="file">
<span class="pathname"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos">reactos</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys">subsys</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k">win32k</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/dib">dib</a><br \
/></span> <div class="fileheader"><big><b>dib8bpp.c</b></big> <small id="info"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/dib/dib8bpp.c?rev=1.22&content-type=text/x-cvsweb-markup">1.22</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/dib/dib8bpp.c.diff?r1=text&tr1=1.22&r2=text&tr2=1.23&f=h">-></a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/dib/dib8bpp.c?rev=1.23&content-type=text/x-cvsweb-markup">1.23</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.22 -r1.23
--- dib8bpp.c 9 Apr 2004 22:00:38 -0000 1.22
+++ dib8bpp.c 25 Apr 2004 11:34:12 -0000 1.23
@@ -16,7 +16,7 @@
</small></pre><pre class="diff" id="context"> * along with this program; if not, \
write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
</pre><pre class="diff" id="removed">-/* $Id: dib8bpp.c,v 1.22 2004/04/09 22:00:38 \
navaraf Exp $ */ </pre><pre class="diff" id="added">+/* $Id: dib8bpp.c,v 1.23 \
2004/04/25 11:34:12 weiden Exp $ */ </pre><pre class="diff" id="context"> #undef \
WIN32_LEAN_AND_MEAN #include <windows.h>
#include <stdlib.h>
</pre><pre class="diff"><small id="info">@@ -343,7 +343,7 @@
</small></pre><pre class="diff" id="context"> DestBits = \
(PULONG)(DestSurf->pvScan0 + DestRect->left + j * DestSurf->lDelta);
if(UsesPattern)
</pre><pre class="diff" id="removed">- PatternY = <span \
id="removedchars">j</span> % PatternHeight; </pre><pre class="diff" id="added">+ \
PatternY = <span id="addedchars">(j + BrushOrigin.y)</span> % \
PatternHeight; </pre><pre class="diff" id="context">
for (i = DestRect->left; i < RoundedRight; i += 4, DestBits++)
{
</pre><pre class="diff"><small id="info">@@ -358,10 +358,10 @@
</small></pre><pre class="diff" id="context">
if (UsesPattern)
{
</pre><pre class="diff" id="removed">- Pattern = \
DIB_1BPP_GetPixel(PatternObj, i % PatternWidth, PatternY) ? GdiBrush->crFore : \
GdiBrush->crBack;
- Pattern |= (DIB_1BPP_GetPixel(PatternObj, (i + 1) % PatternWidth, \
PatternY) ? GdiBrush->crFore : GdiBrush->crBack) << 8;
- Pattern |= (DIB_1BPP_GetPixel(PatternObj, (i + 2) % PatternWidth, \
PatternY) ? GdiBrush->crFore : GdiBrush->crBack) << 16;
- Pattern |= (DIB_1BPP_GetPixel(PatternObj, (i + 3) % PatternWidth, \
PatternY) ? GdiBrush->crFore : GdiBrush->crBack) << 24; </pre><pre \
class="diff" id="added">+ Pattern = DIB_1BPP_GetPixel(PatternObj, (i + \
BrushOrigin.x) % PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack; \
+ Pattern |= (DIB_1BPP_GetPixel(PatternObj, (i + BrushOrigin.x + 1) % \
PatternWidth, PatternY) ? GdiBrush->crFore : GdiBrush->crBack) << 8; + \
Pattern |= (DIB_1BPP_GetPixel(PatternObj, (i + BrushOrigin.x + 2) % PatternWidth, \
PatternY) ? GdiBrush->crFore : GdiBrush->crBack) << 16; + \
Pattern |= (DIB_1BPP_GetPixel(PatternObj, (i + BrushOrigin.x + 3) % PatternWidth, \
PatternY) ? GdiBrush->crFore : GdiBrush->crBack) << 24; </pre><pre \
class="diff" id="context"> }
*DestBits = DIB_DoRop(Rop4, Dest, Source, Pattern);
}
</pre><pre class="diff"><small id="info">@@ -378,7 +378,7 @@
</small></pre><pre class="diff" id="context">
if (UsesPattern)
{
</pre><pre class="diff" id="removed">- Pattern = \
DIB_1BPP_GetPixel(PatternObj, <span id="removedchars">i</span> % \
PatternWidth,PatternY) ? GdiBrush->crFore : GdiBrush->crBack; </pre><pre \
class="diff" id="added">+ Pattern = DIB_1BPP_GetPixel(PatternObj, <span \
id="addedchars">(i + BrushOrigin.x)</span> % PatternWidth,PatternY) ? \
GdiBrush->crFore : GdiBrush->crBack; </pre><pre class="diff" id="context"> \
}
DIB_8BPP_PutPixel(DestSurf, i, j, DIB_DoRop(Rop4, Dest, Source, Pattern) \
& 0xFFFF); </pre></div>
<hr /><a name="file7" /><div class="file">
<span class="pathname"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos">reactos</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys">subsys</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k">win32k</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/eng">eng</a><br \
/></span> <div class="fileheader"><big><b>bitblt.c</b></big> <small id="info"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/eng/bitblt.c?rev=1.51&content-type=text/x-cvsweb-markup">1.51</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/eng/bitblt.c.diff?r1=text&tr1=1.51&r2=text&tr2=1.52&f=h">-></a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/eng/bitblt.c?rev=1.52&content-type=text/x-cvsweb-markup">1.52</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.51 -r1.52
--- bitblt.c 10 Apr 2004 00:58:14 -0000 1.51
+++ bitblt.c 25 Apr 2004 11:34:13 -0000 1.52
@@ -16,7 +16,7 @@
</small></pre><pre class="diff" id="context"> * along with this program; if not, \
write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
</pre><pre class="diff" id="removed">-/* $Id: bitblt.c,v 1.51 2004/04/10 00:58:14 \
navaraf Exp $ </pre><pre class="diff" id="added">+/* $Id: bitblt.c,v 1.52 2004/04/25 \
11:34:13 weiden Exp $ </pre><pre class="diff" id="context"> *
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
</pre><pre class="diff"><small id="info">@@ -371,6 +371,7 @@
</small></pre><pre class="diff" id="context"> OutputRect.top = DestRect->top + \
Translate.y; OutputRect.bottom = DestRect->bottom + Translate.y;
</pre><pre class="diff" id="added">+ #if 0
</pre><pre class="diff" id="context"> if(BrushOrigin)
{
AdjustedBrushOrigin.x = BrushOrigin->x + Translate.x;
</pre><pre class="diff"><small id="info">@@ -378,6 +379,9 @@
</small></pre><pre class="diff" id="context"> }
else
AdjustedBrushOrigin = Translate;
</pre><pre class="diff" id="added">+ #else
+ AdjustedBrushOrigin = (BrushOrigin ? *BrushOrigin : Translate);
+ #endif
</pre><pre class="diff" id="context">
if (NULL != OutputObj)
{
</pre><pre class="diff"><small id="info">@@ -738,7 +742,7 @@
</small></pre><pre class="diff" id="context"> OutputRect.right = prclDest->right \
+ Translate.x; OutputRect.top = prclDest->top + Translate.y;
OutputRect.bottom = prclDest->bottom + Translate.y;
</pre><pre class="diff" id="removed">-
</pre><pre class="diff" id="added">+#if 0
</pre><pre class="diff" id="context"> if(BrushOrigin)
{
AdjustedBrushOrigin.x = BrushOrigin->x + Translate.x;
</pre><pre class="diff"><small id="info">@@ -746,6 +750,9 @@
</small></pre><pre class="diff" id="context"> }
else
AdjustedBrushOrigin = Translate;
</pre><pre class="diff" id="added">+#else
+ AdjustedBrushOrigin = (BrushOrigin ? *BrushOrigin : Translate);
+#endif
</pre><pre class="diff" id="context">
if (NULL != OutputObj)
{
</pre><pre class="diff"><small id="info">@@ -1134,6 +1141,7 @@
</small></pre><pre class="diff" id="context"> OutputRect.top = DestRect->top + \
Translate.y; OutputRect.bottom = DestRect->bottom + Translate.y;
</pre><pre class="diff" id="added">+#if 0
</pre><pre class="diff" id="context"> if(BrushOrigin)
{
AdjustedBrushOrigin.x = BrushOrigin->x + Translate.x;
</pre><pre class="diff"><small id="info">@@ -1141,6 +1149,9 @@
</small></pre><pre class="diff" id="context"> }
else
AdjustedBrushOrigin = Translate;
</pre><pre class="diff" id="added">+#else
+ AdjustedBrushOrigin = (BrushOrigin ? *BrushOrigin : Translate);
+#endif
</pre><pre class="diff" id="context">
if (NULL != OutputObj)
{
</pre></div>
<hr /><a name="file8" /><div class="file">
<span class="pathname"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos">reactos</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys">subsys</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k">win32k</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/objects">objects</a><br \
/></span> <div class="fileheader"><big><b>bitmaps.c</b></big> <small id="info"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/objects/bitmaps.c?rev=1.69&content-type=text/x-cvsweb-markup">1.69</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/objects/bitmaps.c.diff?r1=text&tr1=1.69&r2=text&tr2=1.70&f=h">-></a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/objects/bitmaps.c?rev=1.70&content-type=text/x-cvsweb-markup">1.70</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.69 -r1.70
--- bitmaps.c 9 Apr 2004 20:03:20 -0000 1.69
+++ bitmaps.c 25 Apr 2004 11:34:13 -0000 1.70
@@ -16,7 +16,7 @@
</small></pre><pre class="diff" id="context"> * along with this program; if not, \
write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
</pre><pre class="diff" id="removed">-/* $Id: bitmaps.c,v 1.69 2004/04/09 20:03:20 \
navaraf Exp $ */ </pre><pre class="diff" id="added">+/* $Id: bitmaps.c,v 1.70 \
2004/04/25 11:34:13 weiden Exp $ */ </pre><pre class="diff" id="context"> #undef \
WIN32_LEAN_AND_MEAN #include <windows.h>
#include <stdlib.h>
</pre><pre class="diff"><small id="info">@@ -56,7 +56,7 @@
</small></pre><pre class="diff" id="context"> SURFOBJ *SurfDest, *SurfSrc;
PSURFGDI SurfGDIDest, SurfGDISrc;
RECTL DestRect;
</pre><pre class="diff" id="removed">- POINTL SourcePoint;
</pre><pre class="diff" id="added">+ POINTL SourcePoint, BrushOrigin;
</pre><pre class="diff" id="context"> BOOL Status;
PPALGDI PalDestGDI, PalSourceGDI;
XLATEOBJ *XlateObj = NULL;
</pre><pre class="diff"><small id="info">@@ -114,6 +114,9 @@
</small></pre><pre class="diff" id="context">
SourcePoint.x = XSrc;
SourcePoint.y = YSrc;
</pre><pre class="diff" id="added">+
+ BrushOrigin.x = 0;
+ BrushOrigin.y = 0;
</pre><pre class="diff" id="context">
/* Determine surfaces to be used in the bitblt */
SurfDest = (SURFOBJ*)AccessUserObject((ULONG)DCDest->Surface);
</pre><pre class="diff"><small id="info">@@ -142,6 +145,7 @@
</small></pre><pre class="diff" id="context"> \
SetLastWin32Error(ERROR_INVALID_HANDLE); return FALSE;
}
</pre><pre class="diff" id="added">+ BrushOrigin = BrushObj->ptOrigin;
</pre><pre class="diff" id="context"> }
else
{
</pre><pre class="diff"><small id="info">@@ -244,7 +248,7 @@
</small></pre><pre class="diff" id="context">
/* Perform the bitblt operation */
Status = IntEngBitBlt(SurfDest, SurfSrc, NULL, DCDest->CombinedClip, XlateObj,
</pre><pre class="diff" id="removed">- &DestRect, &SourcePoint, NULL, \
&BrushObj->BrushObject, <span id="removedchars">NULL</span>, ROP); </pre><pre \
class="diff" id="added">+ &DestRect, &SourcePoint, NULL, \
&BrushObj->BrushObject, <span id="addedchars">&BrushOrigin</span>, ROP); \
</pre><pre class="diff" id="context"> EngDeleteXlate(XlateObj);
if (NULL != Mono)
</pre><pre class="diff"><small id="info">@@ -1071,7 +1075,10 @@
</small></pre><pre class="diff" id="context"> return(FALSE);
OldBrush = NtGdiSelectObject(hDC, NewBrush);
if (OldBrush == NULL)
</pre><pre class="diff" id="added">+ {
+ NtGdiDeleteObject(NewBrush);
</pre><pre class="diff" id="context"> return(FALSE);
</pre><pre class="diff" id="added">+ }
</pre><pre class="diff" id="context"> NtGdiPatBlt(hDC, X, Y, 1, 1, PATCOPY);
NtGdiSelectObject(hDC, OldBrush);
NtGdiDeleteObject(NewBrush);
</pre></div>
<hr /><a name="file9" /><div class="file">
<span class="pathname"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos">reactos</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys">subsys</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k">win32k</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/objects">objects</a><br \
/></span> <div class="fileheader"><big><b>brush.c</b></big> <small id="info"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/objects/brush.c?rev=1.34&content-type=text/x-cvsweb-markup">1.34</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/objects/brush.c.diff?r1=text&tr1=1.34&r2=text&tr2=1.35&f=h">-></a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/objects/brush.c?rev=1.35&content-type=text/x-cvsweb-markup">1.35</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.34 -r1.35
--- brush.c 9 Apr 2004 20:03:20 -0000 1.34
+++ brush.c 25 Apr 2004 11:34:13 -0000 1.35
@@ -17,7 +17,7 @@
</small></pre><pre class="diff" id="context"> * along with this program; if not, \
write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
</pre><pre class="diff" id="removed">- * $Id: brush.c,v 1.34 2004/04/09 20:03:20 \
navaraf Exp $ </pre><pre class="diff" id="added">+ * $Id: brush.c,v 1.35 2004/04/25 \
11:34:13 weiden Exp $ </pre><pre class="diff" id="context"> */
#undef WIN32_LEAN_AND_MEAN
</pre><pre class="diff"><small id="info">@@ -33,12 +33,56 @@
</small></pre><pre class="diff" id="context"> #define NDEBUG
#include <win32k/debug1.h>
</pre><pre class="diff" id="added">+static const USHORT \
HatchBrushes[NB_HATCH_STYLES][8] = +{
+ {0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00}, /* HS_HORIZONTAL */
+ {0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08}, /* HS_VERTICAL */
+ {0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80}, /* HS_FDIAGONAL */
+ {0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01}, /* HS_BDIAGONAL */
+ {0x08, 0x08, 0x08, 0xff, 0x08, 0x08, 0x08, 0x08}, /* HS_CROSS */
+ {0x81, 0x42, 0x24, 0x18, 0x18, 0x24, 0x42, 0x81} /* HS_DIAGCROSS */
+};
+
+BOOL FASTCALL
+Brush_InternalDelete( PGDIBRUSHOBJ pBrush )
+{
+ ASSERT(pBrush);
+
+ if(pBrush->flAttrs & (GDIBRUSH_IS_HATCH | GDIBRUSH_IS_BITMAP))
+ {
+ ASSERT(pBrush->hbmPattern);
+ NtGdiDeleteObject(pBrush->hbmPattern);
+ }
+
+ return TRUE;
+}
+
</pre><pre class="diff" id="context"> HBRUSH FASTCALL
IntGdiCreateBrushIndirect(PLOGBRUSH LogBrush)
{
PGDIBRUSHOBJ BrushObject;
HBRUSH hBrush;
</pre><pre class="diff" id="removed">-
</pre><pre class="diff" id="added">+ HBITMAP hPattern;
+
+ switch (LogBrush->lbStyle)
+ {
+ case BS_HATCHED:
+ if(!(hPattern = NtGdiCreateBitmap(8, 8, 1, 1, \
HatchBrushes[LogBrush->lbHatch]))) + {
+ SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
+ return NULL;
+ }
+ break;
+
+ case BS_PATTERN:
+ if(!(hPattern = BITMAPOBJ_CopyBitmap((HBITMAP)LogBrush->lbHatch)))
+ {
+ SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
+ return NULL;
+ }
+ break;
+ }
+
</pre><pre class="diff" id="context"> hBrush = BRUSHOBJ_AllocBrush();
if (hBrush == NULL)
{
</pre><pre class="diff"><small id="info">@@ -51,22 +95,26 @@
</small></pre><pre class="diff" id="context"> switch (LogBrush->lbStyle)
{
case BS_NULL:
</pre><pre class="diff" id="removed">- BrushObject->flAttrs = \
GDIBRUSH_IS_NULL; </pre><pre class="diff" id="added">+ \
BrushObject->flAttrs <span id="addedchars">|</span>= GDIBRUSH_IS_NULL; </pre><pre \
class="diff" id="context"> break; </pre><pre class="diff" id="removed">- \
- /* FIXME */
- case BS_HATCHED:
</pre><pre class="diff" id="context">
case BS_SOLID:
</pre><pre class="diff" id="removed">- BrushObject->flAttrs = \
GDIBRUSH_IS_SOLID; </pre><pre class="diff" id="added">+ \
BrushObject->flAttrs <span id="addedchars">|</span>= GDIBRUSH_IS_SOLID; </pre><pre \
class="diff" id="context"> BrushObject->BrushAttr.lbColor = \
LogBrush->lbColor & 0xFFFFFF;
BrushObject->BrushObject.iSolidColor = \
BrushObject->BrushAttr.lbColor; /* FIXME: Fill in the rest of fields!!! */
break;
</pre><pre class="diff" id="added">+ case BS_HATCHED:
+ BrushObject->flAttrs |= GDIBRUSH_IS_HATCH;
+ BrushObject->hbmPattern = hPattern;
+ BrushObject->BrushAttr.lbColor = LogBrush->lbColor & 0xFFFFFF;
+ BrushObject->BrushObject.iSolidColor = 0xFFFFFFFF;
+ break;
+
</pre><pre class="diff" id="context"> case BS_PATTERN:
</pre><pre class="diff" id="removed">- BrushObject->flAttrs = \
GDIBRUSH_IS_BITMAP;
- BrushObject->hbmPattern = \
BITMAPOBJ_CopyBitmap((HBITMAP)LogBrush->lbHatch); </pre><pre class="diff" \
id="added">+ BrushObject->flAttrs |= GDIBRUSH_IS_BITMAP; + \
BrushObject->hbmPattern = hPattern; </pre><pre class="diff" id="context"> \
BrushObject->BrushObject.iSolidColor = 0xFFFFFFFF; /* FIXME: Fill in the rest of \
fields!!! */ break;
</pre><pre class="diff"><small id="info">@@ -92,6 +140,7 @@
</small></pre><pre class="diff" id="context"> {
RECTL DestRect;
SURFOBJ *SurfObj;
</pre><pre class="diff" id="added">+ POINTL BrushOrigin;
</pre><pre class="diff" id="context"> BOOL ret;
SurfObj = (SURFOBJ *)AccessUserObject((ULONG)dc->Surface);
</pre><pre class="diff"><small id="info">@@ -125,6 +174,9 @@
</small></pre><pre class="diff" id="context"> DestRect.top = YLeft + Height \
+ dc->w.DCOrgY + 1; DestRect.bottom = YLeft + dc->w.DCOrgY + 1;
}
</pre><pre class="diff" id="added">+
+ BrushOrigin.x = BrushObj->ptOrigin.x + dc->w.DCOrgX;
+ BrushOrigin.y = BrushObj->ptOrigin.y + dc->w.DCOrgY;
</pre><pre class="diff" id="context">
ret = IntEngBitBlt(
SurfObj,
</pre><pre class="diff"><small id="info">@@ -136,7 +188,7 @@
</small></pre><pre class="diff" id="context"> NULL,
NULL,
&BrushObj->BrushObject,
</pre><pre class="diff" id="removed">- NULL,
</pre><pre class="diff" id="added">+ &BrushOrigin,
</pre><pre class="diff" id="context"> ROP);
}
</pre><pre class="diff"><small id="info">@@ -221,7 +273,9 @@
</small></pre><pre class="diff" id="context"> LOGBRUSH LogBrush;
if (Style < 0 || Style >= NB_HATCH_STYLES)
</pre><pre class="diff" id="added">+ {
</pre><pre class="diff" id="context"> return 0;
</pre><pre class="diff" id="added">+ }
</pre><pre class="diff" id="context">
LogBrush.lbStyle = BS_HATCHED;
LogBrush.lbColor = Color;
</pre></div>
<hr /><a name="file10" /><div class="file">
<span class="pathname"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos">reactos</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys">subsys</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k">win32k</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/objects">objects</a><br \
/></span> <div class="fileheader"><big><b>dc.c</b></big> <small id="info"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/objects/dc.c?rev=1.128&content-type=text/x-cvsweb-markup">1.128</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/objects/dc.c.diff?r1=text&tr1=1.128&r2=text&tr2=1.129&f=h">-></a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/objects/dc.c?rev=1.129&content-type=text/x-cvsweb-markup">1.129</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.128 -r1.129
--- dc.c 9 Apr 2004 20:03:20 -0000 1.128
+++ dc.c 25 Apr 2004 11:34:13 -0000 1.129
@@ -16,7 +16,7 @@
</small></pre><pre class="diff" id="context"> * along with this program; if not, \
write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
</pre><pre class="diff" id="removed">-/* $Id: dc.c,v 1.128 2004/04/09 20:03:20 \
navaraf Exp $ </pre><pre class="diff" id="added">+/* $Id: dc.c,v 1.129 2004/04/25 \
11:34:13 weiden Exp $ </pre><pre class="diff" id="context"> *
* DC.C - Device context functions
*
</pre><pre class="diff"><small id="info">@@ -1797,7 +1797,13 @@
</small></pre><pre class="diff" id="context"> \
brush->BrushObject.iSolidColor = 0xFFFFFFFF; }
brush->crBack = XLATEOBJ_iXlate(XlateObj, \
dc->w.backgroundColor); </pre><pre class="diff" id="removed">- \
brush->crFore = XLATEOBJ_iXlate(XlateObj, dc->w.textColor); </pre><pre \
class="diff" id="added">+ brush->crFore = \
XLATEOBJ_iXlate(XlateObj, ((brush->flAttrs & GDIBRUSH_IS_HATCH) ? + \
brush->BrushAttr.lbColor : dc->w.textColor)); + /* according \
to the documentation of SetBrushOrgEx(), the origin is assigned to the + \
next brush selected into the DC, so we should set it here */ + \
brush->ptOrigin.x = dc->w.brushOrgX; + brush->ptOrigin.y = \
dc->w.brushOrgY; +
</pre><pre class="diff" id="context"> BRUSHOBJ_UnlockBrush((HBRUSH) \
hGDIObj); objOrg = (HGDIOBJ)dc->w.hBrush;
dc->w.hBrush = (HBRUSH) hGDIObj;
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" \
title="commit -> email">CVSspam</a> 0.2.8</small></center> </body></html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic