svdxcgv.cxx (bb18ee55) | svdxcgv.cxx (47a7c0c1) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 600 unchanged lines hidden (view full) --- 609 } 610 else 611 aMtf = aGraphic.GetGDIMetaFile(); 612 } 613 } 614 615 if( !aMtf.GetActionCount() ) 616 { | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 600 unchanged lines hidden (view full) --- 609 } 610 else 611 aMtf = aGraphic.GetGDIMetaFile(); 612 } 613 } 614 615 if( !aMtf.GetActionCount() ) 616 { |
617 VirtualDevice aOut; 618 Size aDummySize( 2, 2 ); | 617 VirtualDevice aOut; 618 const Size aDummySize(2, 2); |
619 | 619 |
620 aOut.SetOutputSizePixel( aDummySize ); 621 aOut.EnableOutput( sal_False ); 622 aOut.SetMapMode( aMap ); 623 | 620 aOut.SetOutputSizePixel(aDummySize); 621 aOut.EnableOutput(false); 622 aOut.SetMapMode(aMap); |
624 aMtf.Clear(); | 623 aMtf.Clear(); |
625 aMtf.Record( &aOut ); | 624 aMtf.Record(&aOut); |
626 | 625 |
627 // Replace offset given formally to DrawMarkedObj and used at XOutDev with relative 628 // MapMode (which was also used in XOutDev in that case). Goal is to paint the object 629 // as if TopLeft point is (0,0) 630 const Fraction aNeutralFraction(1, 1); 631 const MapMode aRelativeMapMode(MAP_RELATIVE, Point(-aBound.Left(), -aBound.Top()), aNeutralFraction, aNeutralFraction); 632 aOut.SetMapMode(aRelativeMapMode); 633 | |
634 DrawMarkedObj(aOut); 635 636 aMtf.Stop(); 637 aMtf.WindStart(); | 626 DrawMarkedObj(aOut); 627 628 aMtf.Stop(); 629 aMtf.WindStart(); |
638 aMtf.SetPrefMapMode( aMap ); | 630 631 // moving the result is more reliable then setting a relative MapMode at the VDev (used 632 // before), also see #i99268# in GetObjGraphic() below. Some draw actions at 633 // the OutDev are simply not handled correctly when a MapMode is set at the 634 // target devive, e.g. MetaFloatTransparentAction. Even the Move for this action 635 // was missing the manipulation of the embedded Metafile 636 aMtf.Move(-aBound.Left(), -aBound.Top()); |
639 | 637 |
638 aMtf.SetPrefMapMode( aMap ); 639 |
|
640 // removed PrefSize extension. It is principially wrong to set a reduced size at 641 // the created MetaFile. The mentioned errors occurr at output time since the integer 642 // MapModes from VCL lead to errors. It is now corrected in the VCLRenderer for 643 // primitives (and may later be done in breaking up a MetaFile to primitives) 644 aMtf.SetPrefSize(aBoundSize); 645 } 646 } 647 --- 65 unchanged lines hidden (view full) --- 713 aOut.SetMapMode( aMap ); 714 aMtf.Record( &aOut ); 715 pObj->SingleObjectPainter( aOut ); // #110094#-17 716 aMtf.Stop(); 717 aMtf.WindStart(); 718 719 // #i99268# replace the original offset from using XOutDev's SetOffset 720 // NOT (as tried with #i92760#) with another MapMode which gets recorded | 640 // removed PrefSize extension. It is principially wrong to set a reduced size at 641 // the created MetaFile. The mentioned errors occurr at output time since the integer 642 // MapModes from VCL lead to errors. It is now corrected in the VCLRenderer for 643 // primitives (and may later be done in breaking up a MetaFile to primitives) 644 aMtf.SetPrefSize(aBoundSize); 645 } 646 } 647 --- 65 unchanged lines hidden (view full) --- 713 aOut.SetMapMode( aMap ); 714 aMtf.Record( &aOut ); 715 pObj->SingleObjectPainter( aOut ); // #110094#-17 716 aMtf.Stop(); 717 aMtf.WindStart(); 718 719 // #i99268# replace the original offset from using XOutDev's SetOffset 720 // NOT (as tried with #i92760#) with another MapMode which gets recorded |
721 // by the Metafile itself (what always leads to problems), but by hardly 722 // moving the result | 721 // by the Metafile itself (what always leads to problems), but by 722 // moving the result directly |
723 aMtf.Move(-aBoundRect.Left(), -aBoundRect.Top()); 724 725 aMtf.SetPrefMapMode( aMap ); 726 aMtf.SetPrefSize( aBoundRect.GetSize() ); 727 728 if( aMtf.GetActionCount() ) 729 aRet = aMtf; 730 } --- 182 unchanged lines hidden --- | 723 aMtf.Move(-aBoundRect.Left(), -aBoundRect.Top()); 724 725 aMtf.SetPrefMapMode( aMap ); 726 aMtf.SetPrefSize( aBoundRect.GetSize() ); 727 728 if( aMtf.GetActionCount() ) 729 aRet = aMtf; 730 } --- 182 unchanged lines hidden --- |