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
83d4560c
Commit
83d4560c
authored
Jun 12, 1999
by
Huw D M Davies
Committed by
Alexandre Julliard
Jun 12, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PSDRV_StretchDIBits should use logical co-ords.
Some versions of ghostscript seem to eat one too many characters of image data. Add a '%' to the output file to work around this.
parent
6f40d25d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
bitmap.c
graphics/psdrv/bitmap.c
+8
-7
psdrv.h
include/psdrv.h
+1
-0
No files found.
graphics/psdrv/bitmap.c
View file @
83d4560c
...
...
@@ -125,6 +125,10 @@ INT PSDRV_StretchDIBits( DC *dc, INT xDst, INT yDst, INT widthDst,
return
FALSE
;
}
xDst
=
XLPTODP
(
dc
,
xDst
);
yDst
=
YLPTODP
(
dc
,
yDst
);
widthDst
=
XLSTODS
(
dc
,
widthDst
);
heightDst
=
YLSTODS
(
dc
,
heightDst
);
switch
(
bpp
)
{
...
...
@@ -138,7 +142,6 @@ INT PSDRV_StretchDIBits( DC *dc, INT xDst, INT yDst, INT widthDst,
FIXME
(
psdrv
,
"This won't work...
\n
"
);
for
(
line
=
0
;
line
<
heightSrc
;
line
++
,
ptr
+=
widthbytes
)
PSDRV_WriteBytes
(
dc
,
ptr
+
xSrc
/
8
,
widthSrc
/
8
);
PSDRV_WriteGRestore
(
dc
);
break
;
case
4
:
...
...
@@ -151,7 +154,6 @@ INT PSDRV_StretchDIBits( DC *dc, INT xDst, INT yDst, INT widthDst,
FIXME
(
psdrv
,
"This won't work...
\n
"
);
for
(
line
=
0
;
line
<
heightSrc
;
line
++
,
ptr
+=
widthbytes
)
PSDRV_WriteBytes
(
dc
,
ptr
+
xSrc
/
2
,
widthSrc
/
2
);
PSDRV_WriteGRestore
(
dc
);
break
;
case
8
:
...
...
@@ -162,7 +164,6 @@ INT PSDRV_StretchDIBits( DC *dc, INT xDst, INT yDst, INT widthDst,
ptr
+=
(
ySrc
*
widthbytes
);
for
(
line
=
0
;
line
<
heightSrc
;
line
++
,
ptr
+=
widthbytes
)
PSDRV_WriteBytes
(
dc
,
ptr
+
xSrc
,
widthSrc
);
PSDRV_WriteGRestore
(
dc
);
break
;
case
15
:
...
...
@@ -175,7 +176,6 @@ INT PSDRV_StretchDIBits( DC *dc, INT xDst, INT yDst, INT widthDst,
ptr
+=
(
ySrc
*
widthbytes
);
for
(
line
=
0
;
line
<
heightSrc
;
line
++
,
ptr
+=
widthbytes
)
PSDRV_WriteDIBits16
(
dc
,
(
WORD
*
)
ptr
+
xSrc
,
widthSrc
);
PSDRV_WriteGRestore
(
dc
);
break
;
case
24
:
...
...
@@ -187,7 +187,6 @@ INT PSDRV_StretchDIBits( DC *dc, INT xDst, INT yDst, INT widthDst,
ptr
+=
(
ySrc
*
widthbytes
);
for
(
line
=
0
;
line
<
heightSrc
;
line
++
,
ptr
+=
widthbytes
)
PSDRV_WriteDIBits24
(
dc
,
ptr
+
xSrc
*
3
,
widthSrc
);
PSDRV_WriteGRestore
(
dc
);
break
;
case
32
:
...
...
@@ -199,7 +198,6 @@ INT PSDRV_StretchDIBits( DC *dc, INT xDst, INT yDst, INT widthDst,
ptr
+=
(
ySrc
*
widthbytes
);
for
(
line
=
0
;
line
<
heightSrc
;
line
++
,
ptr
+=
widthbytes
)
PSDRV_WriteDIBits32
(
dc
,
ptr
+
xSrc
*
3
,
widthSrc
);
PSDRV_WriteGRestore
(
dc
);
break
;
default
:
...
...
@@ -207,7 +205,10 @@ INT PSDRV_StretchDIBits( DC *dc, INT xDst, INT yDst, INT widthDst,
return
FALSE
;
}
PSDRV_WriteSpool
(
dc
,
"%
\n
"
,
2
);
/* some versions of ghostscript seem to
eat one too many chars after the image
operator */
PSDRV_WriteGRestore
(
dc
);
return
TRUE
;
}
...
...
include/psdrv.h
View file @
83d4560c
...
...
@@ -299,6 +299,7 @@ extern BOOL PSDRV_WriteBytes(DC *dc, const BYTE *bytes, int number);
extern
BOOL
PSDRV_WriteDIBits16
(
DC
*
dc
,
const
WORD
*
words
,
int
number
);
extern
BOOL
PSDRV_WriteDIBits24
(
DC
*
dc
,
const
BYTE
*
bits
,
int
number
);
extern
BOOL
PSDRV_WriteDIBits32
(
DC
*
dc
,
const
BYTE
*
bits
,
int
number
);
extern
int
PSDRV_WriteSpool
(
DC
*
dc
,
LPSTR
lpData
,
WORD
cch
);
...
...
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