Kaydet (Commit) 5dce602d authored tarafından Armin Le Grand's avatar Armin Le Grand Kaydeden (comit) Caolán McNamara

Resolves: #i123129# Corrected LineWidth for text comments in SW

(cherry picked from commit 7ed3f859)

Change-Id: Ife132b66a13208193d897e98cdaea17bce33c310
üst fe1cbda3
......@@ -45,7 +45,7 @@ private:
basegfx::BColor maColor;
// discrete line width
double mfLogicLineWidth;
double mfDiscreteLineWidth;
// bitfield
bool mbShadow : 1;
......@@ -61,7 +61,7 @@ public:
const basegfx::B2DPolygon& rLineTop,
AnchorState aAnchorState,
const basegfx::BColor& rColor,
double fLogicLineWidth,
double fDiscreteLineWidth,
bool bShadow,
bool bLineSolid )
: drawinglayer::primitive2d::DiscreteMetricDependentPrimitive2D(),
......@@ -70,7 +70,7 @@ public:
maLineTop(rLineTop),
maAnchorState(aAnchorState),
maColor(rColor),
mfLogicLineWidth(fLogicLineWidth),
mfDiscreteLineWidth(fDiscreteLineWidth),
mbShadow(bShadow),
mbLineSolid(bLineSolid)
{}
......@@ -81,7 +81,7 @@ public:
const basegfx::B2DPolygon& getLineTop() const { return maLineTop; }
AnchorState getAnchorState() const { return maAnchorState; }
const basegfx::BColor& getColor() const { return maColor; }
double getLogicLineWidth() const { return mfLogicLineWidth; }
double getDiscreteLineWidth() const { return mfDiscreteLineWidth; }
bool getShadow() const { return mbShadow; }
bool getLineSolid() const { return mbLineSolid; }
......@@ -108,14 +108,15 @@ drawinglayer::primitive2d::Primitive2DSequence AnchorPrimitive::create2DDecompos
drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, aTriangle);
}
// prepare view-independent LineWidth and color
const drawinglayer::attribute::LineAttribute aLineAttribute(
getColor(),
getDiscreteLineWidth() * getDiscreteUnit());
if ( AS_ALL == maAnchorState ||
AS_START == maAnchorState )
{
// create line start
const drawinglayer::attribute::LineAttribute aLineAttribute(
getColor(),
getLogicLineWidth() / (basegfx::fTools::equalZero(getDiscreteUnit()) ? 1.0 : getDiscreteUnit()));
if(getLineSolid())
{
const drawinglayer::primitive2d::Primitive2DReference aSolidLine(
......@@ -194,10 +195,6 @@ drawinglayer::primitive2d::Primitive2DSequence AnchorPrimitive::create2DDecompos
{
// LineTop has to be created, too, but uses no shadow, so add after
// the other parts are created
const drawinglayer::attribute::LineAttribute aLineAttribute(
getColor(),
getLogicLineWidth() / (basegfx::fTools::equalZero(getDiscreteUnit()) ? 1.0 : getDiscreteUnit()));
const drawinglayer::primitive2d::Primitive2DReference aLineTop(
new drawinglayer::primitive2d::PolygonStrokePrimitive2D(
getLineTop(),
......@@ -220,7 +217,7 @@ bool AnchorPrimitive::operator==( const drawinglayer::primitive2d::BasePrimitive
&& getLineTop() == rCompare.getLineTop()
&& getAnchorState() == rCompare.getAnchorState()
&& getColor() == rCompare.getColor()
&& getLogicLineWidth() == rCompare.getLogicLineWidth()
&& getDiscreteLineWidth() == rCompare.getDiscreteLineWidth()
&& getShadow() == rCompare.getShadow()
&& getLineSolid() == rCompare.getLineSolid());
}
......@@ -346,13 +343,14 @@ drawinglayer::primitive2d::Primitive2DSequence AnchorOverlayObject::createOverla
{
implEnsureGeometry();
static double aDiscreteLineWidth(1.6);
const drawinglayer::primitive2d::Primitive2DReference aReference(
new AnchorPrimitive( maTriangle,
maLine,
maLineTop,
GetAnchorState(),
getBaseColor().getBColor(),
ANCHORLINE_WIDTH * 15.0,
ANCHORLINE_WIDTH * aDiscreteLineWidth,
getShadowedEffect(),
getLineSolid()) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment