summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Behrens <thb@openoffice.org>2002-10-31 11:57:17 +0000
committerThorsten Behrens <thb@openoffice.org>2002-10-31 11:57:17 +0000
commita593482702ef355a535c30755d4778694a1da53a (patch)
tree5aba02308e5d4258dccb0f4f27c6425e81a439b7
parentadda4efa425ed9e774eab0f581f4d049043543b6 (diff)
#103692# Passing shadow attributes to the rendering methods
-rw-r--r--svx/source/inc/charmapacc.hxx12
-rw-r--r--svx/source/inc/svdoimp.hxx6
-rw-r--r--svx/source/svdraw/svdoattr.cxx71
-rw-r--r--svx/source/svdraw/svdobj.cxx167
-rw-r--r--svx/source/svdraw/svdocirc.cxx34
-rw-r--r--svx/source/svdraw/svdoedge.cxx11
-rw-r--r--svx/source/svdraw/svdopath.cxx31
-rw-r--r--svx/source/svdraw/svdorect.cxx28
8 files changed, 187 insertions, 173 deletions
diff --git a/svx/source/inc/charmapacc.hxx b/svx/source/inc/charmapacc.hxx
index 3aeb6356d2d5..4cef7360b95c 100644
--- a/svx/source/inc/charmapacc.hxx
+++ b/svx/source/inc/charmapacc.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: charmapacc.hxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: oj $ $Date: 2002-10-29 15:00:12 $
+ * last change: $Author: thb $ $Date: 2002-10-31 12:57:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -132,8 +132,8 @@ namespace svx
virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet( ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (::com::sun::star::uno::RuntimeException) { return this; }
- virtual sal_Int32 SAL_CALL getForeground( ) throw (::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getBackground( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getForeground( ) throw (::com::sun::star::uno::RuntimeException) { return 0; }
+ virtual sal_Int32 SAL_CALL getBackground( ) throw (::com::sun::star::uno::RuntimeException) { return 0; }
// call the fireEvent method from the table when it exists.
@@ -213,8 +213,8 @@ namespace svx
virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet( ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (::com::sun::star::uno::RuntimeException) { return this; }
- virtual sal_Int32 SAL_CALL getForeground( ) throw (::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getBackground( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getForeground( ) throw (::com::sun::star::uno::RuntimeException) { return 0; }
+ virtual sal_Int32 SAL_CALL getBackground( ) throw (::com::sun::star::uno::RuntimeException) { return 0; }
// XAccessibleTable
virtual sal_Int32 SAL_CALL getAccessibleRowCount( ) throw (::com::sun::star::uno::RuntimeException);
diff --git a/svx/source/inc/svdoimp.hxx b/svx/source/inc/svdoimp.hxx
index 8f8aedf2bd28..213c201cc811 100644
--- a/svx/source/inc/svdoimp.hxx
+++ b/svx/source/inc/svdoimp.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: svdoimp.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: thb $ $Date: 2002-09-10 08:12:44 $
+ * last change: $Author: thb $ $Date: 2002-10-31 12:57:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -124,7 +124,7 @@ class SfxItemSet;
class ImpGraphicFill
{
public:
- ImpGraphicFill( const SdrObject& rObj, const ExtOutputDevice& rXOut );
+ ImpGraphicFill( const SdrObject& rObj, const ExtOutputDevice& rXOut, const SfxItemSet& rFillItemSet, bool bIsShadow=false );
~ImpGraphicFill();
private:
diff --git a/svx/source/svdraw/svdoattr.cxx b/svx/source/svdraw/svdoattr.cxx
index a70e7b18f4e7..f6e1916d3c10 100644
--- a/svx/source/svdraw/svdoattr.cxx
+++ b/svx/source/svdraw/svdoattr.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: svdoattr.cxx,v $
*
- * $Revision: 1.36 $
+ * $Revision: 1.37 $
*
- * last change: $Author: cl $ $Date: 2002-04-25 09:58:13 $
+ * last change: $Author: thb $ $Date: 2002-10-31 12:52:36 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1218,9 +1218,8 @@ void SdrAttrObj::ImpAddShadowToBoundRect()
}
}
-FASTBOOL SdrAttrObj::ImpSetShadowAttributes(ExtOutputDevice& rXOut, FASTBOOL bNoFill) const
+FASTBOOL SdrAttrObj::ImpSetShadowAttributes( const SfxItemSet& rSet, SfxItemSet& rShadowSet ) const
{
- const SfxItemSet& rSet = GetItemSet();
BOOL bShadOn=((SdrShadowItem&)(rSet.Get(SDRATTR_SHADOW))).GetValue();
if(bShadOn)
@@ -1234,45 +1233,45 @@ FASTBOOL SdrAttrObj::ImpSetShadowAttributes(ExtOutputDevice& rXOut, FASTBOOL bNo
// aL.GetItemSet().Put(XLineTransparenceItem(nTransp));
// rXOut.SetLineAttr(aL);
// }
- if(!bNoFill)
+
+// #103692# Caller must now handle noFill case
+// if(!bNoFill)
+// {
+
+ const SdrShadowColorItem& rShadColItem = ((const SdrShadowColorItem&)(rSet.Get(SDRATTR_SHADOWCOLOR)));
+ Color aShadCol(rShadColItem.GetValue());
+ sal_uInt16 nTransp = ((const SdrShadowTransparenceItem&)(rSet.Get(SDRATTR_SHADOWTRANSPARENCE))).GetValue();
+ XFillStyle eStyle = ((const XFillStyleItem&)(rSet.Get(XATTR_FILLSTYLE))).GetValue();
+ BOOL bFillBackground = ((const XFillBackgroundItem&)(rSet.Get(XATTR_FILLBACKGROUND))).GetValue();
+
+ if(eStyle==XFILL_HATCH && !bFillBackground)
+ {
+ // #41666#
+ XHatch aHatch = ((XFillHatchItem&)(rSet.Get(XATTR_FILLHATCH))).GetValue();
+ aHatch.SetColor(aShadCol);
+ rShadowSet.Put(XFillHatchItem(String(), aHatch));
+ }
+ else
{
- const SdrShadowColorItem& rShadColItem = ((const SdrShadowColorItem&)(rSet.Get(SDRATTR_SHADOWCOLOR)));
- Color aShadCol(rShadColItem.GetValue());
- sal_uInt16 nTransp = ((const SdrShadowTransparenceItem&)(rSet.Get(SDRATTR_SHADOWTRANSPARENCE))).GetValue();
- XFillStyle eStyle = ((const XFillStyleItem&)(rSet.Get(XATTR_FILLSTYLE))).GetValue();
- BOOL bFillBackground = ((const XFillBackgroundItem&)(rSet.Get(XATTR_FILLBACKGROUND))).GetValue();
- SfxItemSet aSet(rSet);
-
- if(eStyle==XFILL_HATCH && !bFillBackground)
+ if(eStyle != XFILL_NONE && eStyle != XFILL_SOLID)
{
- // #41666#
- XHatch aHatch = ((XFillHatchItem&)(rSet.Get(XATTR_FILLHATCH))).GetValue();
- aHatch.SetColor(aShadCol);
- aSet.Put(XFillHatchItem(String(), aHatch));
+ // also fuer Gradient und Bitmap
+ rShadowSet.Put(XFillStyleItem(XFILL_SOLID));
}
- else
- {
- if(eStyle != XFILL_NONE && eStyle != XFILL_SOLID)
- {
- // also fuer Gradient und Bitmap
- aSet.Put(XFillStyleItem(XFILL_SOLID));
- }
- aSet.Put(XFillColorItem(String(),aShadCol));
+ rShadowSet.Put(XFillColorItem(String(),aShadCol));
- // #92183# set XFillTransparenceItem only when no FloatTransparence is used,
- // else the OutDev will use the wrong method
- if(nTransp)
- {
- const XFillFloatTransparenceItem& rFillFloatTransparence =
- (const XFillFloatTransparenceItem&)rSet.Get(XATTR_FILLFLOATTRANSPARENCE);
- if(!rFillFloatTransparence.IsEnabled())
- aSet.Put(XFillTransparenceItem(nTransp));
- }
+ // #92183# set XFillTransparenceItem only when no FloatTransparence is used,
+ // else the OutDev will use the wrong method
+ if(nTransp)
+ {
+ const XFillFloatTransparenceItem& rFillFloatTransparence =
+ (const XFillFloatTransparenceItem&)rSet.Get(XATTR_FILLFLOATTRANSPARENCE);
+ if(!rFillFloatTransparence.IsEnabled())
+ rShadowSet.Put(XFillTransparenceItem(nTransp));
}
-
- rXOut.SetFillAttr(aSet);
}
+
return TRUE;
}
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index d6e3b8dd3579..e26a703d7166 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: svdobj.cxx,v $
*
- * $Revision: 1.47 $
+ * $Revision: 1.48 $
*
- * last change: $Author: aw $ $Date: 2002-10-30 14:52:52 $
+ * last change: $Author: thb $ $Date: 2002-10-31 12:52:36 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -349,15 +349,21 @@ SdrObjPlusData* SdrObjPlusData::Clone(SdrObject* pObj1) const
///////////////////////////////////////////////////////////////////////////////
// #100127# Bracket filled output with a comment, if recording a Mtf
-ImpGraphicFill::ImpGraphicFill( const SdrObject& rObj, const ExtOutputDevice& rXOut ) :
+ImpGraphicFill::ImpGraphicFill( const SdrObject& rObj,
+ const ExtOutputDevice& rXOut,
+ const SfxItemSet& rFillItemSet,
+ bool bIsShadow ) :
mrObj( rObj ),
mrXOut( rXOut ),
mbCommentWritten( false )
{
const SfxItemSet& rSet = rObj.GetItemSet();
- XFillStyle eFillStyle( ITEMVALUE( rSet, XATTR_FILLSTYLE, XFillStyleItem ) );
- XGradient aGradient( ITEMVALUE( rSet, XATTR_FILLGRADIENT, XFillGradientItem ) );
- XHatch aHatch( ITEMVALUE( rSet, XATTR_FILLHATCH, XFillHatchItem ) );
+ XFillStyle eFillStyle( ITEMVALUE( rFillItemSet, XATTR_FILLSTYLE, XFillStyleItem ) );
+ XGradient aGradient( ITEMVALUE( rFillItemSet, XATTR_FILLGRADIENT, XFillGradientItem ) );
+ XHatch aHatch( ITEMVALUE( rFillItemSet, XATTR_FILLHATCH, XFillHatchItem ) );
+
+ sal_Int32 nDX( ((SdrShadowXDistItem&)(rSet.Get(SDRATTR_SHADOWXDIST))).GetValue() );
+ sal_Int32 nDY( ((SdrShadowYDistItem&)(rSet.Get(SDRATTR_SHADOWYDIST))).GetValue() );
GDIMetaFile* pMtf=NULL;
if( eFillStyle != XFILL_NONE &&
@@ -366,6 +372,13 @@ ImpGraphicFill::ImpGraphicFill( const SdrObject& rObj, const ExtOutputDevice& rX
XPolyPolygon aPolyPoly;
mrObj.TakeXorPoly(aPolyPoly, TRUE);
+ // #103692# Offset original geometry for shadows
+ if( bIsShadow && (nDX || nDY) )
+ {
+ // transformation necessary
+ aPolyPoly.Move( nDX, nDY );
+ }
+
SvtGraphicFill::FillType eType;
switch( eFillStyle )
{
@@ -438,18 +451,18 @@ ImpGraphicFill::ImpGraphicFill( const SdrObject& rObj, const ExtOutputDevice& rX
}
SvtGraphicFill aFill( XOutCreatePolyPolygonBezier( aPolyPoly, rXOut.GetOutDev() ),
- ITEMVALUE( rSet, XATTR_FILLCOLOR, XFillColorItem ),
- ITEMVALUE( rSet, XATTR_FILLTRANSPARENCE, XFillTransparenceItem ) / 100.0,
+ ITEMVALUE( rFillItemSet, XATTR_FILLCOLOR, XFillColorItem ),
+ ITEMVALUE( rFillItemSet, XATTR_FILLTRANSPARENCE, XFillTransparenceItem ) / 100.0,
SvtGraphicFill::fillEvenOdd,
eType,
SvtGraphicFill::Transform(), // TODO
- eType == SvtGraphicFill::fillTexture ? ITEMVALUE( rSet, XATTR_FILLBMP_TILE, SfxBoolItem ) : false,
+ eType == SvtGraphicFill::fillTexture ? ITEMVALUE( rFillItemSet, XATTR_FILLBMP_TILE, SfxBoolItem ) : false,
eHatch,
aHatch.GetColor(),
eGrad,
aGradient.GetStartColor(),
aGradient.GetEndColor(),
- ITEMVALUE( rSet, XATTR_FILLBITMAP, XFillBitmapItem ).GetBitmap() );
+ ITEMVALUE( rFillItemSet, XATTR_FILLBITMAP, XFillBitmapItem ).GetBitmap() );
#ifdef DBG_UTIL
::rtl::OString aStr( aFill.toString() );
@@ -2191,35 +2204,14 @@ void PolyPolygon3D_BuildSkeletonsAndGrow(const PolyPolygon3D& rPolyPoly)
void SdrObject::ImpDrawShadowLineGeometry(
ExtOutputDevice& rXOut, const SfxItemSet& rSet, SdrLineGeometry& rLineGeometry) const
{
- sal_uInt32 nXDist = ((SdrShadowXDistItem&)(rSet.Get(SDRATTR_SHADOWXDIST))).GetValue();
- sal_uInt32 nYDist = ((SdrShadowYDistItem&)(rSet.Get(SDRATTR_SHADOWYDIST))).GetValue();
+ sal_Int32 nXDist = ((SdrShadowXDistItem&)(rSet.Get(SDRATTR_SHADOWXDIST))).GetValue();
+ sal_Int32 nYDist = ((SdrShadowYDistItem&)(rSet.Get(SDRATTR_SHADOWYDIST))).GetValue();
const SdrShadowColorItem& rShadColItem = ((SdrShadowColorItem&)(rSet.Get(SDRATTR_SHADOWCOLOR)));
Color aColor(rShadColItem.GetValue());
sal_uInt16 nTrans = ((SdrShadowTransparenceItem&)(rSet.Get(SDRATTR_SHADOWTRANSPARENCE))).GetValue();
- if(nXDist || nYDist)
- {
- // transformation necessary
- PolyPolygon3D aRememberPolyPoly = rLineGeometry.GetPolyPoly3D();
- PolyPolygon3D aRememberLinePoly = rLineGeometry.GetLinePoly3D();
- Matrix4D aTrans;
-
- aTrans.Translate((double)nXDist, -(double)nYDist, 0.0);
- rLineGeometry.GetPolyPoly3D().Transform(aTrans);
- rLineGeometry.GetLinePoly3D().Transform(aTrans);
-
- // draw the line geometry
- ImpDrawLineGeometry(rXOut, aColor, nTrans, rLineGeometry);
-
- // reset line geometry to old values
- rLineGeometry.GetPolyPoly3D() = aRememberPolyPoly;
- rLineGeometry.GetLinePoly3D() = aRememberLinePoly;
- }
- else
- {
- // draw shadow line geometry
- ImpDrawLineGeometry(rXOut, aColor, nTrans, rLineGeometry);
- }
+ // draw shadow line geometry
+ ImpDrawLineGeometry(rXOut, aColor, nTrans, rLineGeometry, nXDist, nYDist);
}
void SdrObject::ImpDrawColorLineGeometry(
@@ -2232,11 +2224,12 @@ void SdrObject::ImpDrawColorLineGeometry(
ImpDrawLineGeometry(rXOut, aColor, nTrans, rLineGeometry);
}
-void SdrObject::ImpDrawLineGeometry(
- ExtOutputDevice& rXOut,
- Color& rColor,
- sal_uInt16 nTransparence,
- SdrLineGeometry& rLineGeometry) const
+void SdrObject::ImpDrawLineGeometry( ExtOutputDevice& rXOut,
+ Color& rColor,
+ sal_uInt16 nTransparence,
+ SdrLineGeometry& rLineGeometry,
+ sal_Int32 nDX,
+ sal_Int32 nDY ) const
{
Color aLineColor( rColor );
@@ -2255,6 +2248,21 @@ void SdrObject::ImpDrawLineGeometry(
rXOut.GetOutDev()->SetDrawMode( nOldDrawMode & (~DRAWMODE_SETTINGSFILL) );
}
+ // #103692# Hold local copy of geometry
+ PolyPolygon3D aPolyPoly = rLineGeometry.GetPolyPoly3D();
+ PolyPolygon3D aLinePoly = rLineGeometry.GetLinePoly3D();
+
+ // #103692# Offset geometry (extracted from SdrObject::ImpDrawShadowLineGeometry)
+ if( nDX || nDY )
+ {
+ // transformation necessary
+ Matrix4D aTrans;
+
+ aTrans.Translate((double)nDX, -(double)nDY, 0.0);
+ aPolyPoly.Transform(aTrans);
+ aLinePoly.Transform(aTrans);
+ }
+
// #100127# Bracket output with a comment, if recording a Mtf
GDIMetaFile* pMtf=NULL;
bool bMtfCommentWritten( false );
@@ -2263,6 +2271,13 @@ void SdrObject::ImpDrawLineGeometry(
XPolyPolygon aPolyPoly;
TakeXorPoly(aPolyPoly, TRUE);
+ // #103692# Offset original geometry, too
+ if( nDX || nDY )
+ {
+ // transformation necessary
+ aPolyPoly.Move( nDX, nDY );
+ }
+
// for geometries with more than one polygon, dashing, arrows
// etc. become ambiguous (e.g. measure objects have no arrows
// on the end line), thus refrain from writing the comment
@@ -2366,10 +2381,10 @@ void SdrObject::ImpDrawLineGeometry(
aGradient.SetSteps(3);
// get bounds of geometry
- if(rLineGeometry.GetPolyPoly3D().Count())
- aVolume.Union(rLineGeometry.GetPolyPoly3D().GetPolySize());
- if(rLineGeometry.GetLinePoly3D().Count())
- aVolume.Union(rLineGeometry.GetLinePoly3D().GetPolySize());
+ if(aPolyPoly.Count())
+ aVolume.Union(aPolyPoly.GetPolySize());
+ if(aLinePoly.Count())
+ aVolume.Union(aLinePoly.GetPolySize());
// get pixel size in logic coor for 1,2 pixel cases
Size aSizeSinglePixel(1, 1);
@@ -2410,44 +2425,44 @@ void SdrObject::ImpDrawLineGeometry(
aVDev.SetRefPoint(rXOut.GetOutDev()->GetRefPoint());
// create output
- if(rLineGeometry.GetPolyPoly3D().Count())
+ if(aPolyPoly.Count())
{
- PolyPolygon aPolyPoly = rLineGeometry.GetPolyPoly3D().GetPolyPolygon();
+ PolyPolygon aVCLPolyPoly = aPolyPoly.GetPolyPolygon();
- for(UINT16 a=0;a<aPolyPoly.Count();a++)
- aMetaFile.AddAction(new MetaPolygonAction(aPolyPoly[a]));
+ for(UINT16 a=0;a<aVCLPolyPoly.Count();a++)
+ aMetaFile.AddAction(new MetaPolygonAction(aVCLPolyPoly[a]));
}
- if(rLineGeometry.GetLinePoly3D().Count())
+ if(aLinePoly.Count())
{
- PolyPolygon aLinePoly = rLineGeometry.GetLinePoly3D().GetPolyPolygon();
+ PolyPolygon aVCLLinePoly = aLinePoly.GetPolyPolygon();
if(rLineGeometry.DoForceTwoPixel())
{
UINT16 a;
- for(a=0;a<aLinePoly.Count();a++)
- aMetaFile.AddAction(new MetaPolyLineAction(aLinePoly[a]));
+ for(a=0;a<aVCLLinePoly.Count();a++)
+ aMetaFile.AddAction(new MetaPolyLineAction(aVCLLinePoly[a]));
- aLinePoly.Move(aSizeSinglePixel.Width() - 1, 0);
+ aVCLLinePoly.Move(aSizeSinglePixel.Width() - 1, 0);
- for(a=0;a<aLinePoly.Count();a++)
- aMetaFile.AddAction(new MetaPolyLineAction(aLinePoly[a]));
+ for(a=0;a<aVCLLinePoly.Count();a++)
+ aMetaFile.AddAction(new MetaPolyLineAction(aVCLLinePoly[a]));
- aLinePoly.Move(0, aSizeSinglePixel.Height() - 1);
+ aVCLLinePoly.Move(0, aSizeSinglePixel.Height() - 1);
- for(a=0;a<aLinePoly.Count();a++)
- aMetaFile.AddAction(new MetaPolyLineAction(aLinePoly[a]));
+ for(a=0;a<aVCLLinePoly.Count();a++)
+ aMetaFile.AddAction(new MetaPolyLineAction(aVCLLinePoly[a]));
- aLinePoly.Move(-aSizeSinglePixel.Width() - 1, 0);
+ aVCLLinePoly.Move(-aSizeSinglePixel.Width() - 1, 0);
- for(a=0;a<aLinePoly.Count();a++)
- aMetaFile.AddAction(new MetaPolyLineAction(aLinePoly[a]));
+ for(a=0;a<aVCLLinePoly.Count();a++)
+ aMetaFile.AddAction(new MetaPolyLineAction(aVCLLinePoly[a]));
}
else
{
- for(UINT16 a=0;a<aLinePoly.Count();a++)
- aMetaFile.AddAction(new MetaPolyLineAction(aLinePoly[a]));
+ for(UINT16 a=0;a<aVCLLinePoly.Count();a++)
+ aMetaFile.AddAction(new MetaPolyLineAction(aVCLLinePoly[a]));
}
}
@@ -2463,56 +2478,56 @@ void SdrObject::ImpDrawLineGeometry(
else
{
// no transparence, simple output
- if(rLineGeometry.GetPolyPoly3D().Count())
+ if(aPolyPoly.Count())
{
- PolyPolygon aPolyPoly = rLineGeometry.GetPolyPoly3D().GetPolyPolygon();
+ PolyPolygon aVCLPolyPoly = aPolyPoly.GetPolyPolygon();
rXOut.GetOutDev()->SetLineColor();
rXOut.GetOutDev()->SetFillColor(aLineColor);
- for(UINT16 a=0;a<aPolyPoly.Count();a++)
- rXOut.GetOutDev()->DrawPolygon(aPolyPoly[a]);
+ for(UINT16 a=0;a<aVCLPolyPoly.Count();a++)
+ rXOut.GetOutDev()->DrawPolygon(aVCLPolyPoly[a]);
}
- if(rLineGeometry.GetLinePoly3D().Count())
+ if(aLinePoly.Count())
{
- PolyPolygon aLinePoly = rLineGeometry.GetLinePoly3D().GetPolyPolygon();
+ PolyPolygon aVCLLinePoly = aLinePoly.GetPolyPolygon();
rXOut.GetOutDev()->SetLineColor(aLineColor);
rXOut.GetOutDev()->SetFillColor();
if(rLineGeometry.DoForceTwoPixel())
{
- PolyPolygon aPolyPolyPixel( rXOut.GetOutDev()->LogicToPixel(aLinePoly) );
+ PolyPolygon aPolyPolyPixel( rXOut.GetOutDev()->LogicToPixel(aVCLLinePoly) );
BOOL bWasEnabled = rXOut.GetOutDev()->IsMapModeEnabled();
rXOut.GetOutDev()->EnableMapMode(FALSE);
UINT16 a;
- for(a=0;a<aLinePoly.Count();a++)
+ for(a=0;a<aVCLLinePoly.Count();a++)
rXOut.GetOutDev()->DrawPolyLine(aPolyPolyPixel[a]);
aPolyPolyPixel.Move(1,0);
- for(a=0;a<aLinePoly.Count();a++)
+ for(a=0;a<aVCLLinePoly.Count();a++)
rXOut.GetOutDev()->DrawPolyLine(aPolyPolyPixel[a]);
aPolyPolyPixel.Move(0,1);
- for(a=0;a<aLinePoly.Count();a++)
+ for(a=0;a<aVCLLinePoly.Count();a++)
rXOut.GetOutDev()->DrawPolyLine(aPolyPolyPixel[a]);
aPolyPolyPixel.Move(-1,0);
- for(a=0;a<aLinePoly.Count();a++)
+ for(a=0;a<aVCLLinePoly.Count();a++)
rXOut.GetOutDev()->DrawPolyLine(aPolyPolyPixel[a]);
rXOut.GetOutDev()->EnableMapMode(bWasEnabled);
}
else
{
- for( UINT16 a = 0; a < aLinePoly.Count(); a++ )
+ for( UINT16 a = 0; a < aVCLLinePoly.Count(); a++ )
{
- const Polygon& rPoly = aLinePoly[ a ];
+ const Polygon& rPoly = aVCLLinePoly[ a ];
BOOL bDrawn = FALSE;
if( rPoly.GetSize() == 2 )
diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx
index f69bb5d8d2cc..df272c48f30c 100644
--- a/svx/source/svdraw/svdocirc.cxx
+++ b/svx/source/svdraw/svdocirc.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: svdocirc.cxx,v $
*
- * $Revision: 1.19 $
+ * $Revision: 1.20 $
*
- * last change: $Author: thb $ $Date: 2002-09-24 16:25:35 $
+ * last change: $Author: thb $ $Date: 2002-10-31 12:52:37 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -354,12 +354,20 @@ FASTBOOL SdrCircObj::Paint(ExtOutputDevice& rXOut, const SdrPaintInfoRec& rInfoR
aEmptySet.Put(XLineStyleItem(XLINE_NONE));
aEmptySet.Put(XFillStyleItem(XFILL_NONE));
+ // #103692# prepare ItemSet for shadow fill attributes
+ SfxItemSet aShadowSet(rSet);
+
// prepare line geometry
::std::auto_ptr< SdrLineGeometry > pLineGeometry( ImpPrepareLineGeometry(rXOut, rSet, bIsLineDraft) );
// Shadows
- if(!bHideContour && ImpSetShadowAttributes(rXOut,eKind==OBJ_CARC || bIsFillDraft))
+ if(!bHideContour && ImpSetShadowAttributes(rSet, aShadowSet))
{
+ if( eKind==OBJ_CARC || bIsFillDraft )
+ rXOut.SetFillAttr(aEmptySet);
+ else
+ rXOut.SetFillAttr(aShadowSet);
+
UINT32 nXDist=((SdrShadowXDistItem&)(rSet.Get(SDRATTR_SHADOWXDIST))).GetValue();
UINT32 nYDist=((SdrShadowYDistItem&)(rSet.Get(SDRATTR_SHADOWYDIST))).GetValue();
@@ -374,13 +382,13 @@ FASTBOOL SdrCircObj::Paint(ExtOutputDevice& rXOut, const SdrPaintInfoRec& rInfoR
aX.Move(nXDist,nYDist);
// #100127# Output original geometry for metafiles
- ImpGraphicFill aFill( *this, rXOut );
+ ImpGraphicFill aFill( *this, rXOut, aShadowSet, true );
rXOut.DrawXPolygon(aX);
}
} else {
// #100127# Output original geometry for metafiles
- ImpGraphicFill aFill( *this, rXOut );
+ ImpGraphicFill aFill( *this, rXOut, aShadowSet, true );
Rectangle aR(aRect);
aR.Move(nXDist,nYDist);
@@ -413,17 +421,7 @@ FASTBOOL SdrCircObj::Paint(ExtOutputDevice& rXOut, const SdrPaintInfoRec& rInfoR
// Before here the LineAttr were set: if(pLineAttr) rXOut.SetLineAttr(*pLineAttr);
rXOut.SetLineAttr(aEmptySet);
- if(bIsFillDraft)
- {
- // perepare ItemSet to avoid XOut filling
- XFillAttrSetItem aXFSet(rSet.GetPool());
- aXFSet.GetItemSet().Put(XFillStyleItem(XFILL_NONE));
- rXOut.SetFillAttr(aEmptySet);
- }
- else
- {
- rXOut.SetFillAttr(rSet);
- }
+ rXOut.SetFillAttr( bIsFillDraft ? aEmptySet : rSet );
if (!bHideContour) {
if (PaintNeedsXPoly())
@@ -433,13 +431,13 @@ FASTBOOL SdrCircObj::Paint(ExtOutputDevice& rXOut, const SdrPaintInfoRec& rInfoR
const XPolygon& rXP=GetXPoly(); // In dieser Reihenfolge, damit bXPolyIsLine gueltig ist.
// #100127# Output original geometry for metafiles
- ImpGraphicFill aFill( *this, rXOut );
+ ImpGraphicFill aFill( *this, rXOut, bIsFillDraft ? aEmptySet : rSet );
rXOut.DrawXPolygon(rXP);
}
} else {
// #100127# Output original geometry for metafiles
- ImpGraphicFill aFill( *this, rXOut );
+ ImpGraphicFill aFill( *this, rXOut, bIsFillDraft ? aEmptySet : rSet );
if (eKind==OBJ_CIRC) {
rXOut.DrawEllipse(aRect);
diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx
index 242557d1cbdb..0509819206b7 100644
--- a/svx/source/svdraw/svdoedge.cxx
+++ b/svx/source/svdraw/svdoedge.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: svdoedge.cxx,v $
*
- * $Revision: 1.22 $
+ * $Revision: 1.23 $
*
- * last change: $Author: cl $ $Date: 2002-10-11 12:46:05 $
+ * last change: $Author: thb $ $Date: 2002-10-31 12:52:38 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -601,12 +601,17 @@ FASTBOOL SdrEdgeObj::Paint(ExtOutputDevice& rXOut, const SdrPaintInfoRec& rInfoR
aEmptySet.Put(XLineStyleItem(XLINE_NONE));
aEmptySet.Put(XFillStyleItem(XFILL_NONE));
+ // #103692# prepare ItemSet for shadow fill attributes
+ SfxItemSet aShadowSet(rSet);
+
// prepare line geometry
::std::auto_ptr< SdrLineGeometry > pLineGeometry( ImpPrepareLineGeometry(rXOut, rSet, bIsLineDraft) );
// Shadows
- if(!bHideContour && ImpSetShadowAttributes(rXOut,TRUE))
+ if(!bHideContour && ImpSetShadowAttributes(rSet, aShadowSet))
{
+ rXOut.SetFillAttr(aEmptySet);
+
UINT32 nXDist=((SdrShadowXDistItem&)(rSet.Get(SDRATTR_SHADOWXDIST))).GetValue();
UINT32 nYDist=((SdrShadowYDistItem&)(rSet.Get(SDRATTR_SHADOWYDIST))).GetValue();
XPolygon aXP(*pEdgeTrack);
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx
index 05dcd4202d98..9bd0287b4bd4 100644
--- a/svx/source/svdraw/svdopath.cxx
+++ b/svx/source/svdraw/svdopath.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: svdopath.cxx,v $
*
- * $Revision: 1.20 $
+ * $Revision: 1.21 $
*
- * last change: $Author: aw $ $Date: 2002-10-22 13:41:25 $
+ * last change: $Author: thb $ $Date: 2002-10-31 12:52:39 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -331,12 +331,20 @@ FASTBOOL SdrPathObj::Paint(ExtOutputDevice& rXOut, const SdrPaintInfoRec& rInfoR
aEmptySet.Put(XLineStyleItem(XLINE_NONE));
aEmptySet.Put(XFillStyleItem(XFILL_NONE));
+ // #103692# prepare ItemSet for shadow fill attributes
+ SfxItemSet aShadowSet(rSet);
+
// prepare line geometry
::std::auto_ptr< SdrLineGeometry > pLineGeometry( ImpPrepareLineGeometry(rXOut, rSet, bIsLineDraft) );
// Shadows
- if (!bHideContour && ImpSetShadowAttributes(rXOut,!IsClosed() || bIsFillDraft))
+ if (!bHideContour && ImpSetShadowAttributes(rSet, aShadowSet))
{
+ if( !IsClosed() || bIsFillDraft )
+ rXOut.SetFillAttr(aEmptySet);
+ else
+ rXOut.SetFillAttr(aShadowSet);
+
UINT32 nXDist=((SdrShadowXDistItem&)(rSet.Get(SDRATTR_SHADOWXDIST))).GetValue();
UINT32 nYDist=((SdrShadowYDistItem&)(rSet.Get(SDRATTR_SHADOWYDIST))).GetValue();
XPolyPolygon aTmpXPoly(aPathPolygon);
@@ -352,7 +360,7 @@ FASTBOOL SdrPathObj::Paint(ExtOutputDevice& rXOut, const SdrPaintInfoRec& rInfoR
}
} else {
// #100127# Output original geometry for metafiles
- ImpGraphicFill aFill( *this, rXOut );
+ ImpGraphicFill aFill( *this, rXOut, aShadowSet, true );
rXOut.DrawXPolyPolygon(aTmpXPoly);
}
@@ -369,25 +377,14 @@ FASTBOOL SdrPathObj::Paint(ExtOutputDevice& rXOut, const SdrPaintInfoRec& rInfoR
// avoid line drawing in XOut
rXOut.SetLineAttr(aEmptySet);
- if(bIsFillDraft)
- {
- // perepare ItemSet to avoid XOut filling
- rXOut.SetFillAttr(aEmptySet);
- }
- else
- {
- if(IsClosed() || bHideContour)
- {
- rXOut.SetFillAttr(rSet);
- }
- }
+ rXOut.SetFillAttr( bIsFillDraft || !IsClosed() ? aEmptySet : rSet );
if( !bHideContour )
{
if( IsClosed() )
{
// #100127# Output original geometry for metafiles
- ImpGraphicFill aFill( *this, rXOut );
+ ImpGraphicFill aFill( *this, rXOut, bIsFillDraft || !IsClosed() ? aEmptySet : rSet );
rXOut.DrawXPolyPolygon(aPathPolygon);
}
diff --git a/svx/source/svdraw/svdorect.cxx b/svx/source/svdraw/svdorect.cxx
index 7ccbea468151..5d9fa7071409 100644
--- a/svx/source/svdraw/svdorect.cxx
+++ b/svx/source/svdraw/svdorect.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: svdorect.cxx,v $
*
- * $Revision: 1.13 $
+ * $Revision: 1.14 $
*
- * last change: $Author: thb $ $Date: 2002-09-10 08:13:02 $
+ * last change: $Author: thb $ $Date: 2002-10-31 12:52:41 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -332,12 +332,20 @@ FASTBOOL SdrRectObj::Paint(ExtOutputDevice& rXOut, const SdrPaintInfoRec& rInfoR
aEmptySet.Put(XLineStyleItem(XLINE_NONE));
aEmptySet.Put(XFillStyleItem(XFILL_NONE));
+ // #103692# prepare ItemSet for shadow fill attributes
+ SfxItemSet aShadowSet(rSet);
+
// prepare line geometry
::std::auto_ptr< SdrLineGeometry > pLineGeometry( ImpPrepareLineGeometry(rXOut, rSet, bIsLineDraft) );
// Shadows
- if (!bHideContour && ImpSetShadowAttributes(rXOut,bIsFillDraft))
+ if (!bHideContour && ImpSetShadowAttributes(rSet, aShadowSet))
{
+ if( bIsFillDraft )
+ rXOut.SetFillAttr(aEmptySet);
+ else
+ rXOut.SetFillAttr(aShadowSet);
+
UINT32 nXDist=((SdrShadowXDistItem&)(rSet.Get(SDRATTR_SHADOWXDIST))).GetValue();
UINT32 nYDist=((SdrShadowYDistItem&)(rSet.Get(SDRATTR_SHADOWYDIST))).GetValue();
@@ -346,7 +354,7 @@ FASTBOOL SdrRectObj::Paint(ExtOutputDevice& rXOut, const SdrPaintInfoRec& rInfoR
{
// #100127# Output original geometry for metafiles
- ImpGraphicFill aFill( *this, rXOut );
+ ImpGraphicFill aFill( *this, rXOut, aShadowSet, true );
if (PaintNeedsXPoly(nEckRad)) {
XPolygon aX(GetXPoly());
@@ -370,19 +378,11 @@ FASTBOOL SdrRectObj::Paint(ExtOutputDevice& rXOut, const SdrPaintInfoRec& rInfoR
// Before here the LineAttr were set: if(pLineAttr) rXOut.SetLineAttr(*pLineAttr);
rXOut.SetLineAttr(aEmptySet);
- if(bIsFillDraft)
- {
- // perepare ItemSet to avoid XOut filling
- rXOut.SetFillAttr(aEmptySet);
- }
- else
- {
- rXOut.SetFillAttr(rSet);
- }
+ rXOut.SetFillAttr( bIsFillDraft ? aEmptySet : rSet );
if (!bHideContour) {
// #100127# Output original geometry for metafiles
- ImpGraphicFill aFill( *this, rXOut );
+ ImpGraphicFill aFill( *this, rXOut, bIsFillDraft ? aEmptySet : rSet );
if (PaintNeedsXPoly(nEckRad)) {
rXOut.DrawXPolygon(GetXPoly());