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
0df5fb50
Commit
0df5fb50
authored
Aug 27, 2008
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 28, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Implemented GdipSetClipRegion with basic tests.
parent
fb57a663
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
8 deletions
+21
-8
graphics.c
dlls/gdiplus/graphics.c
+8
-5
graphics.c
dlls/gdiplus/tests/graphics.c
+12
-3
gdiplusflat.h
include/gdiplusflat.h
+1
-0
No files found.
dlls/gdiplus/graphics.c
View file @
0df5fb50
...
...
@@ -2737,14 +2737,17 @@ GpStatus WINGDIPAPI GdipSetClipRectI(GpGraphics *graphics, INT x, INT y,
}
GpStatus
WINGDIPAPI
GdipSetClipRegion
(
GpGraphics
*
graphics
,
GpRegion
*
region
,
CombineMode
combineM
ode
)
CombineMode
m
ode
)
{
static
int
calls
;
TRACE
(
"(%p, %p, %d)
\n
"
,
graphics
,
region
,
mode
)
;
if
(
!
(
calls
++
)
)
FIXME
(
"not implemented
\n
"
)
;
if
(
!
graphics
||
!
region
)
return
InvalidParameter
;
return
NotImplemented
;
if
(
graphics
->
busy
)
return
ObjectBusy
;
return
GdipCombineRegionRegion
(
graphics
->
clip
,
region
,
mode
);
}
GpStatus
WINGDIPAPI
GdipSetMetafileDownLevelRasterizationLimit
(
GpMetafile
*
metafile
,
...
...
dlls/gdiplus/tests/graphics.c
View file @
0df5fb50
...
...
@@ -485,6 +485,7 @@ static void test_Get_Release_DC(void)
GpPoint
pt
[
5
];
GpRectF
rectf
[
2
];
GpRect
rect
[
2
];
GpRegion
*
clip
;
INT
i
;
pt
[
0
].
X
=
10
;
...
...
@@ -523,6 +524,7 @@ static void test_Get_Release_DC(void)
GdipCreateRegion
(
&
region
);
GdipCreateSolidFill
((
ARGB
)
0xdeadbeef
,
&
brush
);
GdipCreatePath
(
FillModeAlternate
,
&
path
);
GdipCreateRegion
(
&
clip
);
status
=
GdipCreateFromHDC
(
hdc
,
&
graphics
);
expect
(
Ok
,
status
);
...
...
@@ -702,7 +704,8 @@ static void test_Get_Release_DC(void)
expect
(
ObjectBusy
,
status
);
status
=
Ok
;
status
=
GdipSetClipRectI
(
graphics
,
0
,
0
,
10
,
10
,
CombineModeReplace
);
expect
(
ObjectBusy
,
status
);
status
=
Ok
;
/* GdipSetClipRegion */
status
=
GdipSetClipRegion
(
graphics
,
clip
,
CombineModeReplace
);
expect
(
ObjectBusy
,
status
);
status
=
GdipDrawPolygon
(
graphics
,
pen
,
ptf
,
5
);
expect
(
ObjectBusy
,
status
);
status
=
Ok
;
status
=
GdipDrawPolygonI
(
graphics
,
pen
,
pt
,
5
);
...
...
@@ -730,6 +733,7 @@ static void test_Get_Release_DC(void)
GdipDeleteBrush
((
GpBrush
*
)
brush
);
GdipDeleteRegion
(
region
);
GdipDeleteMatrix
(
m
);
GdipDeleteRegion
(
region
);
ReleaseDC
(
0
,
hdc
);
}
...
...
@@ -764,7 +768,7 @@ static void test_transformpoints(void)
ReleaseDC
(
0
,
hdc
);
}
static
void
test_getclip
(
void
)
static
void
test_get
_set_
clip
(
void
)
{
GpStatus
status
;
GpGraphics
*
graphics
=
NULL
;
...
...
@@ -789,6 +793,11 @@ static void test_getclip(void)
status
=
GdipGetClip
(
NULL
,
clip
);
expect
(
InvalidParameter
,
status
);
status
=
GdipSetClipRegion
(
NULL
,
NULL
,
CombineModeReplace
);
expect
(
InvalidParameter
,
status
);
status
=
GdipSetClipRegion
(
graphics
,
NULL
,
CombineModeReplace
);
expect
(
InvalidParameter
,
status
);
res
=
FALSE
;
status
=
GdipGetClip
(
graphics
,
clip
);
expect
(
Ok
,
status
);
...
...
@@ -823,7 +832,7 @@ START_TEST(graphics)
test_GdipDrawLinesI
();
test_Get_Release_DC
();
test_transformpoints
();
test_getclip
();
test_get
_set_
clip
();
GdiplusShutdown
(
gdiplusToken
);
}
include/gdiplusflat.h
View file @
0df5fb50
...
...
@@ -156,6 +156,7 @@ GpStatus WINGDIPAPI GdipFillRectangles(GpGraphics*,GpBrush*,GDIPCONST GpRectF*,I
GpStatus
WINGDIPAPI
GdipFillRectanglesI
(
GpGraphics
*
,
GpBrush
*
,
GDIPCONST
GpRect
*
,
INT
);
GpStatus
WINGDIPAPI
GdipGetCompositingMode
(
GpGraphics
*
,
CompositingMode
*
);
GpStatus
WINGDIPAPI
GdipGetClip
(
GpGraphics
*
,
GpRegion
*
);
GpStatus
WINGDIPAPI
GdipSetClipRegion
(
GpGraphics
*
,
GpRegion
*
,
CombineMode
);
GpStatus
WINGDIPAPI
GdipGetCompositingQuality
(
GpGraphics
*
,
CompositingQuality
*
);
GpStatus
WINGDIPAPI
GdipGetDC
(
GpGraphics
*
,
HDC
*
);
GpStatus
WINGDIPAPI
GdipGetImageDimension
(
GpImage
*
,
REAL
*
,
REAL
*
);
...
...
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