Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
966fc1f2
Kaydet (Commit)
966fc1f2
authored
Kas 13, 2014
tarafından
Jan Holesovsky
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
windows opengl: Prepare WinLayout (and derived classes) for OpenGL.
Change-Id: Ifd18f51ac417cb3778e61f33df30daa7be6c0bf8
üst
921f07d0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
47 deletions
+65
-47
winlayout.cxx
vcl/win/source/gdi/winlayout.cxx
+50
-40
winlayout.hxx
vcl/win/source/gdi/winlayout.hxx
+15
-7
No files found.
vcl/win/source/gdi/winlayout.cxx
Dosyayı görüntüle @
966fc1f2
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
#include "osl/module.h"
#include "osl/module.h"
#include "osl/file.h"
#include "osl/file.h"
#include
"vcl/svapp.hxx"
#include
<vcl/opengl/OpenGLHelper.hxx>
#include "win/salgdi.h"
#include "win/salgdi.h"
#include "win/saldata.hxx"
#include "win/saldata.hxx"
...
@@ -107,13 +107,14 @@ inline int ImplWinFontEntry::GetCachedGlyphWidth( int nCharCode ) const
...
@@ -107,13 +107,14 @@ inline int ImplWinFontEntry::GetCachedGlyphWidth( int nCharCode ) const
return
it
->
second
;
return
it
->
second
;
}
}
WinLayout
::
WinLayout
(
HDC
hDC
,
const
ImplWinFontData
&
rWFD
,
ImplWinFontEntry
&
rWFE
)
WinLayout
::
WinLayout
(
HDC
hDC
,
const
ImplWinFontData
&
rWFD
,
ImplWinFontEntry
&
rWFE
,
bool
bUseOpenGL
)
:
mhDC
(
hDC
),
:
mhDC
(
hDC
),
mhFont
(
(
HFONT
)
::
GetCurrentObject
(
hDC
,
OBJ_FONT
)
),
mhFont
(
(
HFONT
)
::
GetCurrentObject
(
hDC
,
OBJ_FONT
)
),
mnBaseAdv
(
0
),
mnBaseAdv
(
0
),
mfFontScale
(
1.0
),
mfFontScale
(
1.0
),
mrWinFontData
(
rWFD
),
mrWinFontData
(
rWFD
),
mrWinFontEntry
(
rWFE
)
mrWinFontEntry
(
rWFE
),
mbUseOpenGL
(
bUseOpenGL
)
{}
{}
void
WinLayout
::
InitFont
()
const
void
WinLayout
::
InitFont
()
const
...
@@ -148,9 +149,22 @@ SCRIPT_CACHE& WinLayout::GetScriptCache() const
...
@@ -148,9 +149,22 @@ SCRIPT_CACHE& WinLayout::GetScriptCache() const
return
mrWinFontEntry
.
GetScriptCache
();
return
mrWinFontEntry
.
GetScriptCache
();
}
}
SimpleWinLayout
::
SimpleWinLayout
(
HDC
hDC
,
BYTE
nCharSet
,
void
WinLayout
::
DrawText
(
SalGraphics
&
rGraphics
)
const
const
ImplWinFontData
&
rWinFontData
,
ImplWinFontEntry
&
rWinFontEntry
)
{
:
WinLayout
(
hDC
,
rWinFontData
,
rWinFontEntry
),
if
(
mbUseOpenGL
)
{
// TODO draw to a texture instead
DrawTextImpl
(
static_cast
<
WinSalGraphics
&>
(
rGraphics
).
getHDC
());
}
else
{
DrawTextImpl
(
static_cast
<
WinSalGraphics
&>
(
rGraphics
).
getHDC
());
}
}
SimpleWinLayout
::
SimpleWinLayout
(
HDC
hDC
,
BYTE
nCharSet
,
const
ImplWinFontData
&
rWinFontData
,
ImplWinFontEntry
&
rWinFontEntry
,
bool
bUseOpenGL
)
:
WinLayout
(
hDC
,
rWinFontData
,
rWinFontEntry
,
bUseOpenGL
),
mnGlyphCount
(
0
),
mnGlyphCount
(
0
),
mnCharCount
(
0
),
mnCharCount
(
0
),
mpOutGlyphs
(
NULL
),
mpOutGlyphs
(
NULL
),
...
@@ -517,14 +531,11 @@ int SimpleWinLayout::GetNextGlyphs( int nLen, sal_GlyphId* pGlyphIds, Point& rPo
...
@@ -517,14 +531,11 @@ int SimpleWinLayout::GetNextGlyphs( int nLen, sal_GlyphId* pGlyphIds, Point& rPo
return
nCount
;
return
nCount
;
}
}
void
SimpleWinLayout
::
DrawText
(
SalGraphics
&
rGraphics
)
const
void
SimpleWinLayout
::
DrawText
Impl
(
HDC
hDC
)
const
{
{
if
(
mnGlyphCount
<=
0
)
if
(
mnGlyphCount
<=
0
)
return
;
return
;
WinSalGraphics
&
rWinGraphics
=
static_cast
<
WinSalGraphics
&>
(
rGraphics
);
HDC
aHDC
=
rWinGraphics
.
getHDC
();
HFONT
hOrigFont
=
DisableFontScaling
();
HFONT
hOrigFont
=
DisableFontScaling
();
UINT
mnDrawOptions
=
ETO_GLYPH_INDEX
;
UINT
mnDrawOptions
=
ETO_GLYPH_INDEX
;
...
@@ -543,24 +554,23 @@ void SimpleWinLayout::DrawText( SalGraphics& rGraphics ) const
...
@@ -543,24 +554,23 @@ void SimpleWinLayout::DrawText( SalGraphics& rGraphics ) const
// #108267#,#109387# break up string into smaller chunks
// #108267#,#109387# break up string into smaller chunks
// the output positions will be updated by windows (SetTextAlign)
// the output positions will be updated by windows (SetTextAlign)
POINT
oldPos
;
POINT
oldPos
;
UINT
oldTa
=
::
GetTextAlign
(
aHDC
);
UINT
oldTa
=
::
GetTextAlign
(
hDC
);
::
SetTextAlign
(
aHDC
,
(
oldTa
&
~
TA_NOUPDATECP
)
|
TA_UPDATECP
);
::
SetTextAlign
(
hDC
,
(
oldTa
&
~
TA_NOUPDATECP
)
|
TA_UPDATECP
);
::
MoveToEx
(
aHDC
,
aPos
.
X
(),
aPos
.
Y
(),
&
oldPos
);
::
MoveToEx
(
hDC
,
aPos
.
X
(),
aPos
.
Y
(),
&
oldPos
);
unsigned
int
i
=
0
;
unsigned
int
i
=
0
;
for
(
unsigned
int
n
=
0
;
n
<
numGlyphPortions
;
++
n
,
i
+=
maxGlyphCount
)
for
(
unsigned
int
n
=
0
;
n
<
numGlyphPortions
;
++
n
,
i
+=
maxGlyphCount
)
::
ExtTextOutW
(
aHDC
,
0
,
0
,
mnDrawOptions
,
NULL
,
{
mpOutGlyphs
+
i
,
maxGlyphCount
,
mpGlyphAdvances
+
i
);
::
ExtTextOutW
(
hDC
,
0
,
0
,
mnDrawOptions
,
NULL
,
mpOutGlyphs
+
i
,
maxGlyphCount
,
mpGlyphAdvances
+
i
);
::
ExtTextOutW
(
aHDC
,
0
,
0
,
mnDrawOptions
,
NULL
,
}
mpOutGlyphs
+
i
,
remainingGlyphs
,
mpGlyphAdvances
+
i
);
::
ExtTextOutW
(
hDC
,
0
,
0
,
mnDrawOptions
,
NULL
,
mpOutGlyphs
+
i
,
remainingGlyphs
,
mpGlyphAdvances
+
i
);
::
MoveToEx
(
aH
DC
,
oldPos
.
x
,
oldPos
.
y
,
(
LPPOINT
)
NULL
);
::
MoveToEx
(
h
DC
,
oldPos
.
x
,
oldPos
.
y
,
(
LPPOINT
)
NULL
);
::
SetTextAlign
(
aHDC
,
oldTa
);
::
SetTextAlign
(
hDC
,
oldTa
);
}
}
else
else
::
ExtTextOutW
(
aHDC
,
aPos
.
X
(),
aPos
.
Y
(),
mnDrawOptions
,
NULL
,
::
ExtTextOutW
(
hDC
,
aPos
.
X
(),
aPos
.
Y
(),
mnDrawOptions
,
NULL
,
mpOutGlyphs
,
mnGlyphCount
,
mpGlyphAdvances
);
mpOutGlyphs
,
mnGlyphCount
,
mpGlyphAdvances
);
if
(
hOrigFont
)
if
(
hOrigFont
)
DeleteFont
(
SelectFont
(
aHDC
,
hOrigFont
)
);
DeleteFont
(
SelectFont
(
hDC
,
hOrigFont
)
);
}
}
DeviceCoordinate
SimpleWinLayout
::
FillDXArray
(
DeviceCoordinate
*
pDXArray
)
const
DeviceCoordinate
SimpleWinLayout
::
FillDXArray
(
DeviceCoordinate
*
pDXArray
)
const
...
@@ -933,9 +943,9 @@ static bool InitUSP()
...
@@ -933,9 +943,9 @@ static bool InitUSP()
return
true
;
return
true
;
}
}
UniscribeLayout
::
UniscribeLayout
(
HDC
hDC
,
UniscribeLayout
::
UniscribeLayout
(
HDC
hDC
,
const
ImplWinFontData
&
rWinFontData
,
const
ImplWinFontData
&
rWinFontData
,
ImplWinFontEntry
&
rWinFontEntry
)
ImplWinFontEntry
&
rWinFontEntry
,
bool
bUseOpenGL
)
:
WinLayout
(
hDC
,
rWinFontData
,
rWinFontEntry
),
:
WinLayout
(
hDC
,
rWinFontData
,
rWinFontEntry
,
bUseOpenGL
),
mpScriptItems
(
NULL
),
mpScriptItems
(
NULL
),
mpVisualItems
(
NULL
),
mpVisualItems
(
NULL
),
mnItemCount
(
0
),
mnItemCount
(
0
),
...
@@ -1907,7 +1917,7 @@ void UniscribeLayout::Simplify( bool /*bIsBase*/ )
...
@@ -1907,7 +1917,7 @@ void UniscribeLayout::Simplify( bool /*bIsBase*/ )
}
}
}
}
void
UniscribeLayout
::
DrawText
(
SalGraphics
&
)
const
void
UniscribeLayout
::
DrawText
Impl
(
HDC
hDC
)
const
{
{
HFONT
hOrigFont
=
DisableFontScaling
();
HFONT
hOrigFont
=
DisableFontScaling
();
...
@@ -1943,18 +1953,18 @@ void UniscribeLayout::DrawText( SalGraphics& ) const
...
@@ -1943,18 +1953,18 @@ void UniscribeLayout::DrawText( SalGraphics& ) const
Point
aRelPos
(
rVisualItem
.
mnXOffset
+
nBaseClusterOffset
,
0
);
Point
aRelPos
(
rVisualItem
.
mnXOffset
+
nBaseClusterOffset
,
0
);
Point
aPos
=
GetDrawPosition
(
aRelPos
);
Point
aPos
=
GetDrawPosition
(
aRelPos
);
SCRIPT_CACHE
&
rScriptCache
=
GetScriptCache
();
SCRIPT_CACHE
&
rScriptCache
=
GetScriptCache
();
ScriptTextOut
(
m
hDC
,
&
rScriptCache
,
ScriptTextOut
(
hDC
,
&
rScriptCache
,
aPos
.
X
(),
aPos
.
Y
(),
0
,
NULL
,
aPos
.
X
(),
aPos
.
Y
(),
0
,
NULL
,
&
rVisualItem
.
mpScriptItem
->
a
,
NULL
,
0
,
&
rVisualItem
.
mpScriptItem
->
a
,
NULL
,
0
,
mpOutGlyphs
+
nMinGlyphPos
,
mpOutGlyphs
+
nMinGlyphPos
,
nEndGlyphPos
-
nMinGlyphPos
,
nEndGlyphPos
-
nMinGlyphPos
,
mpGlyphAdvances
+
nMinGlyphPos
,
mpGlyphAdvances
+
nMinGlyphPos
,
mpJustifications
?
mpJustifications
+
nMinGlyphPos
:
NULL
,
mpJustifications
?
mpJustifications
+
nMinGlyphPos
:
NULL
,
mpGlyphOffsets
+
nMinGlyphPos
);
mpGlyphOffsets
+
nMinGlyphPos
);
}
}
if
(
hOrigFont
)
if
(
hOrigFont
)
DeleteFont
(
SelectFont
(
mhDC
,
hOrigFont
)
);
DeleteFont
(
SelectFont
(
hDC
,
hOrigFont
)
);
}
}
DeviceCoordinate
UniscribeLayout
::
FillDXArray
(
DeviceCoordinate
*
pDXArray
)
const
DeviceCoordinate
UniscribeLayout
::
FillDXArray
(
DeviceCoordinate
*
pDXArray
)
const
...
@@ -2494,8 +2504,8 @@ float gr_fontAdvance(const void* appFontHandle, gr_uint16 glyphId)
...
@@ -2494,8 +2504,8 @@ float gr_fontAdvance(const void* appFontHandle, gr_uint16 glyphId)
return
gm
.
gmCellIncX
;
return
gm
.
gmCellIncX
;
}
}
GraphiteWinLayout
::
GraphiteWinLayout
(
HDC
hDC
,
const
ImplWinFontData
&
rWFD
,
ImplWinFontEntry
&
rWFE
)
throw
()
GraphiteWinLayout
::
GraphiteWinLayout
(
HDC
hDC
,
const
ImplWinFontData
&
rWFD
,
ImplWinFontEntry
&
rWFE
,
bool
bUseOpenGL
)
throw
()
:
WinLayout
(
hDC
,
rWFD
,
rWFE
),
mpFont
(
NULL
),
:
WinLayout
(
hDC
,
rWFD
,
rWFE
,
bUseOpenGL
),
mpFont
(
NULL
),
maImpl
(
rWFD
.
GraphiteFace
(),
rWFE
)
maImpl
(
rWFD
.
GraphiteFace
(),
rWFE
)
{
{
// the log font size may differ from the font entry size if scaling is used for large fonts
// the log font size may differ from the font entry size if scaling is used for large fonts
...
@@ -2577,10 +2587,9 @@ void GraphiteWinLayout::AdjustLayout(ImplLayoutArgs& rArgs)
...
@@ -2577,10 +2587,9 @@ void GraphiteWinLayout::AdjustLayout(ImplLayoutArgs& rArgs)
maImpl
.
AdjustLayout
(
rArgs
);
maImpl
.
AdjustLayout
(
rArgs
);
}
}
void
GraphiteWinLayout
::
DrawText
(
SalGraphics
&
sal_graphics
)
const
void
GraphiteWinLayout
::
DrawText
Impl
(
HDC
hDC
)
const
{
{
HFONT
hOrigFont
=
DisableFontScaling
();
HFONT
hOrigFont
=
DisableFontScaling
();
const
HDC
aHDC
=
static_cast
<
WinSalGraphics
&>
(
sal_graphics
).
getHDC
();
maImpl
.
DrawBase
()
=
WinLayout
::
maDrawBase
;
maImpl
.
DrawBase
()
=
WinLayout
::
maDrawBase
;
maImpl
.
DrawOffset
()
=
WinLayout
::
maDrawOffset
;
maImpl
.
DrawOffset
()
=
WinLayout
::
maDrawOffset
;
const
int
MAX_GLYPHS
=
2
;
const
int
MAX_GLYPHS
=
2
;
...
@@ -2595,11 +2604,10 @@ void GraphiteWinLayout::DrawText(SalGraphics &sal_graphics) const
...
@@ -2595,11 +2604,10 @@ void GraphiteWinLayout::DrawText(SalGraphics &sal_graphics) const
if
(
nGlyphs
<
1
)
if
(
nGlyphs
<
1
)
break
;
break
;
std
::
copy
(
glyphIntStr
,
glyphIntStr
+
nGlyphs
,
glyphWStr
);
std
::
copy
(
glyphIntStr
,
glyphIntStr
+
nGlyphs
,
glyphWStr
);
::
ExtTextOutW
(
aHDC
,
aPos
.
X
(),
aPos
.
Y
(),
ETO_GLYPH_INDEX
,
::
ExtTextOutW
(
hDC
,
aPos
.
X
(),
aPos
.
Y
(),
ETO_GLYPH_INDEX
,
NULL
,
(
LPCWSTR
)
&
(
glyphWStr
),
nGlyphs
,
NULL
);
NULL
,
(
LPCWSTR
)
&
(
glyphWStr
),
nGlyphs
,
NULL
);
}
while
(
nGlyphs
);
}
while
(
nGlyphs
);
if
(
hOrigFont
)
if
(
hOrigFont
)
DeleteFont
(
SelectFont
(
aHDC
,
hOrigFont
)
);
DeleteFont
(
SelectFont
(
hDC
,
hOrigFont
)
);
}
}
sal_Int32
GraphiteWinLayout
::
GetTextBreak
(
DeviceCoordinate
nMaxWidth
,
DeviceCoordinate
nCharExtra
,
int
nFactor
)
const
sal_Int32
GraphiteWinLayout
::
GetTextBreak
(
DeviceCoordinate
nMaxWidth
,
DeviceCoordinate
nCharExtra
,
int
nFactor
)
const
...
@@ -2652,18 +2660,20 @@ SalLayout* WinSalGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLe
...
@@ -2652,18 +2660,20 @@ SalLayout* WinSalGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLe
const
ImplWinFontData
&
rFontFace
=
*
mpWinFontData
[
nFallbackLevel
];
const
ImplWinFontData
&
rFontFace
=
*
mpWinFontData
[
nFallbackLevel
];
ImplWinFontEntry
&
rFontInstance
=
*
mpWinFontEntry
[
nFallbackLevel
];
ImplWinFontEntry
&
rFontInstance
=
*
mpWinFontEntry
[
nFallbackLevel
];
bool
bUseOpenGL
=
OpenGLHelper
::
isVCLOpenGLEnabled
();
if
(
!
(
rArgs
.
mnFlags
&
SAL_LAYOUT_COMPLEX_DISABLED
)
if
(
!
(
rArgs
.
mnFlags
&
SAL_LAYOUT_COMPLEX_DISABLED
)
&&
(
bUspInited
||
InitUSP
())
)
// CTL layout engine
&&
(
bUspInited
||
InitUSP
())
)
// CTL layout engine
{
{
#if ENABLE_GRAPHITE
#if ENABLE_GRAPHITE
if
(
rFontFace
.
SupportsGraphite
())
if
(
rFontFace
.
SupportsGraphite
())
{
{
pWinLayout
=
new
GraphiteWinLayout
(
getHDC
(),
rFontFace
,
rFontInstance
);
pWinLayout
=
new
GraphiteWinLayout
(
getHDC
(),
rFontFace
,
rFontInstance
,
bUseOpenGL
);
}
}
else
else
#endif // ENABLE_GRAPHITE
#endif // ENABLE_GRAPHITE
// script complexity is determined in upper layers
// script complexity is determined in upper layers
pWinLayout
=
new
UniscribeLayout
(
getHDC
(),
rFontFace
,
rFontInstance
);
pWinLayout
=
new
UniscribeLayout
(
getHDC
(),
rFontFace
,
rFontInstance
,
bUseOpenGL
);
// NOTE: it must be guaranteed that the WinSalGraphics lives longer than
// NOTE: it must be guaranteed that the WinSalGraphics lives longer than
// the created UniscribeLayout, otherwise the data passed into the
// the created UniscribeLayout, otherwise the data passed into the
// constructor might become invalid too early
// constructor might become invalid too early
...
@@ -2683,10 +2693,10 @@ SalLayout* WinSalGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLe
...
@@ -2683,10 +2693,10 @@ SalLayout* WinSalGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLe
eCharSet
=
mpLogFont
->
lfCharSet
;
eCharSet
=
mpLogFont
->
lfCharSet
;
#if ENABLE_GRAPHITE
#if ENABLE_GRAPHITE
if
(
rFontFace
.
SupportsGraphite
())
if
(
rFontFace
.
SupportsGraphite
())
pWinLayout
=
new
GraphiteWinLayout
(
getHDC
(),
rFontFace
,
rFontInstance
);
pWinLayout
=
new
GraphiteWinLayout
(
getHDC
(),
rFontFace
,
rFontInstance
,
bUseOpenGL
);
else
else
#endif // ENABLE_GRAPHITE
#endif // ENABLE_GRAPHITE
pWinLayout
=
new
SimpleWinLayout
(
getHDC
(),
eCharSet
,
rFontFace
,
rFontInstance
);
pWinLayout
=
new
SimpleWinLayout
(
getHDC
(),
eCharSet
,
rFontFace
,
rFontInstance
,
bUseOpenGL
);
}
}
if
(
mfFontScale
[
nFallbackLevel
]
!=
1.0
)
if
(
mfFontScale
[
nFallbackLevel
]
!=
1.0
)
...
...
vcl/win/source/gdi/winlayout.hxx
Dosyayı görüntüle @
966fc1f2
...
@@ -40,18 +40,26 @@ struct VisualItem;
...
@@ -40,18 +40,26 @@ struct VisualItem;
class
WinLayout
:
public
SalLayout
class
WinLayout
:
public
SalLayout
{
{
public
:
public
:
WinLayout
(
HDC
,
const
ImplWinFontData
&
,
ImplWinFontEntry
&
);
WinLayout
(
HDC
,
const
ImplWinFontData
&
,
ImplWinFontEntry
&
,
bool
bUseOpenGL
);
virtual
void
InitFont
()
const
;
virtual
void
InitFont
()
const
;
void
SetFontScale
(
float
f
)
{
mfFontScale
=
f
;
}
void
SetFontScale
(
float
f
)
{
mfFontScale
=
f
;
}
HFONT
DisableFontScaling
(
void
)
const
;
HFONT
DisableFontScaling
(
void
)
const
;
SCRIPT_CACHE
&
GetScriptCache
()
const
;
SCRIPT_CACHE
&
GetScriptCache
()
const
;
/// In the non-OpenGL case, call the DrawTextImpl directly, otherwise make
/// sure we draw to an interim texture.
virtual
void
DrawText
(
SalGraphics
&
)
const
SAL_OVERRIDE
;
/// Draw to the provided HDC.
virtual
void
DrawTextImpl
(
HDC
hDC
)
const
=
0
;
protected
:
protected
:
HDC
mhDC
;
// WIN32 device handle
HDC
mhDC
;
// WIN32 device handle
HFONT
mhFont
;
// WIN32 font handle
HFONT
mhFont
;
// WIN32 font handle
int
mnBaseAdv
;
// x-offset relative to Layout origin
int
mnBaseAdv
;
// x-offset relative to Layout origin
float
mfFontScale
;
// allows metrics emulation of huge font sizes
float
mfFontScale
;
// allows metrics emulation of huge font sizes
bool
mbUseOpenGL
;
///< We need to render via OpenGL
const
ImplWinFontData
&
mrWinFontData
;
const
ImplWinFontData
&
mrWinFontData
;
ImplWinFontEntry
&
mrWinFontEntry
;
ImplWinFontEntry
&
mrWinFontEntry
;
...
@@ -60,12 +68,12 @@ protected:
...
@@ -60,12 +68,12 @@ protected:
class
SimpleWinLayout
:
public
WinLayout
class
SimpleWinLayout
:
public
WinLayout
{
{
public
:
public
:
SimpleWinLayout
(
HDC
,
BYTE
nCharSet
,
const
ImplWinFontData
&
,
ImplWinFontEntry
&
);
SimpleWinLayout
(
HDC
,
BYTE
nCharSet
,
const
ImplWinFontData
&
,
ImplWinFontEntry
&
,
bool
bUseOpenGL
);
virtual
~
SimpleWinLayout
();
virtual
~
SimpleWinLayout
();
virtual
bool
LayoutText
(
ImplLayoutArgs
&
);
virtual
bool
LayoutText
(
ImplLayoutArgs
&
);
virtual
void
AdjustLayout
(
ImplLayoutArgs
&
);
virtual
void
AdjustLayout
(
ImplLayoutArgs
&
);
virtual
void
DrawText
(
SalGraphics
&
)
const
;
virtual
void
DrawText
Impl
(
HDC
hDC
)
const
SAL_OVERRIDE
;
virtual
int
GetNextGlyphs
(
int
nLen
,
sal_GlyphId
*
pGlyphs
,
Point
&
rPos
,
int
&
,
virtual
int
GetNextGlyphs
(
int
nLen
,
sal_GlyphId
*
pGlyphs
,
Point
&
rPos
,
int
&
,
DeviceCoordinate
*
pGlyphAdvances
,
int
*
pCharIndexes
,
DeviceCoordinate
*
pGlyphAdvances
,
int
*
pCharIndexes
,
...
@@ -104,11 +112,11 @@ private:
...
@@ -104,11 +112,11 @@ private:
class
UniscribeLayout
:
public
WinLayout
class
UniscribeLayout
:
public
WinLayout
{
{
public
:
public
:
UniscribeLayout
(
HDC
,
const
ImplWinFontData
&
,
ImplWinFontEntry
&
);
UniscribeLayout
(
HDC
,
const
ImplWinFontData
&
,
ImplWinFontEntry
&
,
bool
bUseOpenGL
);
virtual
bool
LayoutText
(
ImplLayoutArgs
&
);
virtual
bool
LayoutText
(
ImplLayoutArgs
&
);
virtual
void
AdjustLayout
(
ImplLayoutArgs
&
);
virtual
void
AdjustLayout
(
ImplLayoutArgs
&
);
virtual
void
DrawText
(
SalGraphics
&
)
const
;
virtual
void
DrawText
Impl
(
HDC
hDC
)
const
SAL_OVERRIDE
;
virtual
int
GetNextGlyphs
(
int
nLen
,
sal_GlyphId
*
pGlyphs
,
Point
&
rPos
,
int
&
,
virtual
int
GetNextGlyphs
(
int
nLen
,
sal_GlyphId
*
pGlyphs
,
Point
&
rPos
,
int
&
,
DeviceCoordinate
*
pGlyphAdvances
,
int
*
pCharPosAry
,
DeviceCoordinate
*
pGlyphAdvances
,
int
*
pCharPosAry
,
const
PhysicalFontFace
**
pFallbackFonts
=
NULL
)
const
;
const
PhysicalFontFace
**
pFallbackFonts
=
NULL
)
const
;
...
@@ -189,13 +197,13 @@ private:
...
@@ -189,13 +197,13 @@ private:
grutils
::
GrFeatureParser
*
mpFeatures
;
grutils
::
GrFeatureParser
*
mpFeatures
;
mutable
GraphiteLayoutWinImpl
maImpl
;
mutable
GraphiteLayoutWinImpl
maImpl
;
public
:
public
:
GraphiteWinLayout
(
HDC
hDC
,
const
ImplWinFontData
&
rWFD
,
ImplWinFontEntry
&
rWFE
)
throw
();
GraphiteWinLayout
(
HDC
hDC
,
const
ImplWinFontData
&
rWFD
,
ImplWinFontEntry
&
rWFE
,
bool
bUseOpenGL
)
throw
();
virtual
~
GraphiteWinLayout
();
virtual
~
GraphiteWinLayout
();
// used by upper layers
// used by upper layers
virtual
bool
LayoutText
(
ImplLayoutArgs
&
);
// first step of layout
virtual
bool
LayoutText
(
ImplLayoutArgs
&
);
// first step of layout
virtual
void
AdjustLayout
(
ImplLayoutArgs
&
);
// adjusting after fallback etc.
virtual
void
AdjustLayout
(
ImplLayoutArgs
&
);
// adjusting after fallback etc.
virtual
void
DrawText
(
SalGraphics
&
)
const
;
virtual
void
DrawText
Impl
(
HDC
hDC
)
const
SAL_OVERRIDE
;
// methods using string indexing
// methods using string indexing
virtual
sal_Int32
GetTextBreak
(
DeviceCoordinate
nMaxWidth
,
DeviceCoordinate
nCharExtra
=
0
,
int
nFactor
=
1
)
const
SAL_OVERRIDE
;
virtual
sal_Int32
GetTextBreak
(
DeviceCoordinate
nMaxWidth
,
DeviceCoordinate
nCharExtra
=
0
,
int
nFactor
=
1
)
const
SAL_OVERRIDE
;
...
...
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