Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : */
9 :
10 : #include <com/sun/star/drawing/XShape.hpp>
11 : #include <sdr/contact/viewcontactofopenglobj.hxx>
12 : #include <sdr/contact/viewobjectcontactofopenglobj.hxx>
13 : #include <drawinglayer/primitive2d/openglprimitive2d.hxx>
14 : #include <svdoopengl.hxx>
15 : #include <tools/gen.hxx>
16 :
17 : using namespace sdr::contact;
18 :
19 0 : ViewContactOfOpenGLObj::ViewContactOfOpenGLObj(SdrOpenGLObj& rOpenGLObj)
20 0 : : ViewContactOfSdrObj(rOpenGLObj)
21 : {
22 0 : }
23 :
24 0 : ViewContactOfOpenGLObj::~ViewContactOfOpenGLObj()
25 : {
26 0 : }
27 :
28 0 : ViewObjectContact& ViewContactOfOpenGLObj::CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact)
29 : {
30 0 : return *( new ViewObjectContactOfOpenGLObj( rObjectContact, *this ) );
31 : }
32 :
33 0 : drawinglayer::primitive2d::Primitive2DSequence ViewContactOfOpenGLObj::createViewIndependentPrimitive2DSequence() const
34 : {
35 0 : com::sun::star::uno::Reference< com::sun::star::drawing::XShape > xShape(GetSdrObject().getUnoShape(), com::sun::star::uno::UNO_QUERY);
36 0 : const Point aPos(xShape->getPosition().X,xShape->getPosition().Y);
37 :
38 : const drawinglayer::primitive2d::Primitive2DReference xReference(
39 0 : new drawinglayer::primitive2d::OpenGLPrimitive2D(aPos));
40 :
41 0 : return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
42 : }
43 :
44 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|