Related: #i121194# adapt template dialog code
we probably should remove the Bitmaps and use Graphics exlusively, but for now do a simple brute force conversion Change-Id: I0cdcb7d86f9304fd09f7e2c6aa7acdcec3785ae5
This commit is contained in:
@@ -12,8 +12,8 @@
|
||||
|
||||
#include <basegfx/matrix/b2dhommatrixtools.hxx>
|
||||
#include <basegfx/polygon/b2dpolygon.hxx>
|
||||
#include <drawinglayer/attribute/fillbitmapattribute.hxx>
|
||||
#include <drawinglayer/primitive2d/fillbitmapprimitive2d.hxx>
|
||||
#include <drawinglayer/attribute/fillgraphicattribute.hxx>
|
||||
#include <drawinglayer/primitive2d/fillgraphicprimitive2d.hxx>
|
||||
#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
|
||||
#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
|
||||
#include <drawinglayer/primitive2d/textlayoutdevice.hxx>
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <drawinglayer/processor2d/baseprocessor2d.hxx>
|
||||
#include <sfx2/templateviewitem.hxx>
|
||||
#include <vcl/button.hxx>
|
||||
#include <vcl/graph.hxx>
|
||||
|
||||
using namespace basegfx;
|
||||
using namespace basegfx::tools;
|
||||
@@ -138,11 +139,12 @@ void TemplateContainerItem::Paint (drawinglayer::processor2d::BaseProcessor2D *p
|
||||
|
||||
aSeq[nCount++] = Primitive2DReference( new PolyPolygonColorPrimitive2D(
|
||||
B2DPolyPolygon(aBounds), Color(COL_WHITE).getBColor()));
|
||||
aSeq[nCount++] = Primitive2DReference( new FillBitmapPrimitive2D(
|
||||
aSeq[nCount++] = Primitive2DReference( new FillGraphicPrimitive2D(
|
||||
createScaleTranslateB2DHomMatrix(1.0,1.0,fPosX,fPosY),
|
||||
FillBitmapAttribute(*pImage,
|
||||
B2DPoint(0.0,0.0),
|
||||
B2DVector(aImageSize.Width(),aImageSize.Height()),
|
||||
FillGraphicAttribute(Graphic(*pImage),
|
||||
B2DRange(
|
||||
B2DPoint(0.0,0.0),
|
||||
B2DPoint(aImageSize.Width(),aImageSize.Height())),
|
||||
false)
|
||||
));
|
||||
|
||||
|
@@ -11,14 +11,15 @@
|
||||
|
||||
#include <basegfx/matrix/b2dhommatrixtools.hxx>
|
||||
#include <basegfx/polygon/b2dpolygon.hxx>
|
||||
#include <drawinglayer/attribute/fillbitmapattribute.hxx>
|
||||
#include <drawinglayer/primitive2d/fillbitmapprimitive2d.hxx>
|
||||
#include <drawinglayer/attribute/fillgraphicattribute.hxx>
|
||||
#include <drawinglayer/primitive2d/fillgraphicprimitive2d.hxx>
|
||||
#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
|
||||
#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
|
||||
#include <drawinglayer/primitive2d/textlayoutdevice.hxx>
|
||||
#include <drawinglayer/primitive2d/textprimitive2d.hxx>
|
||||
#include <drawinglayer/processor2d/baseprocessor2d.hxx>
|
||||
#include <vcl/button.hxx>
|
||||
#include <vcl/graph.hxx>
|
||||
|
||||
#define SUBTITLE_SCALE_FACTOR 0.85
|
||||
|
||||
@@ -96,11 +97,12 @@ void TemplateViewItem::Paint(drawinglayer::processor2d::BaseProcessor2D *pProces
|
||||
aSeq[1] = Primitive2DReference( new PolyPolygonColorPrimitive2D(
|
||||
B2DPolyPolygon(aBounds), Color(COL_WHITE).getBColor()));
|
||||
|
||||
aSeq[2] = Primitive2DReference( new FillBitmapPrimitive2D(
|
||||
aSeq[2] = Primitive2DReference( new FillGraphicPrimitive2D(
|
||||
createTranslateB2DHomMatrix(maPrev1Pos.X(),maPrev1Pos.Y()),
|
||||
FillBitmapAttribute(maPreview1,
|
||||
B2DPoint(0,0),
|
||||
B2DVector(aImageSize.Width(),aImageSize.Height()),
|
||||
FillGraphicAttribute(Graphic(maPreview1),
|
||||
B2DRange(
|
||||
B2DPoint(0,0),
|
||||
B2DPoint(aImageSize.Width(),aImageSize.Height())),
|
||||
false)
|
||||
));
|
||||
|
||||
|
@@ -20,9 +20,9 @@
|
||||
#include <basegfx/polygon/b2dpolygon.hxx>
|
||||
#include <basegfx/vector/b2dsize.hxx>
|
||||
#include <basegfx/vector/b2dvector.hxx>
|
||||
#include <drawinglayer/attribute/fillbitmapattribute.hxx>
|
||||
#include <drawinglayer/attribute/fillgraphicattribute.hxx>
|
||||
#include <drawinglayer/attribute/fontattribute.hxx>
|
||||
#include <drawinglayer/primitive2d/fillbitmapprimitive2d.hxx>
|
||||
#include <drawinglayer/primitive2d/fillgraphicprimitive2d.hxx>
|
||||
#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
|
||||
#include <drawinglayer/primitive2d/textlayoutdevice.hxx>
|
||||
#include <drawinglayer/primitive2d/textprimitive2d.hxx>
|
||||
|
@@ -26,14 +26,15 @@
|
||||
#include <basegfx/range/b2drectangle.hxx>
|
||||
#include <basegfx/vector/b2dsize.hxx>
|
||||
#include <basegfx/polygon/b2dpolygon.hxx>
|
||||
#include <drawinglayer/attribute/fillbitmapattribute.hxx>
|
||||
#include <drawinglayer/primitive2d/fillbitmapprimitive2d.hxx>
|
||||
#include <drawinglayer/attribute/fillgraphicattribute.hxx>
|
||||
#include <drawinglayer/primitive2d/fillgraphicprimitive2d.hxx>
|
||||
#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
|
||||
#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
|
||||
#include <drawinglayer/primitive2d/textlayoutdevice.hxx>
|
||||
#include <drawinglayer/primitive2d/textprimitive2d.hxx>
|
||||
#include <drawinglayer/processor2d/baseprocessor2d.hxx>
|
||||
#include <vcl/button.hxx>
|
||||
#include <vcl/graph.hxx>
|
||||
#include <vcl/svapp.hxx>
|
||||
#include <vcl/texteng.hxx>
|
||||
|
||||
@@ -258,11 +259,12 @@ void ThumbnailViewItem::Paint (drawinglayer::processor2d::BaseProcessor2D *pProc
|
||||
Point aPos = maPrev1Pos;
|
||||
Size aImageSize = maPreview1.GetSizePixel();
|
||||
|
||||
aSeq[nPrimitive++] = Primitive2DReference( new FillBitmapPrimitive2D(
|
||||
aSeq[nPrimitive++] = Primitive2DReference( new FillGraphicPrimitive2D(
|
||||
createTranslateB2DHomMatrix(aPos.X(),aPos.Y()),
|
||||
FillBitmapAttribute(maPreview1,
|
||||
B2DPoint(0,0),
|
||||
B2DVector(aImageSize.Width(),aImageSize.Height()),
|
||||
FillGraphicAttribute(Graphic(maPreview1),
|
||||
B2DRange(
|
||||
B2DPoint(0,0),
|
||||
B2DPoint(aImageSize.Width(),aImageSize.Height())),
|
||||
false)
|
||||
));
|
||||
|
||||
|
Reference in New Issue
Block a user