Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
366ae1e6
Commit
366ae1e6
authored
Aug 24, 2008
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 25, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Basic GdipGetDC/GdipReleaseDC implementation.
parent
45705011
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
12 deletions
+21
-12
gdiplus_private.h
dlls/gdiplus/gdiplus_private.h
+1
-0
graphics.c
dlls/gdiplus/graphics.c
+12
-8
graphics.c
dlls/gdiplus/tests/graphics.c
+8
-4
No files found.
dlls/gdiplus/gdiplus_private.h
View file @
366ae1e6
...
...
@@ -95,6 +95,7 @@ struct GpGraphics{
GpUnit
unit
;
/* page unit */
REAL
scale
;
/* page scale */
GpMatrix
*
worldtrans
;
/* world transform */
BOOL
busy
;
/* hdc handle obtained by GdipGetDC */
};
struct
GpBrush
{
...
...
dlls/gdiplus/graphics.c
View file @
366ae1e6
...
...
@@ -752,6 +752,7 @@ GpStatus WINGDIPAPI GdipCreateFromHDC2(HDC hdc, HANDLE hDevice, GpGraphics **gra
(
*
graphics
)
->
compmode
=
CompositingModeSourceOver
;
(
*
graphics
)
->
unit
=
UnitDisplay
;
(
*
graphics
)
->
scale
=
1
.
0
;
(
*
graphics
)
->
busy
=
FALSE
;
return
Ok
;
}
...
...
@@ -2679,26 +2680,29 @@ GpStatus WINGDIPAPI GdipMultiplyWorldTransform(GpGraphics *graphics, GDIPCONST G
GpStatus
WINGDIPAPI
GdipGetDC
(
GpGraphics
*
graphics
,
HDC
*
hdc
)
{
FIXME
(
"(%p, %p): stub
\n
"
,
graphics
,
hdc
);
if
(
!
graphics
||
!
hdc
)
return
InvalidParameter
;
*
hdc
=
NULL
;
return
NotImplemented
;
if
(
graphics
->
busy
)
return
ObjectBusy
;
*
hdc
=
graphics
->
hdc
;
graphics
->
busy
=
TRUE
;
return
Ok
;
}
GpStatus
WINGDIPAPI
GdipReleaseDC
(
GpGraphics
*
graphics
,
HDC
hdc
)
{
FIXME
(
"(%p, %p): stub
\n
"
,
graphics
,
hdc
);
if
(
!
graphics
)
return
InvalidParameter
;
if
(
graphics
->
hdc
!=
hdc
)
if
(
graphics
->
hdc
!=
hdc
||
!
(
graphics
->
busy
)
)
return
InvalidParameter
;
return
NotImplemented
;
graphics
->
busy
=
FALSE
;
return
Ok
;
}
GpStatus
WINGDIPAPI
GdipGetClip
(
GpGraphics
*
graphics
,
GpRegion
*
region
)
...
...
dlls/gdiplus/tests/graphics.c
View file @
366ae1e6
...
...
@@ -545,13 +545,17 @@ static void test_Get_Release_DC(void)
status
=
GdipReleaseDC
(
NULL
,
(
HDC
)
0xdeadbeef
);
expect
(
InvalidParameter
,
status
);
/* Release without Get */
status
=
GdipReleaseDC
(
graphics
,
hdc
);
expect
(
InvalidParameter
,
status
);
retdc
=
NULL
;
status
=
GdipGetDC
(
graphics
,
&
retdc
);
todo_wine
expect
(
Ok
,
status
);
todo_wine
ok
(
retdc
==
hdc
,
"Invalid HDC returned
\n
"
);
expect
(
Ok
,
status
);
ok
(
retdc
==
hdc
,
"Invalid HDC returned
\n
"
);
/* call it once more */
status
=
GdipGetDC
(
graphics
,
&
retdc
);
todo_wine
expect
(
ObjectBusy
,
status
);
expect
(
ObjectBusy
,
status
);
/* try all Graphics calls here */
status
=
Ok
;
...
...
@@ -712,7 +716,7 @@ static void test_Get_Release_DC(void)
todo_wine
expect
(
ObjectBusy
,
status
);
status
=
Ok
;
status
=
GdipReleaseDC
(
graphics
,
retdc
);
todo_wine
expect
(
Ok
,
status
);
expect
(
Ok
,
status
);
GdipDeletePen
(
pen
);
GdipDeleteGraphics
(
graphics
);
...
...
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