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
88718a87
Kaydet (Commit)
88718a87
authored
Nis 14, 2014
tarafından
Thomas Arnhold
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
starmath: remove duplicate SmTmpDevice
Change-Id: Ib1733ece03ad0a5ffad5157a622546d0cbac0a35
üst
6bb7fa8d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
151 additions
and
173 deletions
+151
-173
Library_sm.mk
starmath/Library_sm.mk
+1
-0
node.cxx
starmath/source/node.cxx
+18
-97
tmpdevice.cxx
starmath/source/tmpdevice.cxx
+76
-0
tmpdevice.hxx
starmath/source/tmpdevice.hxx
+48
-0
visitors.cxx
starmath/source/visitors.cxx
+8
-76
No files found.
starmath/Library_sm.mk
Dosyayı görüntüle @
88718a87
...
...
@@ -78,6 +78,7 @@ $(eval $(call gb_Library_add_exception_objects,sm,\
starmath/source/smmod \
starmath/source/symbol \
starmath/source/toolbox \
starmath/source/tmpdevice \
starmath/source/typemap \
starmath/source/unodoc \
starmath/source/unomodel \
...
...
starmath/source/node.cxx
Dosyayı görüntüle @
88718a87
...
...
@@ -25,98 +25,19 @@
#include "document.hxx"
#include "view.hxx"
#include "mathtype.hxx"
#include "tmpdevice.hxx"
#include "visitors.hxx"
#include <boost/noncopyable.hpp>
#include <comphelper/string.hxx>
#include <tools/gen.hxx>
#include <tools/fract.hxx>
#include <rtl/math.hxx>
#include <tools/color.hxx>
#include <
vcl/metric
.hxx>
#include <
vcl/lineinfo
.hxx>
#include <
tools/fract
.hxx>
#include <
tools/gen
.hxx>
#include <vcl/outdev.hxx>
#include <sfx2/module.hxx>
#include <math.h>
#include <float.h>
// SmTmpDevice
// Allows for font and color changes. The original settings will be restored
// in the destructor.
// It's main purpose is to allow for the "const" in the 'OutputDevice'
// argument in the 'Arrange' functions and restore changes made in the 'Draw'
// functions.
// Usually a MapMode of 1/100th mm will be used.
class
SmTmpDevice
:
private
boost
::
noncopyable
{
OutputDevice
&
rOutDev
;
Color
Impl_GetColor
(
const
Color
&
rColor
);
public
:
SmTmpDevice
(
OutputDevice
&
rTheDev
,
bool
bUseMap100th_mm
);
~
SmTmpDevice
()
{
rOutDev
.
Pop
();
}
void
SetFont
(
const
Font
&
rNewFont
);
operator
OutputDevice
&
()
{
return
rOutDev
;
}
};
SmTmpDevice
::
SmTmpDevice
(
OutputDevice
&
rTheDev
,
bool
bUseMap100th_mm
)
:
rOutDev
(
rTheDev
)
{
rOutDev
.
Push
(
PUSH_FONT
|
PUSH_MAPMODE
|
PUSH_LINECOLOR
|
PUSH_FILLCOLOR
|
PUSH_TEXTCOLOR
);
if
(
bUseMap100th_mm
&&
MAP_100TH_MM
!=
rOutDev
.
GetMapMode
().
GetMapUnit
())
{
SAL_WARN
(
"starmath"
,
"incorrect MapMode?"
);
rOutDev
.
SetMapMode
(
MAP_100TH_MM
);
//Immer fuer 100% fomatieren
}
}
Color
SmTmpDevice
::
Impl_GetColor
(
const
Color
&
rColor
)
{
ColorData
nNewCol
=
rColor
.
GetColor
();
if
(
COL_AUTO
==
nNewCol
)
{
if
(
OUTDEV_PRINTER
==
rOutDev
.
GetOutDevType
())
nNewCol
=
COL_BLACK
;
else
{
Color
aBgCol
(
rOutDev
.
GetBackground
().
GetColor
()
);
if
(
OUTDEV_WINDOW
==
rOutDev
.
GetOutDevType
())
aBgCol
=
((
Window
&
)
rOutDev
).
GetDisplayBackground
().
GetColor
();
nNewCol
=
SM_MOD
()
->
GetColorConfig
().
GetColorValue
(
svtools
::
FONTCOLOR
).
nColor
;
Color
aTmpColor
(
nNewCol
);
if
(
aBgCol
.
IsDark
()
&&
aTmpColor
.
IsDark
())
nNewCol
=
COL_WHITE
;
else
if
(
aBgCol
.
IsBright
()
&&
aTmpColor
.
IsBright
())
nNewCol
=
COL_BLACK
;
}
}
return
Color
(
nNewCol
);
}
void
SmTmpDevice
::
SetFont
(
const
Font
&
rNewFont
)
{
rOutDev
.
SetFont
(
rNewFont
);
rOutDev
.
SetTextColor
(
Impl_GetColor
(
rNewFont
.
GetColor
()
)
);
}
SmNode
::
SmNode
(
SmNodeType
eNodeType
,
const
SmToken
&
rNodeToken
)
:
aNodeToken
(
rNodeToken
)
,
eType
(
eNodeType
)
...
...
@@ -862,7 +783,7 @@ void SmTableNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
nFormulaBaseline
=
GetBaseline
();
else
{
SmTmpDevice
aTmpDev
((
OutputDevice
&
)
rDev
,
true
);
SmTmpDevice
aTmpDev
((
OutputDevice
&
)
rDev
,
true
);
aTmpDev
.
SetFont
(
GetFont
());
SmRect
aRect
=
(
SmRect
(
aTmpDev
,
&
rFormat
,
OUString
(
"a"
),
...
...
@@ -914,7 +835,7 @@ void SmLineNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
if
(
NULL
!=
(
pNode
=
GetSubNode
(
i
)))
pNode
->
Arrange
(
rDev
,
rFormat
);
SmTmpDevice
aTmpDev
((
OutputDevice
&
)
rDev
,
true
);
SmTmpDevice
aTmpDev
((
OutputDevice
&
)
rDev
,
true
);
aTmpDev
.
SetFont
(
GetFont
());
if
(
nSize
<
1
)
...
...
@@ -1485,7 +1406,7 @@ void SmBinDiagonalNode::Arrange(const OutputDevice &rDev, const SmFormat &rForma
//! some routines being called extract some info from the OutputDevice's
//! font (eg the space to be used for borders OR the font name(!!)).
//! Thus the font should reflect the needs and has to be set!
SmTmpDevice
aTmpDev
((
OutputDevice
&
)
rDev
,
true
);
SmTmpDevice
aTmpDev
((
OutputDevice
&
)
rDev
,
true
);
aTmpDev
.
SetFont
(
GetFont
());
pLeft
->
Arrange
(
aTmpDev
,
rFormat
);
...
...
@@ -1905,7 +1826,7 @@ void SmVerticalBraceNode::Arrange(const OutputDevice &rDev, const SmFormat &rFor
OSL_ENSURE
(
pBrace
,
"Sm: NULL pointer!"
);
OSL_ENSURE
(
pScript
,
"Sm: NULL pointer!"
);
SmTmpDevice
aTmpDev
((
OutputDevice
&
)
rDev
,
true
);
SmTmpDevice
aTmpDev
((
OutputDevice
&
)
rDev
,
true
);
aTmpDev
.
SetFont
(
GetFont
());
pBody
->
Arrange
(
aTmpDev
,
rFormat
);
...
...
@@ -2288,7 +2209,7 @@ void SmPolyLineNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
//! some routines being called extract some info from the OutputDevice's
//! font (eg the space to be used for borders OR the font name(!!)).
//! Thus the font should reflect the needs and has to be set!
SmTmpDevice
aTmpDev
((
OutputDevice
&
)
rDev
,
true
);
SmTmpDevice
aTmpDev
((
OutputDevice
&
)
rDev
,
true
);
aTmpDev
.
SetFont
(
GetFont
());
long
nBorderwidth
=
GetFont
().
GetBorderWidth
();
...
...
@@ -2381,7 +2302,7 @@ void SmRectangleNode::Arrange(const OutputDevice &rDev, const SmFormat &/*rForma
if
(
nWidth
==
0
)
nWidth
=
nFontHeight
/
3
;
SmTmpDevice
aTmpDev
((
OutputDevice
&
)
rDev
,
true
);
SmTmpDevice
aTmpDev
((
OutputDevice
&
)
rDev
,
true
);
aTmpDev
.
SetFont
(
GetFont
());
// add some borderspace
...
...
@@ -2447,7 +2368,7 @@ void SmTextNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
SIZ_FUNCTION
:
SIZ_TEXT
;
GetFont
()
*=
Fraction
(
rFormat
.
GetRelSize
(
nSizeDesc
),
100
);
SmTmpDevice
aTmpDev
((
OutputDevice
&
)
rDev
,
true
);
SmTmpDevice
aTmpDev
((
OutputDevice
&
)
rDev
,
true
);
aTmpDev
.
SetFont
(
GetFont
());
SmRect
::
operator
=
(
SmRect
(
aTmpDev
,
&
rFormat
,
aText
,
GetFont
().
GetBorderWidth
()));
...
...
@@ -2729,7 +2650,7 @@ void SmMathSymbolNode::AdaptToX(const OutputDevice &rDev, sal_uLong nWidth)
aFntSize
.
Width
()
=
nWidth
;
GetFont
().
SetSize
(
aFntSize
);
SmTmpDevice
aTmpDev
((
OutputDevice
&
)
rDev
,
true
);
SmTmpDevice
aTmpDev
((
OutputDevice
&
)
rDev
,
true
);
aTmpDev
.
SetFont
(
GetFont
());
// get denominator of error factor for width
...
...
@@ -2765,7 +2686,7 @@ void SmMathSymbolNode::AdaptToY(const OutputDevice &rDev, sal_uLong nHeight)
aFntSize
.
Height
()
=
nHeight
;
GetFont
().
SetSize
(
aFntSize
);
SmTmpDevice
aTmpDev
((
OutputDevice
&
)
rDev
,
true
);
SmTmpDevice
aTmpDev
((
OutputDevice
&
)
rDev
,
true
);
aTmpDev
.
SetFont
(
GetFont
());
// get denominator of error factor for height
...
...
@@ -2809,7 +2730,7 @@ void SmMathSymbolNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat
GetFont
()
*=
Fraction
(
rFormat
.
GetRelSize
(
SIZ_TEXT
),
100
);
SmTmpDevice
aTmpDev
((
OutputDevice
&
)
rDev
,
true
);
SmTmpDevice
aTmpDev
((
OutputDevice
&
)
rDev
,
true
);
aTmpDev
.
SetFont
(
GetFont
());
SmRect
::
operator
=
(
SmRect
(
aTmpDev
,
&
rFormat
,
rText
,
GetFont
().
GetBorderWidth
()));
...
...
@@ -3031,7 +2952,7 @@ void SmSpecialNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
{
PrepareAttributes
();
SmTmpDevice
aTmpDev
((
OutputDevice
&
)
rDev
,
true
);
SmTmpDevice
aTmpDev
((
OutputDevice
&
)
rDev
,
true
);
aTmpDev
.
SetFont
(
GetFont
());
SmRect
::
operator
=
(
SmRect
(
aTmpDev
,
&
rFormat
,
GetText
(),
GetFont
().
GetBorderWidth
()));
...
...
@@ -3044,7 +2965,7 @@ void SmGlyphSpecialNode::Arrange(const OutputDevice &rDev, const SmFormat &rForm
{
PrepareAttributes
();
SmTmpDevice
aTmpDev
((
OutputDevice
&
)
rDev
,
true
);
SmTmpDevice
aTmpDev
((
OutputDevice
&
)
rDev
,
true
);
aTmpDev
.
SetFont
(
GetFont
());
SmRect
::
operator
=
(
SmRect
(
aTmpDev
,
&
rFormat
,
GetText
(),
...
...
@@ -3068,7 +2989,7 @@ void SmPlaceNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
{
PrepareAttributes
();
SmTmpDevice
aTmpDev
((
OutputDevice
&
)
rDev
,
true
);
SmTmpDevice
aTmpDev
((
OutputDevice
&
)
rDev
,
true
);
aTmpDev
.
SetFont
(
GetFont
());
SmRect
::
operator
=
(
SmRect
(
aTmpDev
,
&
rFormat
,
GetText
(),
GetFont
().
GetBorderWidth
()));
...
...
@@ -3092,7 +3013,7 @@ void SmErrorNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
{
PrepareAttributes
();
SmTmpDevice
aTmpDev
((
OutputDevice
&
)
rDev
,
true
);
SmTmpDevice
aTmpDev
((
OutputDevice
&
)
rDev
,
true
);
aTmpDev
.
SetFont
(
GetFont
());
const
OUString
&
rText
=
GetText
();
...
...
@@ -3129,7 +3050,7 @@ void SmBlankNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell)
void
SmBlankNode
::
Arrange
(
const
OutputDevice
&
rDev
,
const
SmFormat
&
rFormat
)
{
SmTmpDevice
aTmpDev
((
OutputDevice
&
)
rDev
,
true
);
SmTmpDevice
aTmpDev
((
OutputDevice
&
)
rDev
,
true
);
aTmpDev
.
SetFont
(
GetFont
());
// make distance depend on the font height
...
...
starmath/source/tmpdevice.cxx
0 → 100644
Dosyayı görüntüle @
88718a87
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "smmod.hxx"
#include "tmpdevice.hxx"
// SmTmpDevice
// Allows for font and color changes. The original settings will be restored
// in the destructor.
// It's main purpose is to allow for the "const" in the 'OutputDevice'
// argument in the 'Arrange' functions and restore changes made in the 'Draw'
// functions.
// Usually a MapMode of 1/100th mm will be used.
SmTmpDevice
::
SmTmpDevice
(
OutputDevice
&
rTheDev
,
bool
bUseMap100th_mm
)
:
rOutDev
(
rTheDev
)
{
rOutDev
.
Push
(
PUSH_FONT
|
PUSH_MAPMODE
|
PUSH_LINECOLOR
|
PUSH_FILLCOLOR
|
PUSH_TEXTCOLOR
);
if
(
bUseMap100th_mm
&&
MAP_100TH_MM
!=
rOutDev
.
GetMapMode
().
GetMapUnit
())
{
SAL_WARN
(
"starmath"
,
"incorrect MapMode?"
);
rOutDev
.
SetMapMode
(
MAP_100TH_MM
);
//format for 100% always
}
}
Color
SmTmpDevice
::
Impl_GetColor
(
const
Color
&
rColor
)
{
ColorData
nNewCol
=
rColor
.
GetColor
();
if
(
COL_AUTO
==
nNewCol
)
{
if
(
OUTDEV_PRINTER
==
rOutDev
.
GetOutDevType
())
nNewCol
=
COL_BLACK
;
else
{
Color
aBgCol
(
rOutDev
.
GetBackground
().
GetColor
()
);
if
(
OUTDEV_WINDOW
==
rOutDev
.
GetOutDevType
())
aBgCol
=
((
Window
&
)
rOutDev
).
GetDisplayBackground
().
GetColor
();
nNewCol
=
SM_MOD
()
->
GetColorConfig
().
GetColorValue
(
svtools
::
FONTCOLOR
).
nColor
;
Color
aTmpColor
(
nNewCol
);
if
(
aBgCol
.
IsDark
()
&&
aTmpColor
.
IsDark
())
nNewCol
=
COL_WHITE
;
else
if
(
aBgCol
.
IsBright
()
&&
aTmpColor
.
IsBright
())
nNewCol
=
COL_BLACK
;
}
}
return
Color
(
nNewCol
);
}
void
SmTmpDevice
::
SetFont
(
const
Font
&
rNewFont
)
{
rOutDev
.
SetFont
(
rNewFont
);
rOutDev
.
SetTextColor
(
Impl_GetColor
(
rNewFont
.
GetColor
()
)
);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
starmath/source/tmpdevice.hxx
0 → 100644
Dosyayı görüntüle @
88718a87
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef INCLUDED_STARMATH_SOURCE_TMPDEVICE_HXX
#define INCLUDED_STARMATH_SOURCE_TMPDEVICE_HXX
#include <boost/noncopyable.hpp>
#include <tools/color.hxx>
#include <vcl/lineinfo.hxx>
#include <vcl/outdev.hxx>
class
SmTmpDevice
:
private
boost
::
noncopyable
{
OutputDevice
&
rOutDev
;
Color
Impl_GetColor
(
const
Color
&
rColor
);
public
:
SmTmpDevice
(
OutputDevice
&
rTheDev
,
bool
bUseMap100th_mm
);
~
SmTmpDevice
()
{
rOutDev
.
Pop
();
}
void
SetFont
(
const
Font
&
rNewFont
);
void
SetLineColor
(
const
Color
&
rColor
)
{
rOutDev
.
SetLineColor
(
Impl_GetColor
(
rColor
)
);
}
void
SetFillColor
(
const
Color
&
rColor
)
{
rOutDev
.
SetFillColor
(
Impl_GetColor
(
rColor
)
);
}
operator
OutputDevice
&
()
{
return
rOutDev
;
}
};
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
starmath/source/visitors.cxx
Dosyayı görüntüle @
88718a87
...
...
@@ -6,7 +6,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include <tools/gen.hxx>
#include <vcl/lineinfo.hxx>
#include "visitors.hxx"
#include "tmpdevice.hxx"
#include "cursor.hxx"
// SmVisitorTest
...
...
@@ -456,78 +460,6 @@ void SmCaretPos2LineVisitor::DefaultVisit( SmNode* pNode )
line
=
SmCaretLine
(
p1
.
X
(
),
p1
.
Y
(
),
pNode
->
GetHeight
(
)
);
}
// Nasty temporary device!!!
#include <boost/noncopyable.hpp>
#include <tools/gen.hxx>
#include <tools/fract.hxx>
#include <rtl/math.hxx>
#include <tools/color.hxx>
#include <vcl/metric.hxx>
#include <vcl/lineinfo.hxx>
#include <vcl/outdev.hxx>
#include <sfx2/module.hxx>
#include "symbol.hxx"
#include "smmod.hxx"
class
SmTmpDevice2
:
private
boost
::
noncopyable
{
OutputDevice
&
rOutDev
;
Color
Impl_GetColor
(
const
Color
&
rColor
);
public
:
SmTmpDevice2
(
OutputDevice
&
rTheDev
,
bool
bUseMap100th_mm
);
~
SmTmpDevice2
(
)
{
rOutDev
.
Pop
(
);
}
void
SetFont
(
const
Font
&
rNewFont
);
void
SetLineColor
(
const
Color
&
rColor
)
{
rOutDev
.
SetLineColor
(
Impl_GetColor
(
rColor
)
);
}
void
SetFillColor
(
const
Color
&
rColor
)
{
rOutDev
.
SetFillColor
(
Impl_GetColor
(
rColor
)
);
}
};
SmTmpDevice2
::
SmTmpDevice2
(
OutputDevice
&
rTheDev
,
bool
bUseMap100th_mm
)
:
rOutDev
(
rTheDev
)
{
rOutDev
.
Push
(
PUSH_FONT
|
PUSH_MAPMODE
|
PUSH_LINECOLOR
|
PUSH_FILLCOLOR
|
PUSH_TEXTCOLOR
);
if
(
bUseMap100th_mm
&&
MAP_100TH_MM
!=
rOutDev
.
GetMapMode
(
).
GetMapUnit
(
)
)
{
SAL_WARN
(
"starmath"
,
"incorrect MapMode?"
);
rOutDev
.
SetMapMode
(
MAP_100TH_MM
);
//format for 100% always
}
}
Color
SmTmpDevice2
::
Impl_GetColor
(
const
Color
&
rColor
)
{
ColorData
nNewCol
=
rColor
.
GetColor
(
);
if
(
COL_AUTO
==
nNewCol
)
{
if
(
OUTDEV_PRINTER
==
rOutDev
.
GetOutDevType
(
)
)
nNewCol
=
COL_BLACK
;
else
{
Color
aBgCol
(
rOutDev
.
GetBackground
(
).
GetColor
(
)
);
if
(
OUTDEV_WINDOW
==
rOutDev
.
GetOutDevType
(
)
)
aBgCol
=
(
(
Window
&
)
rOutDev
).
GetDisplayBackground
(
).
GetColor
(
);
nNewCol
=
SM_MOD
(
)
->
GetColorConfig
(
).
GetColorValue
(
svtools
::
FONTCOLOR
).
nColor
;
Color
aTmpColor
(
nNewCol
);
if
(
aBgCol
.
IsDark
(
)
&&
aTmpColor
.
IsDark
(
)
)
nNewCol
=
COL_WHITE
;
else
if
(
aBgCol
.
IsBright
(
)
&&
aTmpColor
.
IsBright
(
)
)
nNewCol
=
COL_BLACK
;
}
}
return
Color
(
nNewCol
);
}
void
SmTmpDevice2
::
SetFont
(
const
Font
&
rNewFont
)
{
rOutDev
.
SetFont
(
rNewFont
);
rOutDev
.
SetTextColor
(
Impl_GetColor
(
rNewFont
.
GetColor
(
)
)
);
}
// SmDrawingVisitor
...
...
@@ -664,7 +596,7 @@ void SmDrawingVisitor::Visit( SmRootSymbolNode* pNode )
// draw root-sign itself
DrawSpecialNode
(
pNode
);
SmTmpDevice
2
aTmpDev
(
(
OutputDevice
&
)
rDev
,
true
);
SmTmpDevice
aTmpDev
(
(
OutputDevice
&
)
rDev
,
true
);
aTmpDev
.
SetFillColor
(
pNode
->
GetFont
(
).
GetColor
(
)
);
rDev
.
SetLineColor
(
);
aTmpDev
.
SetFont
(
pNode
->
GetFont
(
)
);
...
...
@@ -720,7 +652,7 @@ void SmDrawingVisitor::Visit( SmPolyLineNode* pNode )
aPos
(
Position
+
aOffset
);
pNode
->
GetPolygon
(
).
Move
(
aPos
.
X
(
),
aPos
.
Y
(
)
);
//Works because Polygon wraps a pointer
SmTmpDevice
2
aTmpDev
(
(
OutputDevice
&
)
rDev
,
false
);
SmTmpDevice
aTmpDev
(
(
OutputDevice
&
)
rDev
,
false
);
aTmpDev
.
SetLineColor
(
pNode
->
GetFont
(
).
GetColor
(
)
);
rDev
.
DrawPolyLine
(
pNode
->
GetPolygon
(
),
aInfo
);
...
...
@@ -731,7 +663,7 @@ void SmDrawingVisitor::Visit( SmRectangleNode* pNode )
if
(
pNode
->
IsPhantom
(
)
)
return
;
SmTmpDevice
2
aTmpDev
(
(
OutputDevice
&
)
rDev
,
false
);
SmTmpDevice
aTmpDev
(
(
OutputDevice
&
)
rDev
,
false
);
aTmpDev
.
SetFillColor
(
pNode
->
GetFont
(
).
GetColor
(
)
);
rDev
.
SetLineColor
(
);
aTmpDev
.
SetFont
(
pNode
->
GetFont
(
)
);
...
...
@@ -763,7 +695,7 @@ void SmDrawingVisitor::DrawTextNode( SmTextNode* pNode )
if
(
pNode
->
IsPhantom
()
||
pNode
->
GetText
().
isEmpty
()
||
pNode
->
GetText
()[
0
]
==
'\0'
)
return
;
SmTmpDevice
2
aTmpDev
(
(
OutputDevice
&
)
rDev
,
false
);
SmTmpDevice
aTmpDev
(
(
OutputDevice
&
)
rDev
,
false
);
aTmpDev
.
SetFont
(
pNode
->
GetFont
(
)
);
Point
aPos
(
Position
);
...
...
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