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
b4bfa6e1
Commit
b4bfa6e1
authored
Feb 25, 2010
by
Justin Chevrier
Committed by
Alexandre Julliard
Feb 26, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Basic implementation of GdipGetNearestColor with changes to test to reflect fixes.
parent
56238cd7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
13 deletions
+14
-13
graphics.c
dlls/gdiplus/graphics.c
+3
-2
graphics.c
dlls/gdiplus/tests/graphics.c
+11
-11
No files found.
dlls/gdiplus/graphics.c
View file @
b4bfa6e1
...
...
@@ -3173,9 +3173,10 @@ GpStatus WINGDIPAPI GdipGetInterpolationMode(GpGraphics *graphics,
return
Ok
;
}
/* FIXME: Need to handle color depths less than 24bpp */
GpStatus
WINGDIPAPI
GdipGetNearestColor
(
GpGraphics
*
graphics
,
ARGB
*
argb
)
{
FIXME
(
"(%p, %p):
stub
\n
"
,
graphics
,
argb
);
FIXME
(
"(%p, %p):
Passing color unmodified
\n
"
,
graphics
,
argb
);
if
(
!
graphics
||
!
argb
)
return
InvalidParameter
;
...
...
@@ -3183,7 +3184,7 @@ GpStatus WINGDIPAPI GdipGetNearestColor(GpGraphics *graphics, ARGB* argb)
if
(
graphics
->
busy
)
return
ObjectBusy
;
return
NotImplemented
;
return
Ok
;
}
GpStatus
WINGDIPAPI
GdipGetPageScale
(
GpGraphics
*
graphics
,
REAL
*
scale
)
...
...
dlls/gdiplus/tests/graphics.c
View file @
b4bfa6e1
...
...
@@ -2299,7 +2299,7 @@ static void test_GdipGetNearestColor(void)
if
(
status
==
Ok
)
{
status
=
GdipGetNearestColor
(
graphics
,
&
color
);
todo_wine
expect
(
Ok
,
status
);
expect
(
Ok
,
status
);
expect
(
0xdeadbeef
,
color
);
GdipDeleteGraphics
(
graphics
);
}
...
...
@@ -2312,7 +2312,7 @@ static void test_GdipGetNearestColor(void)
if
(
status
==
Ok
)
{
status
=
GdipGetNearestColor
(
graphics
,
&
color
);
todo_wine
expect
(
Ok
,
status
);
expect
(
Ok
,
status
);
expect
(
0xdeadbeef
,
color
);
GdipDeleteGraphics
(
graphics
);
}
...
...
@@ -2325,7 +2325,7 @@ static void test_GdipGetNearestColor(void)
if
(
status
==
Ok
)
{
status
=
GdipGetNearestColor
(
graphics
,
&
color
);
todo_wine
expect
(
Ok
,
status
);
expect
(
Ok
,
status
);
expect
(
0xdeadbeef
,
color
);
GdipDeleteGraphics
(
graphics
);
}
...
...
@@ -2344,7 +2344,7 @@ static void test_GdipGetNearestColor(void)
status
=
GdipGetImageGraphicsContext
((
GpImage
*
)
bitmap
,
&
graphics
);
expect
(
Ok
,
status
);
status
=
GdipGetNearestColor
(
graphics
,
&
color
);
todo_wine
expect
(
Ok
,
status
);
expect
(
Ok
,
status
);
expect
(
0xdeadbeef
,
color
);
GdipDeleteGraphics
(
graphics
);
GdipDisposeImage
((
GpImage
*
)
bitmap
);
...
...
@@ -2354,7 +2354,7 @@ static void test_GdipGetNearestColor(void)
status
=
GdipGetImageGraphicsContext
((
GpImage
*
)
bitmap
,
&
graphics
);
expect
(
Ok
,
status
);
status
=
GdipGetNearestColor
(
graphics
,
&
color
);
todo_wine
expect
(
Ok
,
status
);
expect
(
Ok
,
status
);
expect
(
0xdeadbeef
,
color
);
GdipDeleteGraphics
(
graphics
);
GdipDisposeImage
((
GpImage
*
)
bitmap
);
...
...
@@ -2364,7 +2364,7 @@ static void test_GdipGetNearestColor(void)
status
=
GdipGetImageGraphicsContext
((
GpImage
*
)
bitmap
,
&
graphics
);
expect
(
Ok
,
status
);
status
=
GdipGetNearestColor
(
graphics
,
&
color
);
todo_wine
expect
(
Ok
,
status
);
expect
(
Ok
,
status
);
expect
(
0xdeadbeef
,
color
);
GdipDeleteGraphics
(
graphics
);
GdipDisposeImage
((
GpImage
*
)
bitmap
);
...
...
@@ -2374,7 +2374,7 @@ static void test_GdipGetNearestColor(void)
status
=
GdipGetImageGraphicsContext
((
GpImage
*
)
bitmap
,
&
graphics
);
expect
(
Ok
,
status
);
status
=
GdipGetNearestColor
(
graphics
,
&
color
);
todo_wine
expect
(
Ok
,
status
);
expect
(
Ok
,
status
);
expect
(
0xdeadbeef
,
color
);
GdipDeleteGraphics
(
graphics
);
GdipDisposeImage
((
GpImage
*
)
bitmap
);
...
...
@@ -2384,7 +2384,7 @@ static void test_GdipGetNearestColor(void)
status
=
GdipGetImageGraphicsContext
((
GpImage
*
)
bitmap
,
&
graphics
);
expect
(
Ok
,
status
);
status
=
GdipGetNearestColor
(
graphics
,
&
color
);
todo_wine
expect
(
Ok
,
status
);
expect
(
Ok
,
status
);
expect
(
0xdeadbeef
,
color
);
GdipDeleteGraphics
(
graphics
);
GdipDisposeImage
((
GpImage
*
)
bitmap
);
...
...
@@ -2394,7 +2394,7 @@ static void test_GdipGetNearestColor(void)
status
=
GdipGetImageGraphicsContext
((
GpImage
*
)
bitmap
,
&
graphics
);
expect
(
Ok
,
status
);
status
=
GdipGetNearestColor
(
graphics
,
&
color
);
todo_wine
expect
(
Ok
,
status
);
expect
(
Ok
,
status
);
expect
(
0xdeadbeef
,
color
);
GdipDeleteGraphics
(
graphics
);
GdipDisposeImage
((
GpImage
*
)
bitmap
);
...
...
@@ -2404,7 +2404,7 @@ static void test_GdipGetNearestColor(void)
status
=
GdipGetImageGraphicsContext
((
GpImage
*
)
bitmap
,
&
graphics
);
expect
(
Ok
,
status
);
status
=
GdipGetNearestColor
(
graphics
,
&
color
);
todo_wine
expect
(
Ok
,
status
);
expect
(
Ok
,
status
);
todo_wine
expect
(
0xffa8bce8
,
color
);
GdipDeleteGraphics
(
graphics
);
GdipDisposeImage
((
GpImage
*
)
bitmap
);
...
...
@@ -2414,7 +2414,7 @@ static void test_GdipGetNearestColor(void)
status
=
GdipGetImageGraphicsContext
((
GpImage
*
)
bitmap
,
&
graphics
);
expect
(
Ok
,
status
);
status
=
GdipGetNearestColor
(
graphics
,
&
color
);
todo_wine
expect
(
Ok
,
status
);
expect
(
Ok
,
status
);
todo_wine
expect
(
0xffa8b8e8
,
color
);
GdipDeleteGraphics
(
graphics
);
GdipDisposeImage
((
GpImage
*
)
bitmap
);
...
...
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