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
6260af2a
Commit
6260af2a
authored
Jun 24, 2009
by
Huw Davies
Committed by
Alexandre Julliard
Jun 24, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Implement GetTransform for the other valid transform types.
parent
c87200f6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
16 deletions
+59
-16
dc.c
dlls/gdi32/dc.c
+59
-16
No files found.
dlls/gdi32/dc.c
View file @
6260af2a
...
...
@@ -284,6 +284,20 @@ static BOOL DC_InvertXform( const XFORM *xformSrc, XFORM *xformDest )
return
TRUE
;
}
/* Construct a transformation to do the window-to-viewport conversion */
static
void
construct_window_to_viewport
(
DC
*
dc
,
XFORM
*
xform
)
{
double
scaleX
,
scaleY
;
scaleX
=
(
double
)
dc
->
vportExtX
/
(
double
)
dc
->
wndExtX
;
scaleY
=
(
double
)
dc
->
vportExtY
/
(
double
)
dc
->
wndExtY
;
xform
->
eM11
=
scaleX
;
xform
->
eM12
=
0
.
0
;
xform
->
eM21
=
0
.
0
;
xform
->
eM22
=
scaleY
;
xform
->
eDx
=
(
double
)
dc
->
vportOrgX
-
scaleX
*
(
double
)
dc
->
wndOrgX
;
xform
->
eDy
=
(
double
)
dc
->
vportOrgY
-
scaleY
*
(
double
)
dc
->
wndOrgY
;
}
/***********************************************************************
* DC_UpdateXforms
...
...
@@ -298,19 +312,8 @@ static BOOL DC_InvertXform( const XFORM *xformSrc, XFORM *xformDest )
void
DC_UpdateXforms
(
DC
*
dc
)
{
XFORM
xformWnd2Vport
,
oldworld2vport
;
double
scaleX
,
scaleY
;
/* Construct a transformation to do the window-to-viewport conversion */
scaleX
=
(
double
)
dc
->
vportExtX
/
(
double
)
dc
->
wndExtX
;
scaleY
=
(
double
)
dc
->
vportExtY
/
(
double
)
dc
->
wndExtY
;
xformWnd2Vport
.
eM11
=
scaleX
;
xformWnd2Vport
.
eM12
=
0
.
0
;
xformWnd2Vport
.
eM21
=
0
.
0
;
xformWnd2Vport
.
eM22
=
scaleY
;
xformWnd2Vport
.
eDx
=
(
double
)
dc
->
vportOrgX
-
scaleX
*
(
double
)
dc
->
wndOrgX
;
xformWnd2Vport
.
eDy
=
(
double
)
dc
->
vportOrgY
-
scaleY
*
(
double
)
dc
->
wndOrgY
;
construct_window_to_viewport
(
dc
,
&
xformWnd2Vport
);
oldworld2vport
=
dc
->
xformWorld2Vport
;
/* Combine with the world transformation */
...
...
@@ -1164,12 +1167,52 @@ BOOL WINAPI GetWorldTransform( HDC hdc, LPXFORM xform )
/***********************************************************************
* GetTransform (GDI32.@)
*
* Undocumented
*
* Returns one of the co-ordinate space transforms
*
* PARAMS
* hdc [I] Device context.
* which [I] Which xform to return:
* 0x203 World -> Page transform (that set by SetWorldTransform).
* 0x304 Page -> Device transform (the mapping mode transform).
* 0x204 World -> Device transform (the combination of the above two).
* 0x402 Device -> World transform (the inversion of the above).
* xform [O] The xform.
*
*/
BOOL
WINAPI
GetTransform
(
HDC
hdc
,
DWORD
unknown
,
LPXFORM
xform
)
BOOL
WINAPI
GetTransform
(
HDC
hdc
,
DWORD
which
,
XFORM
*
xform
)
{
if
(
unknown
==
0x0203
)
return
GetWorldTransform
(
hdc
,
xform
);
FIXME
(
"stub: don't know what to do for code %x
\n
"
,
unknown
);
return
FALSE
;
BOOL
ret
=
TRUE
;
DC
*
dc
=
get_dc_ptr
(
hdc
);
if
(
!
dc
)
return
FALSE
;
switch
(
which
)
{
case
0x203
:
*
xform
=
dc
->
xformWorld2Wnd
;
break
;
case
0x304
:
construct_window_to_viewport
(
dc
,
xform
);
break
;
case
0x204
:
*
xform
=
dc
->
xformWorld2Vport
;
break
;
case
0x402
:
*
xform
=
dc
->
xformVport2World
;
break
;
default:
FIXME
(
"Unknown code %x
\n
"
,
which
);
ret
=
FALSE
;
}
release_dc_ptr
(
dc
);
return
ret
;
}
...
...
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