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
9754ad8d
Kaydet (Commit)
9754ad8d
authored
Şub 19, 2002
tarafından
Philipp Lohmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#97492# add: DrawGlyphs
üst
cf67b55a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
145 additions
and
57 deletions
+145
-57
printergfx.hxx
psprint/inc/psprint/printergfx.hxx
+9
-2
glyphset.cxx
psprint/source/printergfx/glyphset.cxx
+0
-0
glyphset.hxx
psprint/source/printergfx/glyphset.hxx
+71
-53
text_gfx.cxx
psprint/source/printergfx/text_gfx.cxx
+65
-2
No files found.
psprint/inc/psprint/printergfx.hxx
Dosyayı görüntüle @
9754ad8d
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: printergfx.hxx,v $
*
* $Revision: 1.
6
$
* $Revision: 1.
7
$
*
* last change: $Author:
cp $ $Date: 2001-07-06 16:06:0
3 $
* last change: $Author:
pl $ $Date: 2002-02-19 16:28:5
3 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -435,6 +435,13 @@ public:
sal_uInt32
GetGlyphOutline
(
sal_Unicode
c
,
sal_uInt16
**
ppPolySizes
,
Point
**
ppPoints
,
sal_uInt8
**
ppFlags
);
// for CTL
void
DrawGlyphs
(
const
Point
&
rPoint
,
sal_uInt32
*
pGlyphIds
,
sal_Unicode
*
pUnicodes
,
sal_Int16
nLen
,
sal_Int32
*
pDeltaArray
);
};
}
/* namespace psp */
...
...
psprint/source/printergfx/glyphset.cxx
Dosyayı görüntüle @
9754ad8d
This diff is collapsed.
Click to expand it.
psprint/source/printergfx/glyphset.hxx
Dosyayı görüntüle @
9754ad8d
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: glyphset.hxx,v $
*
* $Revision: 1.
3
$
* $Revision: 1.
4
$
*
* last change: $Author:
cp $ $Date: 2001-11-01 16:23:29
$
* last change: $Author:
pl $ $Date: 2002-02-19 16:28:53
$
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -88,65 +88,83 @@ class PrintFontManager;
class
GlyphSet
{
private
:
private
:
sal_Int32
mnFontID
;
sal_Bool
mbVertical
;
rtl
::
OString
maBaseName
;
fonttype
::
type
meBaseType
;
rtl_TextEncoding
mnBaseEncoding
;
sal_Int32
mnFontID
;
sal_Bool
mbVertical
;
rtl
::
OString
maBaseName
;
fonttype
::
type
meBaseType
;
rtl_TextEncoding
mnBaseEncoding
;
typedef
std
::
hash_map
<
sal_Unicode
,
sal_uInt8
>
glyph_mapping_t
;
typedef
std
::
list
<
glyph_mapping_t
>
glyphlist_t
;
typedef
std
::
hash_map
<
sal_Unicode
,
sal_uInt8
>
char_map_t
;
typedef
std
::
list
<
char_map_t
>
char_list_t
;
typedef
std
::
hash_map
<
sal_uInt32
,
sal_uInt8
>
glyph_map_t
;
typedef
std
::
list
<
glyph_map_t
>
glyph_list_t
;
glyphlist_t
maGlyphList
;
char_list_t
maCharList
;
glyph_list_t
maGlyphList
;
rtl
::
OString
GetGlyphSetName
(
sal_Int32
nGlyphSetID
);
sal_Int32
GetGlyphSetEncoding
(
sal_Int32
nGlyphSetID
);
rtl
::
OString
GetGlyphSetEncodingName
(
sal_Int32
nGlyphSetID
);
rtl
::
OString
GetGlyphSetName
(
sal_Int32
nGlyphSetID
);
rtl
::
OString
GetCharSetName
(
sal_Int32
nGlyphSetID
);
sal_Int32
GetGlyphSetEncoding
(
sal_Int32
nGlyphSetID
);
rtl
::
OString
GetGlyphSetEncodingName
(
sal_Int32
nGlyphSetID
);
rtl
::
OString
GetReencodedFontName
(
sal_Int32
nGlyphSetID
);
void
PSDefineReencodedFont
(
osl
::
File
*
pOutFile
,
sal_Int32
nGlyphSetID
);
rtl
::
OString
GetReencodedFontName
(
sal_Int32
nGlyphSetID
);
void
PSDefineReencodedFont
(
osl
::
File
*
pOutFile
,
sal_Int32
nGlyphSetID
);
sal_Bool
GetGlyph
ID
(
sal_Unicode
nChar
,
sal_Bool
GetChar
ID
(
sal_Unicode
nChar
,
sal_uChar
*
nOutGlyphID
,
sal_Int32
*
nOutGlyphSetID
);
sal_Bool
LookupGlyphID
(
sal_Unicode
nChar
,
sal_Bool
LookupCharID
(
sal_Unicode
nChar
,
sal_uChar
*
nOutGlyphID
,
sal_Int32
*
nOutGlyphSetID
);
sal_Bool
AddCharID
(
sal_Unicode
nChar
,
sal_uChar
*
nOutGlyphID
,
sal_Int32
*
nOutGlyphSetID
);
sal_Bool
GetGlyphID
(
sal_uInt32
nGlyph
,
sal_Unicode
nUnicode
,
sal_uChar
*
nOutGlyphID
,
sal_Int32
*
nOutGlyphSetID
);
sal_Bool
AddGlyphID
(
sal_Unicode
nChar
,
sal_uChar
*
nOutGlyphID
,
sal_Int32
*
nOutGlyphSetID
);
sal_uChar
GetAnsiMapping
(
sal_Unicode
nUnicodeChar
);
sal_uChar
GetSymbolMapping
(
sal_Unicode
nUnicodeChar
);
void
ImplDrawText
(
PrinterGfx
&
rGfx
,
const
Point
&
rPoint
,
const
sal_Unicode
*
pStr
,
sal_Int16
nLen
);
void
ImplDrawText
(
PrinterGfx
&
rGfx
,
const
Point
&
rPoint
,
const
sal_Unicode
*
pStr
,
sal_Int16
nLen
,
const
sal_Int32
*
pDeltaArray
);
public
:
GlyphSet
();
GlyphSet
(
sal_Int32
nFontID
,
sal_Bool
bVertical
);
~
GlyphSet
();
sal_Int32
GetFontID
();
fonttype
::
type
GetFontType
();
static
rtl
::
OString
GetReencodedFontName
(
rtl_TextEncoding
nEnc
,
const
rtl
::
OString
&
rFontName
);
static
rtl
::
OString
GetGlyphSetEncodingName
(
rtl_TextEncoding
nEnc
,
const
rtl
::
OString
&
rFontName
);
sal_Bool
IsVertical
();
sal_Bool
SetFont
(
sal_Int32
nFontID
,
sal_Bool
bVertical
);
void
DrawText
(
PrinterGfx
&
rGfx
,
const
Point
&
rPoint
,
const
sal_Unicode
*
pStr
,
sal_Int16
nLen
,
const
sal_Int32
*
pDeltaArray
=
NULL
);
sal_Bool
PSUploadEncoding
(
osl
::
File
*
pOutFile
,
PrinterGfx
&
rGfx
);
sal_Bool
PSUploadFont
(
osl
::
File
&
rOutFile
,
PrinterGfx
&
rGfx
,
bool
bAsType42
);
sal_Bool
LookupGlyphID
(
sal_uInt32
nGlyph
,
sal_uChar
*
nOutGlyphID
,
sal_Int32
*
nOutGlyphSetID
);
sal_Bool
AddGlyphID
(
sal_uInt32
nGlyph
,
sal_Unicode
nUnicode
,
sal_uChar
*
nOutGlyphID
,
sal_Int32
*
nOutGlyphSetID
);
sal_uChar
GetAnsiMapping
(
sal_Unicode
nUnicodeChar
);
sal_uChar
GetSymbolMapping
(
sal_Unicode
nUnicodeChar
);
void
ImplDrawText
(
PrinterGfx
&
rGfx
,
const
Point
&
rPoint
,
const
sal_Unicode
*
pStr
,
sal_Int16
nLen
);
void
ImplDrawText
(
PrinterGfx
&
rGfx
,
const
Point
&
rPoint
,
const
sal_Unicode
*
pStr
,
sal_Int16
nLen
,
const
sal_Int32
*
pDeltaArray
);
public
:
GlyphSet
();
GlyphSet
(
sal_Int32
nFontID
,
sal_Bool
bVertical
);
~
GlyphSet
();
sal_Int32
GetFontID
();
fonttype
::
type
GetFontType
();
static
rtl
::
OString
GetReencodedFontName
(
rtl_TextEncoding
nEnc
,
const
rtl
::
OString
&
rFontName
);
static
rtl
::
OString
GetGlyphSetEncodingName
(
rtl_TextEncoding
nEnc
,
const
rtl
::
OString
&
rFontName
);
sal_Bool
IsVertical
();
sal_Bool
SetFont
(
sal_Int32
nFontID
,
sal_Bool
bVertical
);
void
DrawText
(
PrinterGfx
&
rGfx
,
const
Point
&
rPoint
,
const
sal_Unicode
*
pStr
,
sal_Int16
nLen
,
const
sal_Int32
*
pDeltaArray
=
NULL
);
void
DrawGlyphs
(
PrinterGfx
&
rGfx
,
const
Point
&
rPoint
,
const
sal_uInt32
*
pGlyphIds
,
const
sal_Unicode
*
pUnicodes
,
sal_Int16
nLen
,
const
sal_Int32
*
pDeltaArray
);
sal_Bool
PSUploadEncoding
(
osl
::
File
*
pOutFile
,
PrinterGfx
&
rGfx
);
sal_Bool
PSUploadFont
(
osl
::
File
&
rOutFile
,
PrinterGfx
&
rGfx
,
bool
bAsType42
);
};
...
...
psprint/source/printergfx/text_gfx.cxx
Dosyayı görüntüle @
9754ad8d
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: text_gfx.cxx,v $
*
* $Revision: 1.1
5
$
* $Revision: 1.1
6
$
*
* last change: $Author:
hdu $ $Date: 2001-12-21 16:27:15
$
* last change: $Author:
pl $ $Date: 2002-02-19 16:28:53
$
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -223,6 +223,69 @@ PrinterGfx::SetFallbackFont ( sal_Int32 nFontID )
return
0
;
}
void
PrinterGfx
::
DrawGlyphs
(
const
Point
&
rPoint
,
sal_uInt32
*
pGlyphIds
,
sal_Unicode
*
pUnicodes
,
sal_Int16
nLen
,
sal_Int32
*
pDeltaArray
)
{
if
(
nLen
<=
0
)
return
;
if
(
!
mrFontMgr
.
isFontDownloadingAllowed
(
mnFontID
)
)
{
LicenceWarning
(
rPoint
,
pUnicodes
,
nLen
,
pDeltaArray
);
return
;
}
if
(
mrFontMgr
.
getFontType
(
mnFontID
)
!=
fonttype
::
TrueType
)
{
DrawText
(
rPoint
,
pUnicodes
,
nLen
,
pDeltaArray
);
return
;
}
// move and rotate the user coordinate system
// avoid the gsave/grestore for the simple cases since it allows
// reuse of the current font if it hasn't changed
sal_Int32
nCurrentTextAngle
=
mnTextAngle
;
Point
aPoint
(
rPoint
);
if
(
nCurrentTextAngle
!=
0
)
{
PSGSave
();
PSTranslate
(
rPoint
);
PSRotate
(
nCurrentTextAngle
);
mnTextAngle
=
0
;
aPoint
=
Point
(
0
,
0
);
}
// draw the string
// search for a glyph set matching the set font
std
::
list
<
GlyphSet
>::
iterator
aIter
;
for
(
aIter
=
maPS3Font
.
begin
();
aIter
!=
maPS3Font
.
end
();
aIter
++
)
if
(
((
*
aIter
).
GetFontID
()
==
mnFontID
)
&&
((
*
aIter
).
IsVertical
()
==
mbTextVertical
))
{
(
*
aIter
).
DrawGlyphs
(
*
this
,
aPoint
,
pGlyphIds
,
pUnicodes
,
nLen
,
pDeltaArray
);
break
;
}
// not found ? create a new one
if
(
aIter
==
maPS3Font
.
end
())
{
maPS3Font
.
push_back
(
GlyphSet
(
mnFontID
,
mbTextVertical
));
maPS3Font
.
back
().
DrawGlyphs
(
*
this
,
aPoint
,
pGlyphIds
,
pUnicodes
,
nLen
,
pDeltaArray
);
}
// restore the user coordinate system
if
(
nCurrentTextAngle
!=
0
)
{
PSGRestore
();
mnTextAngle
=
nCurrentTextAngle
;
}
}
void
PrinterGfx
::
DrawText
(
const
Point
&
rPoint
,
...
...
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