Hi Siqi,
On Sat, 2013-07-20 at 11:18 +0200, Siqi Liu wrote:
What I've wanted to do but failed:
1. Draw a point on the running slideshow (like the pen feature),
based on the "pointer_coordination x y" command. I've tried to find
out how to do some drawing on the canvas but I didn't really
understand the code there... not sure if we can add a small red
rectangle and move that to the position corresponding to the
"pointer_coordination", for now it just prints out the coordination
received.
Has anyone managed to help you with some code pointers here yet ?
Trying to use the XCanvas for rendering is ... in my experience deeply
problematic. Something as simple as 'draw a rectangle' is ... acutely
non-obvious in my experience ;-)
In the absence of better advice (and I'm no impress expert) I'd
personally try hooking off the existing 'scribble on slides' code -
which if you right click during a presentation allows you to draw over
the current slide:
git grep -10 CM_PEN_MODE
This disappears into a set of UNO properties set on the slideshow code
eg.
// for Pen Mode
beans::PropertyValue aPenPropSwitchPenMode;
aPenPropSwitchPenMode.Name = "SwitchPenMode";
aPenPropSwitchPenMode.Value <<= sal_True;
mxShow->setProperty( aPenPropSwitchPenMode );
Which lives in slideshow/
source/engine/slideshowimpl.cxx: if ( rProperty.Name == "SwitchPenMode" )
source/engine/slideshowimpl.cxx- {
source/engine/slideshowimpl.cxx: bool nSwitchPenMode(false);
source/engine/slideshowimpl.cxx: if (rProperty.Value >>= nSwitchPenMode)
source/engine/slideshowimpl.cxx- {
Presumably the mouse event code there goes down a different path that
builds out some goodness to render on top of the slides in this mode
that we could hook / use a different event for.
Does that make sense ?
Personally I'd be inclined to load a bitmap that has a nice central
point & alpha pattern around it and composite it on top and let the
artists go wild with that :-)
Hope that's helpful, Thorsten is really the expert here :-)
ATB,
Michael.
--
michael.meeks@suse.com <><, Pseudo Engineer, itinerant idiot
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.