Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
2bd3acf7
Commit
2bd3acf7
authored
Nov 22, 1998
by
Huw D M Davies
Committed by
Alexandre Julliard
Nov 22, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved DC_SetupGC functions to graphics/x11drv/graphics.c.
parent
324ea572
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
31 additions
and
331 deletions
+31
-331
painting.c
graphics/painting.c
+10
-13
bitblt.c
graphics/x11drv/bitblt.c
+4
-4
dib.c
graphics/x11drv/dib.c
+2
-2
graphics.c
graphics/x11drv/graphics.c
+0
-0
text.c
graphics/x11drv/text.c
+1
-1
dc.h
include/dc.h
+0
-5
x11drv.h
include/x11drv.h
+8
-0
brush.c
objects/brush.c
+2
-2
dc.c
objects/dc.c
+0
-297
gdiobj.c
objects/gdiobj.c
+0
-1
pen.c
objects/pen.c
+0
-2
graphics.c
windows/graphics.c
+4
-4
No files found.
graphics/painting.c
View file @
2bd3acf7
...
...
@@ -21,7 +21,6 @@
#include "metafile.h"
#include "palette.h"
#include "cache.h"
#include "color.h"
#include "region.h"
#include "path.h"
#include "debug.h"
...
...
@@ -331,17 +330,15 @@ INT16 WINAPI FrameRect16( HDC16 hdc, const RECT16 *rect, HBRUSH16 hbrush )
if
(
(
right
<=
left
)
||
(
bottom
<=
top
)
)
return
0
;
if
(
!
(
prevBrush
=
SelectObject16
(
hdc
,
hbrush
)))
return
0
;
if
(
DC_SetupGCForBrush
(
dc
))
{
PatBlt32
(
hdc
,
rect
->
left
,
rect
->
top
,
1
,
rect
->
bottom
-
rect
->
top
,
PATCOPY
);
PatBlt32
(
hdc
,
rect
->
right
-
1
,
rect
->
top
,
1
,
rect
->
bottom
-
rect
->
top
,
PATCOPY
);
PatBlt32
(
hdc
,
rect
->
left
,
rect
->
top
,
rect
->
right
-
rect
->
left
,
1
,
PATCOPY
);
PatBlt32
(
hdc
,
rect
->
left
,
rect
->
bottom
-
1
,
rect
->
right
-
rect
->
left
,
1
,
PATCOPY
);
}
PatBlt32
(
hdc
,
rect
->
left
,
rect
->
top
,
1
,
rect
->
bottom
-
rect
->
top
,
PATCOPY
);
PatBlt32
(
hdc
,
rect
->
right
-
1
,
rect
->
top
,
1
,
rect
->
bottom
-
rect
->
top
,
PATCOPY
);
PatBlt32
(
hdc
,
rect
->
left
,
rect
->
top
,
rect
->
right
-
rect
->
left
,
1
,
PATCOPY
);
PatBlt32
(
hdc
,
rect
->
left
,
rect
->
bottom
-
1
,
rect
->
right
-
rect
->
left
,
1
,
PATCOPY
);
SelectObject16
(
hdc
,
prevBrush
);
return
1
;
}
...
...
@@ -646,7 +643,7 @@ void WINAPI DrawFocusRect32( HDC32 hdc, const RECT32* rc )
/* Hack: make sure the XORPEN operation has an effect */
dc
->
u
.
x
.
pen
.
pixel
=
(
1
<<
screenDepth
)
-
1
;
if
(
DC
_SetupGCForPen
(
dc
))
if
(
X11DRV
_SetupGCForPen
(
dc
))
TSXDrawRectangle
(
display
,
dc
->
u
.
x
.
drawable
,
dc
->
u
.
x
.
gc
,
dc
->
w
.
DCOrgX
+
left
,
dc
->
w
.
DCOrgY
+
top
,
right
-
left
-
1
,
bottom
-
top
-
1
);
...
...
graphics/x11drv/bitblt.c
View file @
2bd3acf7
...
...
@@ -1207,7 +1207,7 @@ static BOOL32 BITBLT_InternalStretchBlt( DC *dcDst, INT32 xDst, INT32 yDst,
case
PATINVERT
:
/* 0x5a */
if
(
Options
.
perfectGraphics
)
break
;
if
(
DC
_SetupGCForBrush
(
dcDst
))
if
(
X11DRV
_SetupGCForBrush
(
dcDst
))
{
XSetFunction
(
display
,
dcDst
->
u
.
x
.
gc
,
GXxor
);
XFillRectangle
(
display
,
dcDst
->
u
.
x
.
drawable
,
dcDst
->
u
.
x
.
gc
,
...
...
@@ -1217,7 +1217,7 @@ static BOOL32 BITBLT_InternalStretchBlt( DC *dcDst, INT32 xDst, INT32 yDst,
case
0xa50065
:
if
(
Options
.
perfectGraphics
)
break
;
if
(
DC
_SetupGCForBrush
(
dcDst
))
if
(
X11DRV
_SetupGCForBrush
(
dcDst
))
{
XSetFunction
(
display
,
dcDst
->
u
.
x
.
gc
,
GXequiv
);
XFillRectangle
(
display
,
dcDst
->
u
.
x
.
drawable
,
dcDst
->
u
.
x
.
gc
,
...
...
@@ -1253,7 +1253,7 @@ static BOOL32 BITBLT_InternalStretchBlt( DC *dcDst, INT32 xDst, INT32 yDst,
break
;
case
PATCOPY
:
/* 0xf0 */
if
(
!
DC
_SetupGCForBrush
(
dcDst
))
return
TRUE
;
if
(
!
X11DRV
_SetupGCForBrush
(
dcDst
))
return
TRUE
;
XSetFunction
(
display
,
dcDst
->
u
.
x
.
gc
,
GXcopy
);
XFillRectangle
(
display
,
dcDst
->
u
.
x
.
drawable
,
dcDst
->
u
.
x
.
gc
,
visRectDst
.
left
,
visRectDst
.
top
,
width
,
height
);
...
...
@@ -1291,7 +1291,7 @@ static BOOL32 BITBLT_InternalStretchBlt( DC *dcDst, INT32 xDst, INT32 yDst,
xSrc
,
ySrc
,
&
visRectSrc
);
}
if
(
useDst
)
BITBLT_GetDstArea
(
dcDst
,
pixmaps
[
DST
],
tmpGC
,
&
visRectDst
);
if
(
usePat
)
fNullBrush
=
!
DC
_SetupGCForPatBlt
(
dcDst
,
tmpGC
,
TRUE
);
if
(
usePat
)
fNullBrush
=
!
X11DRV
_SetupGCForPatBlt
(
dcDst
,
tmpGC
,
TRUE
);
else
fNullBrush
=
FALSE
;
destUsed
=
FALSE
;
...
...
graphics/x11drv/dib.c
View file @
2bd3acf7
...
...
@@ -1114,8 +1114,8 @@ INT32 X11DRV_SetDIBitsToDevice( DC *dc, INT32 xDest, INT32 yDest, DWORD cx,
if
(
xSrc
+
cx
>=
width
)
cx
=
width
-
xSrc
;
if
(
!
cx
||
!
cy
)
return
0
;
DC
_SetupGCForText
(
dc
);
/* To have the correct colors */
TSXSetFunction
(
display
,
dc
->
u
.
x
.
gc
,
DC_XROPfunction
[
dc
->
w
.
ROPmode
-
1
]
);
X11DRV
_SetupGCForText
(
dc
);
/* To have the correct colors */
TSXSetFunction
(
display
,
dc
->
u
.
x
.
gc
,
X11DRV_XROPfunction
[
dc
->
w
.
ROPmode
-
1
]
);
if
(
descr
.
infoBpp
<=
8
)
{
...
...
graphics/x11drv/graphics.c
View file @
2bd3acf7
This diff is collapsed.
Click to expand it.
graphics/x11drv/text.c
View file @
2bd3acf7
...
...
@@ -36,7 +36,7 @@ X11DRV_ExtTextOut( DC *dc, INT32 x, INT32 y, UINT32 flags,
char
dfBreakChar
,
lfUnderline
,
lfStrikeOut
;
BOOL32
rotated
=
FALSE
;
if
(
!
DC
_SetupGCForText
(
dc
))
return
TRUE
;
if
(
!
X11DRV
_SetupGCForText
(
dc
))
return
TRUE
;
pfo
=
XFONT_GetFontObject
(
dc
->
u
.
x
.
font
);
font
=
pfo
->
fs
;
...
...
include/dc.h
View file @
2bd3acf7
...
...
@@ -17,13 +17,8 @@
extern
DC
*
DC_AllocDC
(
const
DC_FUNCTIONS
*
funcs
);
extern
DC
*
DC_GetDCPtr
(
HDC32
hdc
);
extern
void
DC_InitDC
(
DC
*
dc
);
extern
BOOL32
DC_SetupGCForPatBlt
(
DC
*
dc
,
GC
gc
,
BOOL32
fMapColors
);
extern
BOOL32
DC_SetupGCForBrush
(
DC
*
dc
);
extern
BOOL32
DC_SetupGCForPen
(
DC
*
dc
);
extern
BOOL32
DC_SetupGCForText
(
DC
*
dc
);
extern
void
DC_UpdateXforms
(
DC
*
dc
);
extern
const
int
DC_XROPfunction
[];
/* objects/clipping.c */
INT32
CLIPPING_IntersectClipRect
(
DC
*
dc
,
INT32
left
,
INT32
top
,
...
...
include/x11drv.h
View file @
2bd3acf7
...
...
@@ -150,6 +150,14 @@ extern int X11DRV_DIB_GetXImageWidthBytes( int width, int depth );
extern
BOOL32
X11DRV_DIB_Init
(
void
);
extern
X11DRV_PHYSBITMAP
*
X11DRV_AllocBitmap
(
struct
tagBITMAPOBJ
*
bmp
);
extern
BOOL32
X11DRV_SetupGCForPatBlt
(
struct
tagDC
*
dc
,
GC
gc
,
BOOL32
fMapColors
);
extern
BOOL32
X11DRV_SetupGCForBrush
(
struct
tagDC
*
dc
);
extern
BOOL32
X11DRV_SetupGCForPen
(
struct
tagDC
*
dc
);
extern
BOOL32
X11DRV_SetupGCForText
(
struct
tagDC
*
dc
);
extern
const
int
X11DRV_XROPfunction
[];
/* Xlib critical section */
extern
CRITICAL_SECTION
X11DRV_CritSection
;
...
...
objects/brush.c
View file @
2bd3acf7
...
...
@@ -7,8 +7,6 @@
#include <stdlib.h>
#include "brush.h"
#include "bitmap.h"
#include "metafile.h"
#include "color.h"
#include "debug.h"
...
...
@@ -25,6 +23,7 @@ HBRUSH16 WINAPI CreateBrushIndirect16( const LOGBRUSH16 * brush )
brushPtr
->
logbrush
.
lbColor
=
brush
->
lbColor
;
brushPtr
->
logbrush
.
lbHatch
=
brush
->
lbHatch
;
GDI_HEAP_UNLOCK
(
hbrush
);
TRACE
(
gdi
,
"%04x
\n
"
,
hbrush
);
return
hbrush
;
}
...
...
@@ -42,6 +41,7 @@ HBRUSH32 WINAPI CreateBrushIndirect32( const LOGBRUSH32 * brush )
brushPtr
->
logbrush
.
lbColor
=
brush
->
lbColor
;
brushPtr
->
logbrush
.
lbHatch
=
brush
->
lbHatch
;
GDI_HEAP_UNLOCK
(
hbrush
);
TRACE
(
gdi
,
"%08x
\n
"
,
hbrush
);
return
hbrush
;
}
...
...
objects/dc.c
View file @
2bd3acf7
This diff is collapsed.
Click to expand it.
objects/gdiobj.c
View file @
2bd3acf7
...
...
@@ -5,7 +5,6 @@
*/
#include <stdlib.h>
#include "color.h"
#include "bitmap.h"
#include "brush.h"
#include "dc.h"
...
...
objects/pen.c
View file @
2bd3acf7
...
...
@@ -5,8 +5,6 @@
*/
#include "pen.h"
#include "metafile.h"
#include "color.h"
#include "debug.h"
...
...
windows/graphics.c
View file @
2bd3acf7
...
...
@@ -35,7 +35,7 @@ BOOL32 GRAPH_DrawLines( HDC32 hdc, LPPOINT32 pXY, INT32 N, HPEN32 hPen )
HPEN32
hPrevPen
=
0
;
if
(
hPen
)
hPrevPen
=
SelectObject32
(
hdc
,
hPen
);
if
(
DC
_SetupGCForPen
(
dc
)
)
if
(
X11DRV
_SetupGCForPen
(
dc
)
)
{
XSegment
l
[
MAX_DRAWLINES
];
INT32
i
,
j
;
...
...
@@ -178,7 +178,7 @@ void GRAPH_DrawGenericReliefRect(
hPrevBrush
=
SelectObject32
(
hdc
,
highlight
);
if
(
DC
_SetupGCForBrush
(
dc
)
)
if
(
X11DRV
_SetupGCForBrush
(
dc
)
)
{
INT32
i
;
...
...
@@ -193,7 +193,7 @@ void GRAPH_DrawGenericReliefRect(
}
SelectObject32
(
hdc
,
shadow
);
if
(
DC
_SetupGCForBrush
(
dc
)
)
if
(
X11DRV
_SetupGCForBrush
(
dc
)
)
{
INT32
i
;
...
...
@@ -226,7 +226,7 @@ void GRAPH_DrawRectangle( HDC32 hdc, INT32 x, INT32 y,
HPEN32
hPrevPen
=
0
;
if
(
hPen
)
hPrevPen
=
SelectObject32
(
hdc
,
hPen
);
if
(
DC
_SetupGCForPen
(
dc
)
)
if
(
X11DRV
_SetupGCForPen
(
dc
)
)
TSXDrawRectangle
(
display
,
dc
->
u
.
x
.
drawable
,
dc
->
u
.
x
.
gc
,
x
+
dc
->
w
.
DCOrgX
,
y
+
dc
->
w
.
DCOrgY
,
w
-
1
,
h
-
1
);
if
(
hPrevPen
)
SelectObject32
(
hdc
,
hPrevPen
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment