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
78510e70
Commit
78510e70
authored
Jul 11, 2007
by
Evan Stade
Committed by
Alexandre Julliard
Jul 12, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Added GdipGetPathWorldBounds.
parent
1f1ecfb2
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
74 additions
and
1 deletion
+74
-1
gdiplus.spec
dlls/gdiplus/gdiplus.spec
+1
-1
graphicspath.c
dlls/gdiplus/graphicspath.c
+52
-0
gdiplusflat.h
include/gdiplusflat.h
+2
-0
gdiplusgpstubs.h
include/gdiplusgpstubs.h
+1
-0
gdiplustypes.h
include/gdiplustypes.h
+18
-0
No files found.
dlls/gdiplus/gdiplus.spec
View file @
78510e70
...
...
@@ -330,7 +330,7 @@
@ stdcall GdipGetPathPoints(ptr ptr long)
@ stub GdipGetPathPointsI
@ stdcall GdipGetPathTypes(ptr ptr long)
@ st
ub GdipGetPathWorldBounds
@ st
dcall GdipGetPathWorldBounds(ptr ptr ptr ptr)
@ stub GdipGetPathWorldBoundsI
@ stub GdipGetPenBrushFill
@ stub GdipGetPenColor
...
...
dlls/gdiplus/graphicspath.c
View file @
78510e70
...
...
@@ -203,6 +203,58 @@ GpStatus WINGDIPAPI GdipGetPathTypes(GpPath *path, BYTE* types, INT count)
return
Ok
;
}
/* Windows expands the bounding box to the maximum possible bounding box
* for a given pen. For example, if a line join can extend past the point
* it's joining by x units, the bounding box is extended by x units in every
* direction (even though this is too conservative for most cases). */
GpStatus
WINGDIPAPI
GdipGetPathWorldBounds
(
GpPath
*
path
,
GpRectF
*
bounds
,
GDIPCONST
GpMatrix
*
matrix
,
GDIPCONST
GpPen
*
pen
)
{
/* extrema[0] is upper left corner of bounding box,
* extrema[1] is lower right corner */
GpPointF
extrema
[
2
];
GpPointF
*
points
;
INT
count
,
i
;
/* Matrix and pen can be null. */
if
(
!
path
||
!
bounds
)
return
InvalidParameter
;
/* If path is empty just return. */
count
=
path
->
pathdata
.
Count
;
if
(
count
==
0
){
bounds
->
X
=
bounds
->
Y
=
bounds
->
Width
=
bounds
->
Height
=
0
.
0
;
return
Ok
;
}
/* FIXME: implement case where pen is non-NULL. */
if
(
pen
)
return
NotImplemented
;
points
=
path
->
pathdata
.
Points
;
extrema
[
0
].
X
=
extrema
[
1
].
X
=
points
[
0
].
X
;
extrema
[
0
].
Y
=
extrema
[
1
].
Y
=
points
[
0
].
Y
;
for
(
i
=
1
;
i
<
count
;
i
++
){
extrema
[
0
].
X
=
min
(
points
[
i
].
X
,
extrema
[
0
].
X
);
extrema
[
0
].
Y
=
min
(
points
[
i
].
Y
,
extrema
[
0
].
Y
);
extrema
[
1
].
X
=
max
(
points
[
i
].
X
,
extrema
[
1
].
X
);
extrema
[
1
].
Y
=
max
(
points
[
i
].
Y
,
extrema
[
1
].
Y
);
}
/* If matrix is non-null transform the points. */
if
(
matrix
){
GdipTransformMatrixPoints
((
GpMatrix
*
)
matrix
,
extrema
,
2
);
}
bounds
->
X
=
extrema
[
0
].
X
;
bounds
->
Y
=
extrema
[
0
].
Y
;
bounds
->
Width
=
extrema
[
1
].
X
-
extrema
[
0
].
X
;
bounds
->
Height
=
extrema
[
1
].
Y
-
extrema
[
0
].
Y
;
return
Ok
;
}
GpStatus
WINGDIPAPI
GdipGetPointCount
(
GpPath
*
path
,
INT
*
count
)
{
if
(
!
path
)
...
...
include/gdiplusflat.h
View file @
78510e70
...
...
@@ -57,6 +57,8 @@ GpStatus WINGDIPAPI GdipCreatePath(GpFillMode,GpPath**);
GpStatus
WINGDIPAPI
GdipDeletePath
(
GpPath
*
);
GpStatus
WINGDIPAPI
GdipGetPathPoints
(
GpPath
*
,
GpPointF
*
,
INT
);
GpStatus
WINGDIPAPI
GdipGetPathTypes
(
GpPath
*
,
BYTE
*
,
INT
);
GpStatus
WINGDIPAPI
GdipGetPathWorldBounds
(
GpPath
*
,
GpRectF
*
,
GDIPCONST
GpMatrix
*
,
GDIPCONST
GpPen
*
);
GpStatus
WINGDIPAPI
GdipGetPointCount
(
GpPath
*
,
INT
*
);
GpStatus
WINGDIPAPI
GdipStartPathFigure
(
GpPath
*
);
GpStatus
WINGDIPAPI
GdipTransformPath
(
GpPath
*
,
GpMatrix
*
);
...
...
include/gdiplusgpstubs.h
View file @
78510e70
...
...
@@ -46,5 +46,6 @@ typedef PointF GpPointF;
typedef
FillMode
GpFillMode
;
typedef
PathData
GpPathData
;
typedef
LineCap
GpLineCap
;
typedef
RectF
GpRectF
;
#endif
include/gdiplustypes.h
View file @
78510e70
...
...
@@ -122,6 +122,16 @@ public:
BYTE
*
Types
;
};
/* FIXME: missing the methods. */
class
RectF
{
public
:
REAL
X
;
REAL
Y
;
REAL
Width
;
REAL
Height
;
};
#else
/* end of c++ typedefs */
typedef
struct
PointF
...
...
@@ -137,6 +147,14 @@ typedef struct PathData
BYTE
*
Types
;
}
PathData
;
typedef
struct
RectF
{
REAL
X
;
REAL
Y
;
REAL
Width
;
REAL
Height
;
}
RectF
;
typedef
enum
Status
Status
;
#endif
/* end of c typedefs */
...
...
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