View | Details | Raw Unified | Return to issue 120230
Collapse All | Expand All

(-)old//main/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx (-2 / +22 lines)
Lines 438-446 Link Here
438
				}
438
				}
439
				case PRIMITIVE2D_ID_FILLHATCHPRIMITIVE2D :
439
				case PRIMITIVE2D_ID_FILLHATCHPRIMITIVE2D :
440
				{
440
				{
441
					static bool bForceIgnoreHatchSmoothing(false);
441
					// #Sym2_2905# chenshuai: As hatch is a special kind of background which has many of serried hairlines, we should
442
					// not used the model of smoothing to draw it, because of we also want to keep the thumbnail looks nicer. 
443
					// Use VCL to draw the hatch directly.
444
					// static bool bForceIgnoreHatchSmoothing(false);
445
					static bool bForceIgnoreHatchSmoothing(true);
442
446
443
                    			if(bForceIgnoreHatchSmoothing || getOptionsDrawinglayer().IsAntiAliasing())
447
                    			//if(bForceIgnoreHatchSmoothing || getOptionsDrawinglayer().IsAntiAliasing())
448
					if( !bForceIgnoreHatchSmoothing )
444
                    			{
449
                    			{
445
						// if AA is used (or ignore smoothing is on), there is no need to smooth 
450
						// if AA is used (or ignore smoothing is on), there is no need to smooth 
446
						// hatch painting, use decomposition
451
						// hatch painting, use decomposition
Lines 492-497 Link Here
492
						const sal_uInt16 nAngle10((sal_uInt16)basegfx::fround(rFillHatchAttributes.getAngle() / F_PI1800));
497
						const sal_uInt16 nAngle10((sal_uInt16)basegfx::fround(rFillHatchAttributes.getAngle() / F_PI1800));
493
						::Hatch aVCLHatch(eHatchStyle, Color(rFillHatchAttributes.getColor()), nDistance, nAngle10);
498
						::Hatch aVCLHatch(eHatchStyle, Color(rFillHatchAttributes.getColor()), nDistance, nAngle10);
494
499
500
						// #Sym2_2905# chenshuai: create filled background
501
						const bool bFillBackground(rFillHatchAttributes.isFillBackground());
502
						primitive2d::Primitive2DSequence aRetval(1);
503
504
						if(bFillBackground)
505
						{
506
							// create primitive for background
507
							const primitive2d::Primitive2DReference xRef(new primitive2d::PolyPolygonColorPrimitive2D(
508
								basegfx::B2DPolyPolygon(basegfx::tools::createPolygonFromRect(rFillHatchPrimitive.getObjectRange())), 
509
								rFillHatchPrimitive.getBColor()));
510
							aRetval[0L] = xRef;
511
						}
512
						process(aRetval);
513
						// #Sym2_2905# end
514
495
						// draw hatch using VCL
515
						// draw hatch using VCL
496
						mpOutputDevice->DrawHatch(PolyPolygon(Polygon(aHatchPolygon)), aVCLHatch);
516
						mpOutputDevice->DrawHatch(PolyPolygon(Polygon(aHatchPolygon)), aVCLHatch);
497
					}
517
					}

Return to issue 120230