wallpaperprimitive2d.cxx (464702f4) | wallpaperprimitive2d.cxx (035a2f44) |
---|---|
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 --- 13 unchanged lines hidden (view full) --- 22 23 24// MARKER(update_precomp.py): autogen include statement, do not remove 25#include "precompiled_drawinglayer.hxx" 26 27#include <drawinglayer/primitive2d/wallpaperprimitive2d.hxx> 28#include <drawinglayer/primitive2d/bitmapprimitive2d.hxx> 29#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx> | 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 --- 13 unchanged lines hidden (view full) --- 22 23 24// MARKER(update_precomp.py): autogen include statement, do not remove 25#include "precompiled_drawinglayer.hxx" 26 27#include <drawinglayer/primitive2d/wallpaperprimitive2d.hxx> 28#include <drawinglayer/primitive2d/bitmapprimitive2d.hxx> 29#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx> |
30#include <drawinglayer/primitive2d/fillbitmapprimitive2d.hxx> | 30#include <drawinglayer/primitive2d/fillgraphicprimitive2d.hxx> |
31#include <basegfx/polygon/b2dpolygontools.hxx> 32#include <basegfx/polygon/b2dpolygon.hxx> 33#include <drawinglayer/primitive2d/maskprimitive2d.hxx> | 31#include <basegfx/polygon/b2dpolygontools.hxx> 32#include <basegfx/polygon/b2dpolygon.hxx> 33#include <drawinglayer/primitive2d/maskprimitive2d.hxx> |
34#include <basegfx/matrix/b2dhommatrixtools.hxx> 35#include <vcl/graph.hxx> |
|
34 35////////////////////////////////////////////////////////////////////////////// 36 37namespace drawinglayer 38{ 39 namespace primitive2d 40 { 41 Primitive2DSequence WallpaperBitmapPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const --- 135 unchanged lines hidden (view full) --- 177 basegfx::B2DPoint aRelativeTopLeft(0.0, 0.0); 178 179 if(WALLPAPER_TILE != getWallpaperStyle()) 180 { 181 aRelativeTopLeft.setX(0.5 - aRelativeSize.getX()); 182 aRelativeTopLeft.setY(0.5 - aRelativeSize.getY()); 183 } 184 | 36 37////////////////////////////////////////////////////////////////////////////// 38 39namespace drawinglayer 40{ 41 namespace primitive2d 42 { 43 Primitive2DSequence WallpaperBitmapPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const --- 135 unchanged lines hidden (view full) --- 179 basegfx::B2DPoint aRelativeTopLeft(0.0, 0.0); 180 181 if(WALLPAPER_TILE != getWallpaperStyle()) 182 { 183 aRelativeTopLeft.setX(0.5 - aRelativeSize.getX()); 184 aRelativeTopLeft.setY(0.5 - aRelativeSize.getY()); 185 } 186 |
185 // prepare FillBitmapAttribute 186 const attribute::FillBitmapAttribute aFillBitmapAttribute( 187 getBitmapEx(), 188 aRelativeTopLeft, 189 aRelativeSize, | 187 // prepare FillGraphicAttribute 188 const attribute::FillGraphicAttribute aFillGraphicAttribute( 189 Graphic(getBitmapEx()), 190 basegfx::B2DRange(aRelativeTopLeft, aRelativeTopLeft+ aRelativeSize), |
190 true); 191 192 // create ObjectTransform | 191 true); 192 193 // create ObjectTransform |
193 basegfx::B2DHomMatrix aObjectTransform; 194 195 aObjectTransform.set(0, 0, getLocalObjectRange().getWidth()); 196 aObjectTransform.set(1, 1, getLocalObjectRange().getHeight()); 197 aObjectTransform.set(0, 2, getLocalObjectRange().getMinX()); 198 aObjectTransform.set(1, 2, getLocalObjectRange().getMinY()); | 194 const basegfx::B2DHomMatrix aObjectTransform( 195 basegfx::tools::createScaleTranslateB2DHomMatrix( 196 getLocalObjectRange().getRange(), 197 getLocalObjectRange().getMinimum())); |
199 200 // create FillBitmapPrimitive 201 const drawinglayer::primitive2d::Primitive2DReference xFillBitmap( | 198 199 // create FillBitmapPrimitive 200 const drawinglayer::primitive2d::Primitive2DReference xFillBitmap( |
202 new drawinglayer::primitive2d::FillBitmapPrimitive2D( | 201 new drawinglayer::primitive2d::FillGraphicPrimitive2D( |
203 aObjectTransform, | 202 aObjectTransform, |
204 aFillBitmapAttribute)); | 203 aFillGraphicAttribute)); |
205 aRetval = Primitive2DSequence(&xFillBitmap, 1); 206 207 // always embed tiled fill to clipping 208 bNeedsClipping = true; 209 } 210 211 if(bNeedsClipping) 212 { --- 53 unchanged lines hidden --- | 204 aRetval = Primitive2DSequence(&xFillBitmap, 1); 205 206 // always embed tiled fill to clipping 207 bNeedsClipping = true; 208 } 209 210 if(bNeedsClipping) 211 { --- 53 unchanged lines hidden --- |