include/svx/svdoopengl.hxx | 19 +++++++++---------- svx/Library_svxcore.mk | 1 + svx/source/svdraw/svdoopengl.cxx | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 10 deletions(-)
New commits: commit ac7c75d26bb706a569c733e084b530d037fb050d Author: Markus Mohrhard <markus.mohrh...@collabora.co.uk> Date: Wed Apr 2 04:09:43 2014 +0200 initial work on allowing to resize the OpenGL object Change-Id: I29799522d32e31b4ffbba9d931fda352ee080e2d diff --git a/include/svx/svdoopengl.hxx b/include/svx/svdoopengl.hxx index 4510f56..4bd4bc2 100644 --- a/include/svx/svdoopengl.hxx +++ b/include/svx/svdoopengl.hxx @@ -11,21 +11,20 @@ #define INCLUDED_SVX_SVDO_OPENGL_HXX #include <svx/svdobj.hxx> -#include <svx/sdr/contact/viewcontactofopenglobj.hxx> #include <vcl/OpenGLContext.hxx> +namespace sdr { namespace contact { + class ViewContact; +} } + class SVX_DLLPUBLIC SdrOpenGLObj : public SdrObject { public: - virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact() SAL_OVERRIDE - { - return new sdr::contact::ViewContactOfOpenGLObj(*this); - } - - OpenGLContext& getOpenGLContext() - { - return maContext; - } + virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact() SAL_OVERRIDE; + + OpenGLContext& getOpenGLContext(); + + virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact); private: diff --git a/svx/Library_svxcore.mk b/svx/Library_svxcore.mk index b3c3521..8826d9f 100644 --- a/svx/Library_svxcore.mk +++ b/svx/Library_svxcore.mk @@ -297,6 +297,7 @@ $(eval $(call gb_Library_add_exception_objects,svxcore,\ svx/source/svdraw/svdomeas \ svx/source/svdraw/svdomedia \ svx/source/svdraw/svdoole2 \ + svx/source/svdraw/svdoopengl \ svx/source/svdraw/svdopage \ svx/source/svdraw/svdopath \ svx/source/svdraw/svdorect \ diff --git a/svx/source/svdraw/svdoopengl.cxx b/svx/source/svdraw/svdoopengl.cxx new file mode 100644 index 0000000..45d23ae --- /dev/null +++ b/svx/source/svdraw/svdoopengl.cxx @@ -0,0 +1,33 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include <svx/svdoopengl.hxx> +#include <svx/sdr/contact/viewcontactofopenglobj.hxx> + +sdr::contact::ViewContact* SdrOpenGLObj::CreateObjectSpecificViewContact() +{ + return new sdr::contact::ViewContactOfOpenGLObj(*this); +} + +OpenGLContext& SdrOpenGLObj::getOpenGLContext() +{ + return maContext; +} + +void SdrOpenGLObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) +{ + SdrObject::NbcResize(rRef, xFact, yFact); + + //now pass the information to the OpenGL context + maContext.setWinSize(aOutRect.GetSize()); + SAL_WARN("svx.opengl", "resized opengl drawinglayer object"); +} + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits