summaryrefslogtreecommitdiff
path: root/psprint
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2003-08-25 12:59:45 +0000
committerKurt Zenker <kz@openoffice.org>2003-08-25 12:59:45 +0000
commit6808a0523b7af99b86e3e4fef3fd9c06a7a4ffbe (patch)
tree2c4dc3f82b954b879c3b91ec86f5584995711feb /psprint
parenta115709386128a7aed8d00b0e2fb41e337eaa758 (diff)
INTEGRATION: CWS vcl15 (1.20.2); FILE MERGED
2003/07/25 18:12:28 pl 1.20.2.1: #i17352# artificial italic and bold
Diffstat (limited to 'psprint')
-rw-r--r--psprint/source/printergfx/text_gfx.cxx44
1 files changed, 33 insertions, 11 deletions
diff --git a/psprint/source/printergfx/text_gfx.cxx b/psprint/source/printergfx/text_gfx.cxx
index 1fd9876368ce..5f2c7a1b6d48 100644
--- a/psprint/source/printergfx/text_gfx.cxx
+++ b/psprint/source/printergfx/text_gfx.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: text_gfx.cxx,v $
*
- * $Revision: 1.20 $
+ * $Revision: 1.21 $
*
- * last change: $Author: hr $ $Date: 2003-06-30 14:26:57 $
+ * last change: $Author: kz $ $Date: 2003-08-25 13:59:45 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -176,7 +176,9 @@ PrinterGfx::SetFont(
sal_Int32 nHeight,
sal_Int32 nWidth,
sal_Int32 nAngle,
- bool bVertical
+ bool bVertical,
+ bool bArtItalic,
+ bool bArtBold
)
{
// font and encoding will be set by drawText again immediately
@@ -186,6 +188,8 @@ PrinterGfx::SetFont(
maVirtualStatus.maEncoding = RTL_TEXTENCODING_DONTKNOW;
maVirtualStatus.mnTextHeight = nHeight;
maVirtualStatus.mnTextWidth = nWidth;
+ maVirtualStatus.mbArtItalic = bArtItalic;
+ maVirtualStatus.mbArtBold = bArtBold;
mnTextAngle = nAngle;
mbTextVertical = bVertical;
@@ -455,8 +459,13 @@ PrinterGfx::DrawText (
nTo++ ;
}
- SetFont( nFont, maVirtualStatus.mnTextHeight, maVirtualStatus.mnTextWidth,
- mnTextAngle, mbTextVertical );
+ SetFont( nFont,
+ maVirtualStatus.mnTextHeight, maVirtualStatus.mnTextWidth,
+ mnTextAngle,
+ mbTextVertical,
+ maVirtualStatus.mbArtItalic,
+ maVirtualStatus.mbArtBold
+ );
if (mbTextVertical)
{
@@ -483,8 +492,12 @@ PrinterGfx::DrawText (
}
// restore the original font settings
- SetFont( nRestoreFont, maVirtualStatus.mnTextHeight, maVirtualStatus.mnTextWidth,
- mnTextAngle, mbTextVertical );
+ SetFont( nRestoreFont,
+ maVirtualStatus.mnTextHeight, maVirtualStatus.mnTextWidth,
+ mnTextAngle, mbTextVertical,
+ maVirtualStatus.mbArtItalic,
+ maVirtualStatus.mbArtBold
+ );
}
void PrinterGfx::drawVerticalizedText(
@@ -521,7 +534,11 @@ void PrinterGfx::drawVerticalizedText(
for( int n = nLastPos; n < i; n++ )
pDelta[n] = pDeltaArray[n] - (aPoint.X() - rPoint.X() );
- SetFont( mnFontID, maVirtualStatus.mnTextHeight, maVirtualStatus.mnTextWidth, nNormalAngle, mbTextVertical );
+ SetFont( mnFontID,
+ maVirtualStatus.mnTextHeight, maVirtualStatus.mnTextWidth,
+ nNormalAngle, mbTextVertical,
+ maVirtualStatus.mbArtItalic,
+ maVirtualStatus.mbArtBold );
drawText( aPoint, pStr + nLastPos, i - nLastPos, pDelta + nLastPos );
aPoint.X() = rPoint.X() + ((double)pDeltaArray[i-1] * fCos);
@@ -531,10 +548,13 @@ void PrinterGfx::drawVerticalizedText(
{
int nOldWidth = maVirtualStatus.mnTextWidth;
int nOldHeight = maVirtualStatus.mnTextHeight;
- SetFont( mnFontID, nTextScale,
+ SetFont( mnFontID,
+ nTextScale,
maVirtualStatus.mnTextHeight,
nNormalAngle + nDeltaAngle,
- mbTextVertical );
+ mbTextVertical,
+ maVirtualStatus.mbArtItalic,
+ maVirtualStatus.mbArtBold );
double nA = nTextScale * aInfo.m_nAscend / 1000.0;
double nD = nTextScale * aInfo.m_nDescend / 1000.0;
@@ -566,7 +586,9 @@ void PrinterGfx::drawVerticalizedText(
nOldHeight,
nOldWidth,
nNormalAngle,
- mbTextVertical );
+ mbTextVertical,
+ maVirtualStatus.mbArtItalic,
+ maVirtualStatus.mbArtBold );
}
i++;
nLastPos = i;