Kaydet (Commit) c3f9eb1c authored tarafından Radek Doulik's avatar Radek Doulik

make fontwork custom shapes as one path object created from polypolygon

  - which contains outlines of all characters instead of creating group
    of path objects
  - now the stretched bitmap fill works correctly - stretching over whole
    text instead of only 1st character
  - fixes part of n#759172

Change-Id: I65211e336aadb8909b5d4a3dcb3647f44be22595
üst 2af61dad
......@@ -788,9 +788,9 @@ void FitTextOutlinesToShapeOutlines( const PolyPolygon& aOutlines2d, FWData& rFW
SdrObject* CreateSdrObjectFromParagraphOutlines( const FWData& rFWData, const SdrObject* pCustomShape )
{
SdrObject* pRet = NULL;
basegfx::B2DPolyPolygon aPolyPoly;
if ( !rFWData.vTextAreas.empty() )
{
pRet = new SdrObjGroup();
std::vector< FWTextArea >::const_iterator aTextAreaIter = rFWData.vTextAreas.begin();
std::vector< FWTextArea >::const_iterator aTextAreaIEnd = rFWData.vTextAreas.end();
while ( aTextAreaIter != aTextAreaIEnd )
......@@ -807,8 +807,7 @@ SdrObject* CreateSdrObjectFromParagraphOutlines( const FWData& rFWData, const Sd
std::vector< PolyPolygon >::const_iterator aOutlineIEnd = aCharacterIter->vOutlines.end();
while( aOutlineIter != aOutlineIEnd )
{
SdrObject* pPathObj = new SdrPathObj( OBJ_POLY, aOutlineIter->getB2DPolyPolygon() );
((SdrObjGroup*)pRet)->GetSubList()->NbcInsertObject( pPathObj );
aPolyPoly.append( aOutlineIter->getB2DPolyPolygon() );
++aOutlineIter;
}
++aCharacterIter;
......@@ -818,6 +817,8 @@ SdrObject* CreateSdrObjectFromParagraphOutlines( const FWData& rFWData, const Sd
++aTextAreaIter;
}
pRet = new SdrPathObj( OBJ_POLY, aPolyPoly );
Point aP( pCustomShape->GetSnapRect().Center() );
Size aS( pCustomShape->GetLogicRect().GetSize() );
aP.X() -= aS.Width() / 2;
......
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