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
6cc62d09
Commit
6cc62d09
authored
Nov 02, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 03, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Store transform analysis was created with.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4bfe66e7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
9 deletions
+19
-9
font.c
dlls/dwrite/font.c
+19
-9
No files found.
dlls/dwrite/font.c
View file @
6cc62d09
...
...
@@ -152,9 +152,10 @@ struct dwrite_fonttable {
BOOL
exists
;
};
enum
runanalysis_readystate
{
RUNANALYSIS_BOUNDS
=
1
<<
0
,
RUNANALYSIS_BITMAP
=
1
<<
1
,
enum
runanalysis_flags
{
RUNANALYSIS_BOUNDS_READY
=
1
<<
0
,
RUNANALYSIS_BITMAP_READY
=
1
<<
1
,
RUNANALYSIS_USE_TRANSFORM
=
1
<<
2
};
struct
dwrite_glyphrunanalysis
{
...
...
@@ -163,6 +164,7 @@ struct dwrite_glyphrunanalysis {
DWRITE_RENDERING_MODE
rendering_mode
;
DWRITE_GLYPH_RUN
run
;
DWRITE_MATRIX
m
;
FLOAT
ppdip
;
FLOAT
originX
;
FLOAT
originY
;
...
...
@@ -170,7 +172,7 @@ struct dwrite_glyphrunanalysis {
FLOAT
*
advances
;
DWRITE_GLYPH_OFFSET
*
offsets
;
UINT8
ready
;
UINT8
flags
;
RECT
bounds
;
BYTE
*
bitmap
;
};
...
...
@@ -4058,7 +4060,7 @@ static void glyphrunanalysis_get_texturebounds(struct dwrite_glyphrunanalysis *a
HRESULT
hr
;
UINT32
i
;
if
(
analysis
->
ready
&
RUNANALYSIS_BOUNDS
)
{
if
(
analysis
->
flags
&
RUNANALYSIS_BOUNDS_READY
)
{
*
bounds
=
analysis
->
bounds
;
return
;
}
...
...
@@ -4107,7 +4109,7 @@ static void glyphrunanalysis_get_texturebounds(struct dwrite_glyphrunanalysis *a
/* translate to given run origin */
OffsetRect
(
&
analysis
->
bounds
,
analysis
->
originX
,
analysis
->
originY
);
analysis
->
ready
|=
RUNANALYSIS_BOUNDS
;
analysis
->
flags
|=
RUNANALYSIS_BOUNDS_READY
;
*
bounds
=
analysis
->
bounds
;
}
...
...
@@ -4255,7 +4257,7 @@ static void glyphrunanalysis_render(struct dwrite_glyphrunanalysis *analysis, DW
IDWriteFontFace2_Release
(
fontface2
);
analysis
->
ready
|=
RUNANALYSIS_BITMAP
;
analysis
->
flags
|=
RUNANALYSIS_BITMAP_READY
;
/* we don't need this anymore */
heap_free
(
analysis
->
glyphs
);
...
...
@@ -4320,7 +4322,7 @@ static HRESULT WINAPI glyphrunanalysis_CreateAlphaTexture(IDWriteGlyphRunAnalysi
BYTE
*
src
,
*
dst
;
int
y
;
if
(
!
(
This
->
ready
&
RUNANALYSIS_BITMAP
))
if
(
!
(
This
->
flags
&
RUNANALYSIS_BITMAP_READY
))
glyphrunanalysis_render
(
This
,
type
);
src
=
get_pixel_ptr
(
This
->
bitmap
,
type
,
&
runbounds
,
&
This
->
bounds
);
...
...
@@ -4401,7 +4403,7 @@ HRESULT create_glyphrunanalysis(DWRITE_RENDERING_MODE rendering_mode, DWRITE_MEA
analysis
->
IDWriteGlyphRunAnalysis_iface
.
lpVtbl
=
&
glyphrunanalysisvtbl
;
analysis
->
ref
=
1
;
analysis
->
rendering_mode
=
rendering_mode
;
analysis
->
ready
=
0
;
analysis
->
flags
=
0
;
analysis
->
bitmap
=
NULL
;
analysis
->
ppdip
=
ppdip
;
analysis
->
originX
=
originX
*
ppdip
;
...
...
@@ -4425,6 +4427,14 @@ HRESULT create_glyphrunanalysis(DWRITE_RENDERING_MODE rendering_mode, DWRITE_MEA
return
E_OUTOFMEMORY
;
}
/* check if transform is usable */
if
(
transform
&&
memcmp
(
transform
,
&
identity
,
sizeof
(
*
transform
)))
{
analysis
->
m
=
*
transform
;
analysis
->
flags
|=
RUNANALYSIS_USE_TRANSFORM
;
}
else
memset
(
&
analysis
->
m
,
0
,
sizeof
(
analysis
->
m
));
analysis
->
run
.
glyphIndices
=
analysis
->
glyphs
;
analysis
->
run
.
glyphAdvances
=
analysis
->
advances
;
analysis
->
run
.
glyphOffsets
=
analysis
->
offsets
;
...
...
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