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
30162ab3
Commit
30162ab3
authored
Apr 05, 2013
by
Huw Davies
Committed by
Alexandre Julliard
Apr 05, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineps: Add a helper to return the rgb to grayscale scaling factors.
parent
f63d59d6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
color.c
dlls/wineps.drv/color.c
+8
-2
psdrv.h
dlls/wineps.drv/psdrv.h
+1
-0
No files found.
dlls/wineps.drv/color.c
View file @
30162ab3
...
@@ -52,6 +52,12 @@ BOOL PSDRV_CopyColor(PSCOLOR *col1, PSCOLOR *col2)
...
@@ -52,6 +52,12 @@ BOOL PSDRV_CopyColor(PSCOLOR *col1, PSCOLOR *col2)
return
TRUE
;
return
TRUE
;
}
}
PSRGB
rgb_to_grayscale_scale
(
void
)
{
static
const
PSRGB
scale
=
{
0
.
3
,
0
.
59
,
0
.
11
};
/* FIXME configurable */
return
scale
;
}
/**********************************************************************
/**********************************************************************
* PSDRV_CreateColor
* PSDRV_CreateColor
...
@@ -79,9 +85,9 @@ void PSDRV_CreateColor( PHYSDEV dev, PSCOLOR *pscolor, COLORREF wincolor )
...
@@ -79,9 +85,9 @@ void PSDRV_CreateColor( PHYSDEV dev, PSCOLOR *pscolor, COLORREF wincolor )
pscolor
->
value
.
rgb
.
g
=
g
;
pscolor
->
value
.
rgb
.
g
=
g
;
pscolor
->
value
.
rgb
.
b
=
b
;
pscolor
->
value
.
rgb
.
b
=
b
;
}
else
{
}
else
{
PSRGB
scale
=
rgb_to_grayscale_scale
();
pscolor
->
type
=
PSCOLOR_GRAY
;
pscolor
->
type
=
PSCOLOR_GRAY
;
/* FIXME configurable */
pscolor
->
value
.
gray
.
i
=
r
*
scale
.
r
+
g
*
scale
.
g
+
b
*
scale
.
b
;
pscolor
->
value
.
gray
.
i
=
r
*
0
.
3
+
g
*
0
.
59
+
b
*
0
.
11
;
}
}
return
;
return
;
}
}
...
...
dlls/wineps.drv/psdrv.h
View file @
30162ab3
...
@@ -485,6 +485,7 @@ extern void PSDRV_ResetClip( PHYSDEV dev ) DECLSPEC_HIDDEN;
...
@@ -485,6 +485,7 @@ extern void PSDRV_ResetClip( PHYSDEV dev ) DECLSPEC_HIDDEN;
extern
BOOL
PSDRV_CopyColor
(
PSCOLOR
*
col1
,
PSCOLOR
*
col2
)
DECLSPEC_HIDDEN
;
extern
BOOL
PSDRV_CopyColor
(
PSCOLOR
*
col1
,
PSCOLOR
*
col2
)
DECLSPEC_HIDDEN
;
extern
void
PSDRV_CreateColor
(
PHYSDEV
dev
,
PSCOLOR
*
pscolor
,
extern
void
PSDRV_CreateColor
(
PHYSDEV
dev
,
PSCOLOR
*
pscolor
,
COLORREF
wincolor
)
DECLSPEC_HIDDEN
;
COLORREF
wincolor
)
DECLSPEC_HIDDEN
;
extern
PSRGB
rgb_to_grayscale_scale
(
void
)
DECLSPEC_HIDDEN
;
extern
char
PSDRV_UnicodeToANSI
(
int
u
)
DECLSPEC_HIDDEN
;
extern
char
PSDRV_UnicodeToANSI
(
int
u
)
DECLSPEC_HIDDEN
;
extern
INT
PSDRV_WriteHeader
(
PHYSDEV
dev
,
LPCWSTR
title
)
DECLSPEC_HIDDEN
;
extern
INT
PSDRV_WriteHeader
(
PHYSDEV
dev
,
LPCWSTR
title
)
DECLSPEC_HIDDEN
;
...
...
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