Kaydet (Commit) f045b7b4 authored tarafından Thorsten Behrens's avatar Thorsten Behrens

#110496# Merge from cws_srx645_canvas01: first working version of XCanvas C++…

#110496# Merge from cws_srx645_canvas01: first working version of XCanvas C++ wrapper, providing encapsulation against possible API changes and some amount of convenience.
üst 6e89341b
/*************************************************************************
*
* $RCSfile: basegfxfactory.hxx,v $
*
* $Revision: 1.2 $
*
* last change: $Author: thb $ $Date: 2004-03-18 10:40:57 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _CPPCANVAS_BASEGFXFACTORY_HXX
#define _CPPCANVAS_BASEGFXFACTORY_HXX
#ifndef _CPPCANVAS_CANVAS_HXX
#include <cppcanvas/canvas.hxx>
#endif
#ifndef _CPPCANVAS_BITMAPCANVAS_HXX
#include <cppcanvas/bitmapcanvas.hxx>
#endif
#ifndef _CPPCANVAS_SPRITECANVAS_HXX
#include <cppcanvas/spritecanvas.hxx>
#endif
#ifndef _CPPCANVAS_POLYPOLYGON_HXX
#include <cppcanvas/polypolygon.hxx>
#endif
#ifndef _CPPCANVAS_BITMAP_HXX
#include <cppcanvas/bitmap.hxx>
#endif
#ifndef _CPPCANVAS_RENDERER_HXX
#include <cppcanvas/renderer.hxx>
#endif
#ifndef _CPPCANVAS_TEXT_HXX
#include <cppcanvas/text.hxx>
#endif
#ifndef _CPPCANVAS_SPRITE_HXX
#include <cppcanvas/sprite.hxx>
#endif
#ifndef _BGFX_VECTOR_B2ISIZE_HXX
#include <basegfx/vector/b2isize.hxx>
#endif
namespace basegfx
{
class B2DPolygon;
class B2DPolyPolygon;
}
namespace rtl
{
class OUString;
}
/* Definition of BaseGfxFactory class */
namespace cppcanvas
{
/** The BaseGfxFactory creates Canvas objects for various basegfx
primitives, such as polygons and bitmaps (not yet
implemented).
Please note that the objects created for a specific Canvas can
only be drawn on exactly that canvas. You have to regenerate
them for different canvases.
*/
class BaseGfxFactory
{
public:
static BaseGfxFactory& getInstance();
/** Create a polygon from a ::basegfx::B2DPolygon
The created polygon initially has the same size in user
coordinate space as the source polygon
*/
PolyPolygonSharedPtr createPolyPolygon( const CanvasSharedPtr&, const ::basegfx::B2DPolygon& rPoly ) const;
PolyPolygonSharedPtr createPolyPolygon( const CanvasSharedPtr&, const ::basegfx::B2DPolyPolygon& rPoly ) const;
/** Create an uninitialized bitmap with the given size
*/
BitmapSharedPtr createBitmap( const CanvasSharedPtr&, const ::basegfx::B2ISize& rSize ) const;
/** Create a text portion with the given content string
*/
TextSharedPtr createText( const CanvasSharedPtr&, const ::rtl::OUString& ) const;
private:
friend struct InitInstance2;
// singleton
BaseGfxFactory();
~BaseGfxFactory();
// default: disabled copy/assignment
BaseGfxFactory(const BaseGfxFactory&);
BaseGfxFactory& operator=( const BaseGfxFactory& );
};
}
#endif /* _CPPCANVAS_BASEGFXFACTORY_HXX */
/*************************************************************************
*
* $RCSfile: bitmap.hxx,v $
*
* $Revision: 1.2 $
*
* last change: $Author: thb $ $Date: 2004-03-18 10:40:57 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _CPPCANVAS_BITMAP_HXX
#define _CPPCANVAS_BITMAP_HXX
#ifndef _COM_SUN_STAR_UNO_REFERENCE_HXX_
#include <com/sun/star/uno/Reference.hxx>
#endif
#ifndef BOOST_SHARED_PTR_HPP_INCLUDED
#include <external/boost/shared_ptr.hpp>
#endif
#ifndef _CPPCANVAS_CANVASGRAPHIC_HXX
#include <cppcanvas/canvasgraphic.hxx>
#endif
#ifndef _CPPCANVAS_BITMAPCANVAS_HXX
#include <cppcanvas/bitmapcanvas.hxx>
#endif
namespace drafts { namespace com { namespace sun { namespace star { namespace rendering
{
class XBitmap;
} } } } }
/* Definition of Bitmap interface */
namespace cppcanvas
{
/** This interface defines a Bitmap canvas object
Consider this object part of the view, and not of the model
data, as this bitmap can only be painted on its parent canvas
*/
class Bitmap : public virtual CanvasGraphic
{
public:
virtual BitmapCanvasSharedPtr getBitmapCanvas() const = 0;
virtual ::com::sun::star::uno::Reference<
::drafts::com::sun::star::rendering::XBitmap > getUNOBitmap() const = 0;
};
typedef ::boost::shared_ptr< ::cppcanvas::Bitmap > BitmapSharedPtr;
}
#endif /* _CPPCANVAS_BITMAP_HXX */
/*************************************************************************
*
* $RCSfile: bitmapcanvas.hxx,v $
*
* $Revision: 1.2 $
*
* last change: $Author: thb $ $Date: 2004-03-18 10:40:57 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _CPPCANVAS_BITMAPCANVAS_HXX
#define _CPPCANVAS_BITMAPCANVAS_HXX
#ifndef _SAL_TYPES_H_
#include <sal/types.h>
#endif
#ifndef BOOST_SHARED_PTR_HPP_INCLUDED
#include <external/boost/shared_ptr.hpp>
#endif
#ifndef _BGFX_VECTOR_B2ISIZE_HXX
#include <basegfx/vector/b2isize.hxx>
#endif
#ifndef _CPPCANVAS_CANVAS_HXX
#include <cppcanvas/canvas.hxx>
#endif
/* Definition of BitmapCanvas */
namespace cppcanvas
{
class BitmapCanvas;
// forward declaration, since cloneBitmapCanvas() also references BitmapCanvas
typedef ::boost::shared_ptr< BitmapCanvas > BitmapCanvasSharedPtr;
/** BitmapCanvas interface
*/
class BitmapCanvas : public virtual Canvas
{
public:
virtual ::basegfx::B2ISize getSize() const = 0;
virtual BitmapCanvasSharedPtr cloneBitmapCanvas() const = 0; // shared_ptr does not allow for covariant return types
};
}
#endif /* _CPPCANVAS_BITMAPCANVAS_HXX */
/*************************************************************************
*
* $RCSfile: canvas.hxx,v $
*
* $Revision: 1.2 $
*
* last change: $Author: thb $ $Date: 2004-03-18 10:40:58 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _CPPCANVAS_CANVAS_HXX
#define _CPPCANVAS_CANVAS_HXX
#ifndef _COM_SUN_STAR_UNO_REFERENCE_HXX_
#include <com/sun/star/uno/Reference.hxx>
#endif
#ifndef BOOST_SHARED_PTR_HPP_INCLUDED
#include <external/boost/shared_ptr.hpp>
#endif
#ifndef _CPPCANVAS_FONT_HXX
#include <cppcanvas/font.hxx>
#endif
#ifndef _CPPCANVAS_COLOR_HXX
#include <cppcanvas/color.hxx>
#endif
namespace rtl
{
class OUString;
}
namespace basegfx
{
class B2DHomMatrix;
class B2DPolyPolygon;
}
namespace drafts { namespace com { namespace sun { namespace star { namespace rendering
{
class XCanvas;
struct ViewState;
} } } } }
/* Definition of BitmapCanvas */
namespace cppcanvas
{
class PolyPolygon;
class Canvas;
// forward declaration, since PolyPolygon also references Canvas
typedef ::boost::shared_ptr< PolyPolygon > PolyPolygonSharedPtr;
// forward declaration, since cloneCanvas() also references Canvas
typedef ::boost::shared_ptr< Canvas > CanvasSharedPtr;
/** Canvas interface
*/
class Canvas
{
public:
virtual ~Canvas() {}
virtual void setTransformation( const ::basegfx::B2DHomMatrix& rMatrix ) = 0;
virtual ::basegfx::B2DHomMatrix getTransformation() const = 0;
virtual void setClip( const PolyPolygonSharedPtr& rClipPoly ) = 0;
virtual PolyPolygonSharedPtr getClip() const = 0;
virtual FontSharedPtr createFont( const ::rtl::OUString& rFontName, const double& rCellSize ) const = 0;
virtual ColorSharedPtr createColor() const = 0;
virtual CanvasSharedPtr cloneCanvas() const = 0;
// this should be considered private. if RTTI gets enabled
// someday, remove that to a separate interface
virtual ::com::sun::star::uno::Reference<
::drafts::com::sun::star::rendering::XCanvas > getUNOCanvas() const = 0;
virtual ::drafts::com::sun::star::rendering::ViewState getViewState() const = 0;
};
}
#endif /* _CPPCANVAS_CANVAS_HXX */
/*************************************************************************
*
* $RCSfile: canvasgraphic.hxx,v $
*
* $Revision: 1.2 $
*
* last change: $Author: thb $ $Date: 2004-03-18 10:40:58 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _CPPCANVAS_CANVASGRAPHIC_HXX
#define _CPPCANVAS_CANVASGRAPHIC_HXX
#ifndef _SAL_TYPES_H_
#include <sal/types.h>
#endif
#ifndef BOOST_SHARED_PTR_HPP_INCLUDED
#include <external/boost/shared_ptr.hpp>
#endif
#ifndef _CPPCANVAS_COLOR_HXX
#include <cppcanvas/color.hxx>
#endif
#ifndef _CPPCANVAS_CANVAS_HXX
#include <cppcanvas/canvas.hxx>
#endif
namespace basegfx
{
class B2DHomMatrix;
class B2DPolyPolygon;
}
/* Definition of CanvasGraphic interface */
namespace cppcanvas
{
// forward declaration, since PolyPolygon also derives from CanvasGraphic
typedef ::boost::shared_ptr< class PolyPolygon > PolyPolygonSharedPtr;
/** This interface defines basic properties of
objects that can be painted on a Canvas
*/
class CanvasGraphic
{
public:
/** These enums determine how the primitive color is combined
with the background. When performing this calculations, it
is assumed that all color values are premultiplied with
the corresponding alpha values (if no alpha is specified,
1.0 is assumed). Then, the following general compositing
operation is performed:
C = Ca * Fa + Cb * Fb
where C is the result color, Ca and Cb are the input
colors, premultiplied with alpha, and Fa and Fb are
described for the different composite modes (wherein Aa
and Ab denote source and destination alpha, respectively).
*/
enum CompositeOp
{
/// Clear destination. Fa = Fb = 0.
CLEAR,
/// Copy source as-is to destination. Fa = 1, Fb = 0.
SOURCE,
/// Leave destination as-is. Fa = 0, Fb = 1.
DESTINATION,
/// Copy source over destination. Fa = 1, Fb = 1-Aa.
OVER,
/// Copy source under destination. Fa = 1-Ab, Fb = 1.
UNDER,
/// Copy source to destination, but limited to where the destination is. Fa = Ab, Fb = 0.
INSIDE,
/// Leave destination as is, but only where source was. Fa = 0, Fb = Aa.
INSIDE_REVERSE,
/// Copy source to destination, but limited to where destination is not. Fa = 1-Ab, Fb = 0.
OUTSIDE,
/// Leave destination as is, but only where source has not been. Fa = 0, Fb = 1-Aa.
OUTSIDE_REVERSE,
/// Copy source over destination, but only where destination is. Keep destination. Fa = Ab, Fb = 1-Aa.
ATOP,
/// Copy destination over source, but only where source is. Keep source. Fa = 1-Ab, Fb = Aa.
ATOP_REVERSE,
/// Take only parts where either source or destination, but not both are. Fa = 1-Ab, Fb = 1-Aa.
XOR,
/** simply add contributions of both source and destination. The
resulting color values are limited to the permissible color
range, and clipped to the maximal value, if exceeded. Fa = 1, Fb = 1.
*/
ADD,
/// Fa = min(1,(1-Ab)/Aa), Fb = 1
SATURATE
};
virtual ~CanvasGraphic() {}
/** Set object transformation matrix
*/
virtual void setTransformation( const ::basegfx::B2DHomMatrix& rMatrix ) = 0;
/** Get object transformation matrix
*/
virtual ::basegfx::B2DHomMatrix getTransformation() const = 0;
/** Set object clipping polygon
*/
virtual void setClip( const PolyPolygonSharedPtr& rClipPoly ) = 0;
/** Get object clipping polygon
*/
virtual PolyPolygonSharedPtr getClip() const = 0;
/** Set object color
*/
virtual void setRGBAColor( Color::IntSRGBA ) = 0;
/** Get object color
*/
virtual Color::IntSRGBA getRGBAColor() const = 0;
/** Set object composite mode
*/
virtual void setCompositeOp( CompositeOp aOp ) = 0;
/** Get object composite mode
*/
virtual CompositeOp getCompositeOp() const = 0;
/** Render to parent canvas
This method renders the content to the parent canvas,
i.e. the canvas this object was constructed for.
@return whether the rendering finished successfully.
*/
virtual bool draw() const = 0;
};
typedef ::boost::shared_ptr< ::cppcanvas::CanvasGraphic > CanvasGraphicSharedPtr;
}
#endif /* _CPPCANVAS_CANVASGRAPHIC_HXX */
/*************************************************************************
*
* $RCSfile: color.hxx,v $
*
* $Revision: 1.2 $
*
* last change: $Author: thb $ $Date: 2004-03-18 10:40:58 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _CPPCANVAS_COLOR_HXX
#define _CPPCANVAS_COLOR_HXX
#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_
#include <com/sun/star/uno/Sequence.hxx>
#endif
#ifndef BOOST_SHARED_PTR_HPP_INCLUDED
#include <external/boost/shared_ptr.hpp>
#endif
/* Definition of Color class */
namespace cppcanvas
{
class Color
{
public:
/** Color in the sRGB color space, plus alpha channel
The four bytes of the sal_uInt32 are allocated as follows
to the color channels and alpha: 0xRRGGBBAA.
*/
typedef sal_uInt32 IntSRGBA;
virtual ~Color() {}
virtual IntSRGBA getIntSRGBA( ::com::sun::star::uno::Sequence< double >& rDeviceColor ) const = 0;
virtual ::com::sun::star::uno::Sequence< double > getDeviceColor( IntSRGBA aSRGBA ) const = 0;
};
typedef ::boost::shared_ptr< ::cppcanvas::Color > ColorSharedPtr;
}
#endif /* _CPPCANVAS_COLOR_HXX */
/*************************************************************************
*
* $RCSfile: customsprite.hxx,v $
*
* $Revision: 1.2 $
*
* last change: $Author: thb $ $Date: 2004-03-18 10:40:58 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _CPPCANVAS_CUSTOMSPRITE_HXX
#define _CPPCANVAS_CUSTOMSPRITE_HXX
#ifndef _SAL_TYPES_H_
#include <sal/types.h>
#endif
#ifndef BOOST_SHARED_PTR_HPP_INCLUDED
#include <external/boost/shared_ptr.hpp>
#endif
#ifndef _CPPCANVAS_SPRITE_HXX
#include <cppcanvas/sprite.hxx>
#endif
#ifndef _CPPCANVAS_CANVAS_HXX
#include <cppcanvas/canvas.hxx>
#endif
/* Definition of CustomSprite class */
namespace cppcanvas
{
class CustomSprite : public virtual Sprite
{
public:
virtual CanvasSharedPtr getContentCanvas() const = 0;
};
typedef ::boost::shared_ptr< ::cppcanvas::CustomSprite > CustomSpriteSharedPtr;
}
#endif /* _CPPCANVAS_CUSTOMSPRITE_HXX */
/*************************************************************************
*
* $RCSfile: font.hxx,v $
*
* $Revision: 1.2 $
*
* last change: $Author: thb $ $Date: 2004-03-18 10:40:59 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _CPPCANVAS_FONT_HXX
#define _CPPCANVAS_FONT_HXX
#ifndef _COM_SUN_STAR_UNO_REFERENCE_HXX_
#include <com/sun/star/uno/Reference.hxx>
#endif
#ifndef BOOST_SHARED_PTR_HPP_INCLUDED
#include <external/boost/shared_ptr.hpp>
#endif
namespace rtl
{
class OUString;
}
namespace drafts { namespace com { namespace sun { namespace star { namespace rendering
{
class XCanvasFont;
} } } } }
/* Definition of Font class */
namespace cppcanvas
{
class Font
{
public:
virtual ~Font() {}
virtual ::rtl::OUString getName() const = 0;
virtual double getCellSize() const = 0;
virtual ::com::sun::star::uno::Reference<
::drafts::com::sun::star::rendering::XCanvasFont > getUNOFont() const = 0;
};
typedef ::boost::shared_ptr< ::cppcanvas::Font > FontSharedPtr;
}
#endif /* _CPPCANVAS_FONT_HXX */
/*************************************************************************
*
* $RCSfile: polypolygon.hxx,v $
*
* $Revision: 1.2 $
*
* last change: $Author: thb $ $Date: 2004-03-18 10:40:59 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _CPPCANVAS_POLYPOLYGON_HXX
#define _CPPCANVAS_POLYPOLYGON_HXX
#ifndef _COM_SUN_STAR_UNO_REFERENCE_HXX_
#include <com/sun/star/uno/Reference.hxx>
#endif
#ifndef BOOST_SHARED_PTR_HPP_INCLUDED
#include <external/boost/shared_ptr.hpp>
#endif
#ifndef _CPPCANVAS_CANVASGRAPHIC_HXX
#include <cppcanvas/canvasgraphic.hxx>
#endif
namespace basegfx
{
class B2DPolygon;
class B2DPolyPolygon;
}
namespace drafts { namespace com { namespace sun { namespace star { namespace rendering
{
class XPolyPolygon2D;
} } } } }
/* Definition of PolyPolygon interface */
namespace cppcanvas
{
/** This interface defines a PolyPolygon canvas object
Consider this object part of the view, and not of the model
data. Although the given polygon is typically copied and held
internally (to facilitate migration to incompatible canvases),
::basegfx::B2DPolygon et al. are ref-counted copy-on-write
classes, i.e. memory shouldn't be wasted. On the other hand,
the API polygon created internally _does_ necessarily
duplicate the data held, but can be easily flushed away via
flush().
*/
class PolyPolygon : public virtual CanvasGraphic
{
public:
virtual void addPolygon( const ::basegfx::B2DPolygon& rPoly ) = 0;
virtual void addPolyPolygon( const ::basegfx::B2DPolyPolygon& rPoly ) = 0;
/** Set polygon fill color
*/
virtual void setRGBAFillColor( Color::IntSRGBA ) = 0;
/** Set polygon line color
*/
virtual void setRGBALineColor( Color::IntSRGBA ) = 0;
/** Get polygon fill color
*/
virtual Color::IntSRGBA getRGBAFillColor() const = 0;
/** Get polygon line color
*/
virtual Color::IntSRGBA getRGBALineColor() const = 0;
virtual void setStrokeWidth( const double& rStrokeWidth ) = 0;
virtual double getStrokeWidth() const = 0;
virtual ::com::sun::star::uno::Reference<
::drafts::com::sun::star::rendering::XPolyPolygon2D > getUNOPolyPolygon() const = 0;
};
typedef ::boost::shared_ptr< ::cppcanvas::PolyPolygon > PolyPolygonSharedPtr;
}
#endif /* _CPPCANVAS_POLYPOLYGON_HXX */
/*************************************************************************
*
* $RCSfile: renderer.hxx,v $
*
* $Revision: 1.2 $
*
* last change: $Author: thb $ $Date: 2004-03-18 10:40:59 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _CPPCANVAS_RENDERER_HXX
#define _CPPCANVAS_RENDERER_HXX
#ifndef _SAL_TYPES_H_
#include <sal/types.h>
#endif
#ifndef BOOST_SHARED_PTR_HPP_INCLUDED
#include <external/boost/shared_ptr.hpp>
#endif
#ifndef _CPPCANVAS_CANVASGRAPHIC_HXX
#include <cppcanvas/canvasgraphic.hxx>
#endif
/* Definition of Renderer interface */
namespace cppcanvas
{
class Renderer : public virtual CanvasGraphic
{
public:
/** Render subset of metafile to given canvas
This method renders the given subset of the content to the
given canvas. Previously cached data is used, if the
canvases are identical. Otherwise, the equivalent of a
flush() followed by a prefetch() with the given canvas is
performed.
@param nStartIndex
The index of the first action to be rendered (the indices
correspond to the action indices of the originating
GDIMetaFile).
@param nEndIndex
The index of the first action _not_ painted anymore,
i.e. the action after the last action rendered (the
indices correspond to the action indices of the
originating GDIMetaFile).
@return whether the rendering finished successfully.
*/
virtual bool drawSubset( int nStartIndex,
int nEndIndex ) const = 0;
};
typedef ::boost::shared_ptr< ::cppcanvas::Renderer > RendererSharedPtr;
}
#endif /* _CPPCANVAS_RENDERER_HXX */
/*************************************************************************
*
* $RCSfile: sprite.hxx,v $
*
* $Revision: 1.2 $
*
* last change: $Author: thb $ $Date: 2004-03-18 10:41:00 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _CPPCANVAS_SPRITE_HXX
#define _CPPCANVAS_SPRITE_HXX
#ifndef _COM_SUN_STAR_UNO_REFERENCE_HXX_
#include <com/sun/star/uno/Reference.hxx>
#endif
#ifndef BOOST_SHARED_PTR_HPP_INCLUDED
#include <external/boost/shared_ptr.hpp>
#endif
namespace basegfx
{
class B2DHomMatrix;
class B2DPolyPolygon;
class B2DPoint;
}
namespace drafts { namespace com { namespace sun { namespace star { namespace rendering
{
class XSprite;
} } } } }
/* Definition of Sprite class */
namespace cppcanvas
{
class Sprite
{
public:
virtual ~Sprite() {}
virtual void setAlpha( const double& rAlpha ) = 0;
/** Set the sprite position on screen
This method differs from the XSprite::move() insofar, as
no viewstate/renderstate transformations are applied to
the specified position. The given position is interpreted
in device coordinates (i.e. screen pixel)
*/
virtual void movePixel( const ::basegfx::B2DPoint& rNewPos ) = 0;
/** Set the sprite position on screen
This method sets the sprite position in the view
coordinate system of the parent canvas
*/
virtual void move( const ::basegfx::B2DPoint& rNewPos ) = 0;
virtual void transform( const ::basegfx::B2DHomMatrix& rMatrix ) = 0;
/** Set output clipping
This method differs from the XSprite::clip() insofar, as
no viewstate/renderstate transformations are applied to
the specified clip polygon. The given polygon is
interpreted in device coordinates (i.e. screen pixel)
*/
virtual void setClip( const ::basegfx::B2DPolyPolygon& rClipPoly ) = 0;
virtual void show() = 0;
virtual void hide() = 0;
virtual ::com::sun::star::uno::Reference<
::drafts::com::sun::star::rendering::XSprite > getUNOSprite() const = 0;
};
typedef ::boost::shared_ptr< ::cppcanvas::Sprite > SpriteSharedPtr;
}
#endif /* _CPPCANVAS_SPRITE_HXX */
/*************************************************************************
*
* $RCSfile: spritecanvas.hxx,v $
*
* $Revision: 1.2 $
*
* last change: $Author: thb $ $Date: 2004-03-18 10:41:00 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _CPPCANVAS_SPRITECANVAS_HXX
#define _CPPCANVAS_SPRITECANVAS_HXX
#ifndef _SAL_TYPES_H_
#include <sal/types.h>
#endif
#ifndef _BGFX_VECTOR_B2DSIZE_HXX
#include <basegfx/vector/b2dsize.hxx>
#endif
#ifndef BOOST_SHARED_PTR_HPP_INCLUDED
#include <external/boost/shared_ptr.hpp>
#endif
#ifndef _CPPCANVAS_BITMAPCANVAS_HXX
#include <cppcanvas/bitmapcanvas.hxx>
#endif
#ifndef _CPPCANVAS_SPRITE_HXX
#include <cppcanvas/sprite.hxx>
#endif
#ifndef _CPPCANVAS_CUSTOMSPRITE_HXX
#include <cppcanvas/customsprite.hxx>
#endif
namespace drafts { namespace com { namespace sun { namespace star { namespace rendering
{
class XSpriteCanvas;
} } } } }
/* Definition of SpriteCanvas */
namespace cppcanvas
{
class SpriteCanvas;
// forward declaration, since cloneSpriteCanvas() also references SpriteCanvas
typedef ::boost::shared_ptr< ::cppcanvas::SpriteCanvas > SpriteCanvasSharedPtr;
/** SpriteCanvas interface
*/
class SpriteCanvas : public virtual BitmapCanvas
{
public:
virtual bool updateScreen() const = 0;
virtual CustomSpriteSharedPtr createCustomSprite( const ::basegfx::B2DSize& ) const = 0;
virtual SpriteSharedPtr createClonedSprite( const SpriteSharedPtr& ) const = 0;
virtual SpriteCanvasSharedPtr cloneSpriteCanvas() const = 0; // shared_ptr does not allow for covariant return types
virtual ::com::sun::star::uno::Reference<
::drafts::com::sun::star::rendering::XSpriteCanvas > getUNOSpriteCanvas() const = 0;
};
}
#endif /* _CPPCANVAS_SPRITECANVAS_HXX */
/*************************************************************************
*
* $RCSfile: text.hxx,v $
*
* $Revision: 1.2 $
*
* last change: $Author: thb $ $Date: 2004-03-18 10:41:00 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _CPPCANVAS_TEXT_HXX
#define _CPPCANVAS_TEXT_HXX
#ifndef BOOST_SHARED_PTR_HPP_INCLUDED
#include <external/boost/shared_ptr.hpp>
#endif
#ifndef _CPPCANVAS_CANVASGRAPHIC_HXX
#include <cppcanvas/canvasgraphic.hxx>
#endif
namespace rtl
{
class OUString;
}
/* Definition of Text interface */
namespace cppcanvas
{
class Text : public virtual CanvasGraphic
{
public:
virtual void setFont( const FontSharedPtr& ) = 0;
virtual FontSharedPtr getFont() = 0;
};
typedef ::boost::shared_ptr< ::cppcanvas::Text > TextSharedPtr;
}
#endif /* _CPPCANVAS_TEXT_HXX */
/*************************************************************************
*
* $RCSfile: vclfactory.hxx,v $
*
* $Revision: 1.2 $
*
* last change: $Author: thb $ $Date: 2004-03-18 10:41:00 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _CPPCANVAS_VCLFACTORY_HXX
#define _CPPCANVAS_VCLFACTORY_HXX
#ifndef _CPPCANVAS_CANVAS_HXX
#include <cppcanvas/canvas.hxx>
#endif
#ifndef _CPPCANVAS_BITMAPCANVAS_HXX
#include <cppcanvas/bitmapcanvas.hxx>
#endif
#ifndef _CPPCANVAS_SPRITECANVAS_HXX
#include <cppcanvas/spritecanvas.hxx>
#endif
#ifndef _CPPCANVAS_POLYPOLYGON_HXX
#include <cppcanvas/polypolygon.hxx>
#endif
#ifndef _CPPCANVAS_BITMAP_HXX
#include <cppcanvas/bitmap.hxx>
#endif
#ifndef _CPPCANVAS_RENDERER_HXX
#include <cppcanvas/renderer.hxx>
#endif
#ifndef _CPPCANVAS_TEXT_HXX
#include <cppcanvas/text.hxx>
#endif
#ifndef _CPPCANVAS_SPRITE_HXX
#include <cppcanvas/sprite.hxx>
#endif
class Window;
class Bitmap;
class BitmapEx;
class Polygon;
class PolyPolygon;
class Size;
class Graphic;
class GDIMetaFile;
namespace rtl
{
class OUString;
}
/* Definition of VCLFactory class */
namespace cppcanvas
{
/** The VCLFactory creates Canvas objects for various VCL
OutputDevice primitives, such as windows, polygons, bitmaps
and metafiles.
Please note that the objects created for a specific Canvas can
only be drawn on exactly that canvas. You have to regenerate
them for different canvases.
*/
class VCLFactory
{
public:
static VCLFactory& getInstance();
BitmapCanvasSharedPtr createCanvas( const ::Window& rVCLWindow );
SpriteCanvasSharedPtr createSpriteCanvas( const ::Window& rVCLWindow ) const;
SpriteCanvasSharedPtr createFullscreenSpriteCanvas( const ::Window& rVCLWindow, const Size& rFullscreenSize ) const;
/** Create a polygon from a tools::Polygon
The created polygon initially has the same size in user
coordinate space as the source polygon
*/
PolyPolygonSharedPtr createPolyPolygon( const CanvasSharedPtr&, const ::Polygon& rPoly ) const;
PolyPolygonSharedPtr createPolyPolygon( const CanvasSharedPtr&, const ::PolyPolygon& rPoly ) const;
/** Create an uninitialized bitmap with the given size
*/
BitmapSharedPtr createBitmap( const CanvasSharedPtr&, const ::Size& rSize ) const;
/** Create a bitmap from a VCL Bitmap
*/
BitmapSharedPtr createBitmap( const CanvasSharedPtr&, const ::Bitmap& rBitmap ) const;
BitmapSharedPtr createBitmap( const CanvasSharedPtr&, const ::BitmapEx& rBmpEx ) const;
/** Create a renderer object from a Graphic
The created renderer initially draws the graphic
one-by-one units large, in user coordinate space
*/
RendererSharedPtr createRenderer( const CanvasSharedPtr&, const ::Graphic& rGraphic ) const;
/** Create a renderer object from a Metafile
The created renderer initially draws the metafile
one-by-one units large, in user coordinate space
*/
RendererSharedPtr createRenderer( const CanvasSharedPtr&, const ::GDIMetaFile& rMtf ) const;
/** Create an animated sprite from a VCL animation
*/
SpriteSharedPtr createAnimatedSprite( const SpriteCanvasSharedPtr&, const ::Animation& rAnim ) const;
/** Create a text portion with the given content string
*/
TextSharedPtr createText( const CanvasSharedPtr&, const ::rtl::OUString& ) const;
private:
friend struct InitInstance;
// singleton
VCLFactory();
~VCLFactory();
// default: disabled copy/assignment
VCLFactory(const VCLFactory&);
VCLFactory& operator=( const VCLFactory& );
};
}
#endif /* _CPPCANVAS_VCLFACTORY_HXX */
cx cppcanvas : comphelper cppuhelper offuh tools vcl canvas basegfx NULL
cx cppcanvas usr1 - all cx_mkout NULL
cx cppcanvas\source\tools nmake - all cx_tools NULL
cx cppcanvas\source\wrapper nmake - all cx_wrapper cx_tools NULL
cx cppcanvas\source\mtfrenderer nmake - all cx_mtfrenderer cx_tools cx_wrapper NULL
cx cppcanvas\util nmake - all cx_util cx_tools cx_wrapper cx_mtfrenderer NULL
..\%__SRC%\bin\cppcanvas*.dll %_DEST%\bin%_EXT%\cppcanvas*.dll
..\%__SRC%\lib\icppcanvas.lib %_DEST%\lib%_EXT%\icppcanvas.lib
..\%__SRC%\lib\lib*.* %_DEST%\lib%_EXT%\lib*.*
mkdir: %_DEST%\inc%_EXT%\cppcanvas
hedabu: ..\inc\cppcanvas\bitmap.hxx %_DEST%\inc%_EXT%\cppcanvas\bitmap.hxx
hedabu: ..\inc\cppcanvas\bitmapcanvas.hxx %_DEST%\inc%_EXT%\cppcanvas\bitmapcanvas.hxx
hedabu: ..\inc\cppcanvas\canvas.hxx %_DEST%\inc%_EXT%\cppcanvas\canvas.hxx
hedabu: ..\inc\cppcanvas\canvasgraphic.hxx %_DEST%\inc%_EXT%\cppcanvas\canvasgraphic.hxx
hedabu: ..\inc\cppcanvas\color.hxx %_DEST%\inc%_EXT%\cppcanvas\color.hxx
hedabu: ..\inc\cppcanvas\customsprite.hxx %_DEST%\inc%_EXT%\cppcanvas\customsprite.hxx
hedabu: ..\inc\cppcanvas\font.hxx %_DEST%\inc%_EXT%\cppcanvas\font.hxx
hedabu: ..\inc\cppcanvas\polypolygon.hxx %_DEST%\inc%_EXT%\cppcanvas\polypolygon.hxx
hedabu: ..\inc\cppcanvas\renderer.hxx %_DEST%\inc%_EXT%\cppcanvas\renderer.hxx
hedabu: ..\inc\cppcanvas\sprite.hxx %_DEST%\inc%_EXT%\cppcanvas\sprite.hxx
hedabu: ..\inc\cppcanvas\spritecanvas.hxx %_DEST%\inc%_EXT%\cppcanvas\spritecanvas.hxx
hedabu: ..\inc\cppcanvas\text.hxx %_DEST%\inc%_EXT%\cppcanvas\text.hxx
hedabu: ..\inc\cppcanvas\vclfactory.hxx %_DEST%\inc%_EXT%\cppcanvas\vclfactory.hxx
hedabu: ..\inc\cppcanvas\basegfxfactory.hxx %_DEST%\inc%_EXT%\cppcanvas\basegfxfactory.hxx
/*************************************************************************
*
* $RCSfile: action.hxx,v $
*
* $Revision: 1.2 $
*
* last change: $Author: thb $ $Date: 2004-03-18 10:41:02 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _CPPCANVAS_ACTION_HXX
#define _CPPCANVAS_ACTION_HXX
#ifndef _SAL_CONFIG_H_
#include <sal/config.h>
#endif
#ifndef BOOST_SHARED_PTR_HPP_INCLUDED
#include <external/boost/shared_ptr.hpp>
#endif
/* Definition of Action interface */
namespace cppcanvas
{
namespace internal
{
class Action
{
public:
virtual ~Action() {}
/** Render this action to the associated canvas
*/
virtual bool render() const = 0;
};
typedef ::boost::shared_ptr< Action > ActionSharedPtr;
}
}
#endif /* _CPPCANVAS_ACTION_HXX */
/*************************************************************************
*
* $RCSfile: canvasgraphichelper.hxx,v $
*
* $Revision: 1.2 $
*
* last change: $Author: thb $ $Date: 2004-03-18 10:41:02 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _CPPCANVAS_CANVASGRAPHICHELPER_HXX
#define _CPPCANVAS_CANVASGRAPHICHELPER_HXX
#ifndef _DRAFTS_COM_SUN_STAR_RENDERING_RENDERSTATE_HPP__
#include <drafts/com/sun/star/rendering/RenderState.hpp>
#endif
#ifndef _BGFX_POLYGON_B2DPOLYPOLYGON_HXX
#include <basegfx/polygon/b2dpolypolygon.hxx>
#endif
#include <cppcanvas/canvasgraphic.hxx>
namespace drafts { namespace com { namespace sun { namespace star { namespace rendering
{
class XGraphicDevice;
} } } } }
/* Definition of CanvasGraphicHelper class */
namespace cppcanvas
{
namespace internal
{
class CanvasGraphicHelper : public virtual CanvasGraphic
{
public:
CanvasGraphicHelper( const CanvasSharedPtr& rParentCanvas );
// CanvasGraphic implementation
virtual void setTransformation( const ::basegfx::B2DHomMatrix& rMatrix );
virtual ::basegfx::B2DHomMatrix getTransformation() const;
virtual void setClip( const PolyPolygonSharedPtr& rClipPoly );
virtual PolyPolygonSharedPtr getClip() const;
virtual void setRGBAColor( Color::IntSRGBA );
virtual Color::IntSRGBA getRGBAColor() const;
virtual void setCompositeOp( CompositeOp aOp );
virtual CompositeOp getCompositeOp() const;
protected:
// for our clients
// ===============
CanvasSharedPtr getCanvas() const;
::com::sun::star::uno::Reference< ::drafts::com::sun::star::rendering::XGraphicDevice > getGraphicDevice() const;
mutable ::drafts::com::sun::star::rendering::RenderState maRenderState; // for reasons of speed...
private:
PolyPolygonSharedPtr mpClipPolyPolygon;
CanvasSharedPtr mpCanvas;
::com::sun::star::uno::Reference< ::drafts::com::sun::star::rendering::XGraphicDevice > mxGraphicDevice;
};
}
}
#endif /* _CPPCANVAS_CANVASGRAPHICHELPER_HXX */
/*************************************************************************
*
* $RCSfile: implrenderer.hxx,v $
*
* $Revision: 1.2 $
*
* last change: $Author: thb $ $Date: 2004-03-18 10:41:02 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _CPPCANVAS_IMPLRENDERER_HXX
#define _CPPCANVAS_IMPLRENDERER_HXX
#ifndef _SAL_TYPES_H_
#include <sal/types.h>
#endif
#ifndef BOOST_SHARED_PTR_HPP_INCLUDED
#include <external/boost/shared_ptr.hpp>
#endif
#ifndef _CPPCANVAS_RENDERER_HXX
#include <cppcanvas/renderer.hxx>
#endif
#ifndef _CPPCANVAS_CANVAS_HXX
#include <cppcanvas/canvas.hxx>
#endif
#include "canvasgraphichelper.hxx"
#include "action.hxx"
#include <vector>
class GDIMetaFile;
class BitmapEx;
class VirtualDevice;
class Gradient;
namespace cppcanvas
{
namespace internal
{
struct OutDevState;
// state stack of OutputDevice, to correctly handle
// push/pop actions
typedef ::std::vector< OutDevState > VectorOfOutDevStates;
class ImplRenderer : public virtual Renderer, protected CanvasGraphicHelper
{
public:
ImplRenderer( const CanvasSharedPtr& rCanvas,
const GDIMetaFile& rMtf );
ImplRenderer( const CanvasSharedPtr& rCanvas,
const BitmapEx& rBmpEx );
virtual ~ImplRenderer();
virtual bool draw() const;
virtual bool drawSubset( int nStartIndex,
int nEndIndex ) const;
// element of the Renderer's action vector. Need to be
// public, since some functors need it, too.
struct MtfAction
{
MtfAction( const ActionSharedPtr& rAction,
int nOrigIndex ) :
mpAction( rAction ),
mnOrigIndex( nOrigIndex )
{
}
ActionSharedPtr mpAction;
int mnOrigIndex;
};
private:
// default: disabled copy/assignment
ImplRenderer(const ImplRenderer&);
ImplRenderer& operator=( const ImplRenderer& );
bool createActions( const CanvasSharedPtr& rCanvas,
VirtualDevice& rVDev,
GDIMetaFile& rMtf,
VectorOfOutDevStates& rStates );
bool createFillAndStroke( const ::PolyPolygon& rPolyPoly,
const CanvasSharedPtr& rCanvas,
int rActionIndex,
VectorOfOutDevStates& rStates );
void skipContent( GDIMetaFile& rMtf,
const char& rCommentString ) const;
void createGradientAction( const Rectangle& rRect,
const Gradient& rGradient,
VirtualDevice& rVDev,
const CanvasSharedPtr& rCanvas,
VectorOfOutDevStates& rStates );
// prefetched and prepared canvas actions
// (externally not visible)
typedef ::std::vector< MtfAction > ActionVector;
ActionVector maActions;
};
}
}
#endif /* _CPPCANVAS_IMPLRENDERER_HXX */
/*************************************************************************
*
* $RCSfile: tools.hxx,v $
*
* $Revision: 1.2 $
*
* last change: $Author: thb $ $Date: 2004-03-18 10:41:03 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _CPPCANVAS_TOOLS_HXX
#define _CPPCANVAS_TOOLS_HXX
#ifndef _COM_SUN_STAR_UNO_REFERENCE_HXX_
#include <com/sun/star/uno/Reference.hxx>
#endif
#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_
#include <com/sun/star/uno/Sequence.hxx>
#endif
#ifndef _CPPCANVAS_COLOR_HXX
#include <cppcanvas/color.hxx>
#endif
namespace drafts { namespace com { namespace sun { namespace star { namespace rendering
{
class XGraphicDevice;
} } } } }
namespace cppcanvas
{
namespace tools
{
::com::sun::star::uno::Sequence< double >
intSRGBAToDoubleSequence( const ::com::sun::star::uno::Reference<
::drafts::com::sun::star::rendering::XGraphicDevice >&,
Color::IntSRGBA );
Color::IntSRGBA doubleSequenceToIntSRGBA( const ::com::sun::star::uno::Reference<
::drafts::com::sun::star::rendering::XGraphicDevice >& rDevice,
const ::com::sun::star::uno::Sequence< double >& rColor );
}
}
#endif /* _CPPCANVAS_TOOLS_HXX */
/*************************************************************************
*
* $RCSfile: bitmapaction.cxx,v $
*
* $Revision: 1.2 $
*
* last change: $Author: thb $ $Date: 2004-03-18 10:41:03 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#include "bitmapaction.hxx"
#include "outdevstate.hxx"
#ifndef _DRAFTS_COM_SUN_STAR_RENDERING_XBITMAP_HPP__
#include <drafts/com/sun/star/rendering/XBitmap.hpp>
#endif
#ifndef _SV_BITMAPEX_HXX
#include <vcl/bitmapex.hxx>
#endif
#ifndef _SV_GEN_HXX
#include <tools/gen.hxx>
#endif
#ifndef _VCL_CANVASTOOLS_HXX
#include <vcl/canvastools.hxx>
#endif
#ifndef _CANVAS_CANVASTOOLS_HXX
#include <canvas/canvastools.hxx>
#endif
#ifndef _BGFX_MATRIX_B2DHOMMATRIX_HXX
#include <basegfx/matrix/b2dhommatrix.hxx>
#endif
#ifndef _BGFX_TOOLS_CANVASTOOLS_HXX
#include <basegfx/tools/canvastools.hxx>
#endif
#include "mtftools.hxx"
using namespace ::com::sun::star;
using namespace ::drafts::com::sun::star;
namespace cppcanvas
{
namespace internal
{
// free support functions
// ======================
namespace
{
/** Setup transformation such that the next render call is
moved rPoint away.
*/
void implSetupTransform( rendering::RenderState& rRenderState,
const Point& rPoint )
{
::basegfx::B2DHomMatrix aLocalTransformation;
aLocalTransformation.translate( rPoint.X(),
rPoint.Y() );
::canvas::tools::appendToRenderState( rRenderState,
aLocalTransformation );
}
/** Setup transformation such that the next render call is
moved rPoint away, and scaled according to the ratio
given by src and dst size.
*/
void implSetupTransform( rendering::RenderState& rRenderState,
const Point& rPoint,
const Size& rSrcSize,
const Size& rDstSize )
{
::basegfx::B2DHomMatrix aLocalTransformation;
aLocalTransformation.scale( static_cast<double>(rDstSize.Width()) / rSrcSize.Width(),
static_cast<double>(rDstSize.Height()) / rSrcSize.Height() );
aLocalTransformation.translate( rPoint.X(),
rPoint.Y() );
::canvas::tools::appendToRenderState( rRenderState,
aLocalTransformation );
}
/** Setup transformation such that the next render call
paints the content given by the src area into the dst
area. No clipping is set whatsoever.
*/
void implSetupTransform( rendering::RenderState& rRenderState,
const Point& rSrcPoint,
const Size& rSrcSize,
const Point& rDstPoint,
const Size& rDstSize )
{
::basegfx::B2DHomMatrix aLocalTransformation;
aLocalTransformation.scale( static_cast<double>(rDstSize.Width()) / rSrcSize.Width(),
static_cast<double>(rDstSize.Height()) / rSrcSize.Height() );
aLocalTransformation.translate( rDstPoint.X() - rSrcPoint.X(),
rDstPoint.Y() - rSrcPoint.Y() );
::canvas::tools::appendToRenderState( rRenderState,
aLocalTransformation );
}
}
BitmapAction::BitmapAction( const ::BitmapEx& rBmpEx,
const ::Point& rDstPoint,
const CanvasSharedPtr& rCanvas,
const OutDevState& rState ) :
mxBitmap( ::vcl::unotools::xBitmapFromBitmapEx( rCanvas->getUNOCanvas()->getDevice(),
rBmpEx ) ),
mpCanvas( rCanvas ),
maState()
{
tools::initRenderState(maState,rState);
implSetupTransform( maState, rDstPoint );
}
BitmapAction::BitmapAction( const ::BitmapEx& rBmpEx,
const ::Point& rDstPoint,
const ::Size& rDstSize,
const CanvasSharedPtr& rCanvas,
const OutDevState& rState ) :
mxBitmap( ::vcl::unotools::xBitmapFromBitmapEx( rCanvas->getUNOCanvas()->getDevice(),
rBmpEx ) ),
mpCanvas( rCanvas ),
maState()
{
tools::initRenderState(maState,rState);
implSetupTransform( maState, rDstPoint, rBmpEx.GetSizePixel(), rDstSize );
}
BitmapAction::BitmapAction( const ::BitmapEx& rBmpEx,
const ::Point& rSrcPoint,
const ::Size& rSrcSize,
const ::Point& rDstPoint,
const ::Size& rDstSize,
const CanvasSharedPtr& rCanvas,
const OutDevState& rState ) :
mxBitmap( ::vcl::unotools::xBitmapFromBitmapEx( rCanvas->getUNOCanvas()->getDevice(),
rBmpEx ) ),
mpCanvas( rCanvas ),
maState()
{
tools::initRenderState(maState,rState);
// TODO: setup clipping/extract only part of the bitmap
implSetupTransform( maState, rSrcPoint, rSrcSize, rDstPoint, rDstSize );
}
BitmapAction::~BitmapAction()
{
}
bool BitmapAction::render() const
{
mpCanvas->getUNOCanvas()->drawBitmap( mxBitmap,
mpCanvas->getViewState(),
maState );
return true;
}
}
}
/*************************************************************************
*
* $RCSfile: bitmapaction.hxx,v $
*
* $Revision: 1.2 $
*
* last change: $Author: thb $ $Date: 2004-03-18 10:41:03 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _CPPCANVAS_BITMAPACTION_HXX
#define _CPPCANVAS_BITMAPACTION_HXX
#ifndef _COM_SUN_STAR_UNO_REFERENCE_HXX_
#include <com/sun/star/uno/Reference.hxx>
#endif
#ifndef _DRAFTS_COM_SUN_STAR_RENDERING_RENDERSTATE_HPP__
#include <drafts/com/sun/star/rendering/RenderState.hpp>
#endif
#include <cppcanvas/canvas.hxx>
#include "action.hxx"
class Point;
class Size;
class BitmapEx;
class Color;
namespace drafts { namespace com { namespace sun { namespace star { namespace rendering
{
class XBitmap;
} } } } }
/* Definition of internal::BitmapAction class */
namespace cppcanvas
{
namespace internal
{
struct OutDevState;
/** Encapsulated converter between GDIMetaFile and
XCanvas. The Canvas argument is deliberately placed at the
constructor, to force reconstruction of this object for a
new canvas. This considerably eases internal state
handling, since a lot of the internal state
(e.g. deviceColor) is Canvas-dependent.
*/
class BitmapAction : public Action
{
public:
BitmapAction( const ::BitmapEx&,
const ::Point& rDstPoint,
const CanvasSharedPtr&,
const OutDevState& );
BitmapAction( const ::BitmapEx&,
const ::Point& rDstPoint,
const ::Size& rDstSize,
const CanvasSharedPtr&,
const OutDevState& );
BitmapAction( const ::BitmapEx&,
const ::Point& rSrcPoint,
const ::Size& rSrcSize,
const ::Point& rDstPoint,
const ::Size& rDstSize,
const CanvasSharedPtr&,
const OutDevState& );
virtual ~BitmapAction();
virtual bool render() const;
private:
// default: disabled copy/assignment
BitmapAction(const BitmapAction&);
BitmapAction& operator = ( const BitmapAction& );
::com::sun::star::uno::Reference<
::drafts::com::sun::star::rendering::XBitmap > mxBitmap;
CanvasSharedPtr mpCanvas;
::drafts::com::sun::star::rendering::RenderState maState;
};
}
}
#endif /*_CPPCANVAS_BITMAPACTION_HXX */
This diff is collapsed.
/*************************************************************************
*
* $RCSfile: lineaction.cxx,v $
*
* $Revision: 1.2 $
*
* last change: $Author: thb $ $Date: 2004-03-18 10:41:04 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#include "lineaction.hxx"
#include "outdevstate.hxx"
#include "cppcanvas/canvas.hxx"
#ifndef _SV_GEN_HXX
#include <tools/gen.hxx>
#endif
#ifndef _VCL_CANVASTOOLS_HXX
#include <vcl/canvastools.hxx>
#endif
#ifndef _BGFX_TOOLS_CANVASTOOLS_HXX
#include <basegfx/tools/canvastools.hxx>
#endif
#ifndef _CANVAS_CANVASTOOLS_HXX
#include <canvas/canvastools.hxx>
#endif
#include "mtftools.hxx"
using namespace ::com::sun::star;
using namespace ::drafts::com::sun::star;
namespace cppcanvas
{
namespace internal
{
LineAction::LineAction( const ::Point& rStartPoint,
const ::Point& rEndPoint,
const CanvasSharedPtr& rCanvas,
const OutDevState& rState ) :
maStartPoint( rStartPoint ),
maEndPoint( rEndPoint ),
mpCanvas( rCanvas ),
maState()
{
tools::initRenderState(maState,rState);
maState.DeviceColor = rState.lineColor;
}
LineAction::~LineAction()
{
}
bool LineAction::render() const
{
mpCanvas->getUNOCanvas()->drawLine( ::vcl::unotools::point2DFromPoint(maStartPoint),
::vcl::unotools::point2DFromPoint(maEndPoint),
mpCanvas->getViewState(),
maState );
return true;
}
}
}
/*************************************************************************
*
* $RCSfile: lineaction.hxx,v $
*
* $Revision: 1.2 $
*
* last change: $Author: thb $ $Date: 2004-03-18 10:41:04 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _CPPCANVAS_LINEACTION_HXX
#define _CPPCANVAS_LINEACTION_HXX
#ifndef _DRAFTS_COM_SUN_STAR_RENDERING_RENDERSTATE_HPP__
#include <drafts/com/sun/star/rendering/RenderState.hpp>
#endif
#ifndef _SV_GEN_HXX
#include <tools/gen.hxx>
#endif
#include "action.hxx"
#include <cppcanvas/canvas.hxx>
class Color;
/* Definition of internal::LineAction class */
namespace cppcanvas
{
namespace internal
{
struct OutDevState;
class LineAction : public Action
{
public:
LineAction( const ::Point&,
const ::Point&,
const CanvasSharedPtr&,
const OutDevState& );
virtual ~LineAction();
virtual bool render() const;
private:
// default: disabled copy/assignment
LineAction(const LineAction&);
LineAction& operator=( const LineAction& );
Point maStartPoint;
Point maEndPoint;
CanvasSharedPtr mpCanvas;
::drafts::com::sun::star::rendering::RenderState maState;
};
}
}
#endif /* _CPPCANVAS_LINEACTION_HXX */
#*************************************************************************
#
# $RCSfile: makefile.mk,v $
#
# $Revision: 1.2 $
#
# last change: $Author: thb $ $Date: 2004-03-18 10:41:04 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
#
# - GNU Lesser General Public License Version 2.1
# - Sun Industry Standards Source License Version 1.1
#
# Sun Microsystems Inc., October, 2000
#
# GNU Lesser General Public License Version 2.1
# =============================================
# Copyright 2000 by Sun Microsystems, Inc.
# 901 San Antonio Road, Palo Alto, CA 94303, USA
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License version 2.1, as published by the Free Software Foundation.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
#
#
# Sun Industry Standards Source License Version 1.1
# =================================================
# The contents of this file are subject to the Sun Industry Standards
# Source License Version 1.1 (the "License"); You may not use this file
# except in compliance with the License. You may obtain a copy of the
# License at http://www.openoffice.org/license.html.
#
# Software provided under this License is provided on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
# See the License for the specific provisions governing your rights and
# obligations concerning the Software.
#
# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
#
# Copyright: 2000 by Sun Microsystems, Inc.
#
# All Rights Reserved.
#
# Contributor(s): _______________________________________
#
#
#
#*************************************************************************
PRJ=..$/..
PRJNAME=canvas
TARGET=metafilerenderer
ENABLE_EXCEPTIONS=TRUE
# --- Settings -----------------------------------------------------------
.INCLUDE : settings.mk
# --- Common ----------------------------------------------------------
.IF "$(verbose)"!="" || "$(VERBOSE)"!=""
CDEFS+= -DVERBOSE
.ENDIF
SLOFILES = $(SLO)$/bitmapaction.obj \
$(SLO)$/implrenderer.obj \
$(SLO)$/lineaction.obj \
$(SLO)$/pointaction.obj \
$(SLO)$/polypolyaction.obj \
$(SLO)$/textaction.obj \
$(SLO)$/mtftools.obj
# ==========================================================================
.INCLUDE : target.mk
/*************************************************************************
*
* $RCSfile: mtftools.cxx,v $
*
* $Revision: 1.2 $
*
* last change: $Author: thb $ $Date: 2004-03-18 10:41:05 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#include "mtftools.hxx"
#include "outdevstate.hxx"
#ifndef _DRAFTS_COM_SUN_STAR_RENDERING_RENDERSTATE_HPP__
#include <drafts/com/sun/star/rendering/RenderState.hpp>
#endif
#ifndef _CANVAS_CANVASTOOLS_HXX
#include <canvas/canvastools.hxx>
#endif
using namespace ::drafts::com::sun::star;
using namespace ::com::sun::star;
namespace cppcanvas
{
namespace tools
{
void initRenderState( ::drafts::com::sun::star::rendering::RenderState& renderState,
const struct ::cppcanvas::internal::OutDevState& outdevState )
{
::canvas::tools::initRenderState( renderState );
::canvas::tools::setRenderStateTransform( renderState,
outdevState.transform );
renderState.Clip = outdevState.xClipPoly;
}
}
}
/*************************************************************************
*
* $RCSfile: mtftools.hxx,v $
*
* $Revision: 1.2 $
*
* last change: $Author: thb $ $Date: 2004-03-18 10:41:05 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _CPPCANVAS_RENDERER_MTFTOOLS_HXX
#define _CPPCANVAS_RENDERER_MTFTOOLS_HXX
#ifndef _SAL_TYPES_H_
# include <sal/types.h>
#endif
namespace drafts { namespace com { namespace sun { namespace star { namespace rendering
{
struct RenderState;
} } } } }
namespace cppcanvas
{
namespace internal
{
struct OutDevState;
}
namespace tools
{
void initRenderState( ::drafts::com::sun::star::rendering::RenderState& renderState,
const ::cppcanvas::internal::OutDevState& outdevState );
}
}
#endif /* _CPPCANVAS_RENDERER_MTFTOOLS_HXX */
/*************************************************************************
*
* $RCSfile: outdevstate.hxx,v $
*
* $Revision: 1.2 $
*
* last change: $Author: thb $ $Date: 2004-03-18 10:41:05 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _CPPCANVAS_OUTDEVSTATE_HXX
#define _CPPCANVAS_OUTDEVSTATE_HXX
#ifndef _COM_SUN_STAR_UNO_REFERENCE_HXX_
#include <com/sun/star/uno/Reference.hxx>
#endif
#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_
#include <com/sun/star/uno/Sequence.hxx>
#endif
#ifndef _DRAFTS_COM_SUN_STAR_RENDERING_STRINGCONTEXT_HPP__
#include <drafts/com/sun/star/rendering/StringContext.hpp>
#endif
#ifndef _DRAFTS_COM_SUN_STAR_RENDERING_RENDERSTATE_HPP__
#include <drafts/com/sun/star/rendering/RenderState.hpp>
#endif
#ifndef _DRAFTS_COM_SUN_STAR_RENDERING_XPOLYPOLYGON2D_HPP__
#include <drafts/com/sun/star/rendering/XPolyPolygon2D.hpp>
#endif
#ifndef _DRAFTS_COM_SUN_STAR_RENDERING_XCANVASFONT_HPP__
#include <drafts/com/sun/star/rendering/XCanvasFont.hpp>
#endif
#ifndef _DRAFTS_COM_SUN_STAR_RENDERING_TEXTDIRECTION_HPP__
#include <drafts/com/sun/star/rendering/TextDirection.hpp>
#endif
#ifndef _BGFX_MATRIX_B2DHOMMATRIX_HXX
#include <basegfx/matrix/b2dhommatrix.hxx>
#endif
namespace cppcanvas
{
namespace internal
{
struct OutDevState
{
OutDevState() :
textDirection( ::drafts::com::sun::star::rendering::TextDirection::LEFT_TO_RIGHT ),
isLineColorSet( false ),
isFillColorSet( false ),
isTextFillColorSet( false ),
isTextLineColorSet( false )
{
transform.identity();
fontTransform.identity();
}
::com::sun::star::uno::Reference< ::drafts::com::sun::star::rendering::XPolyPolygon2D > xClipPoly;
::com::sun::star::uno::Sequence< double > lineColor;
::com::sun::star::uno::Sequence< double > fillColor;
::com::sun::star::uno::Sequence< double > textColor;
::com::sun::star::uno::Sequence< double > textFillColor;
::com::sun::star::uno::Sequence< double > textLineColor;
::com::sun::star::uno::Reference< ::drafts::com::sun::star::rendering::XCanvasFont > xFont;
sal_Int8 textDirection;
::basegfx::B2DHomMatrix transform;
::basegfx::B2DHomMatrix fontTransform;
bool isLineColorSet;
bool isFillColorSet;
bool isTextFillColorSet;
bool isTextLineColorSet;
};
}
}
#endif /* _CPPCANVAS_OUTDEVSTATE_HXX */
/*************************************************************************
*
* $RCSfile: pointaction.cxx,v $
*
* $Revision: 1.2 $
*
* last change: $Author: thb $ $Date: 2004-03-18 10:41:05 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#include "pointaction.hxx"
#include "outdevstate.hxx"
#include "cppcanvas/canvas.hxx"
#ifndef _SV_GEN_HXX
#include <tools/gen.hxx>
#endif
#ifndef _VCL_CANVASTOOLS_HXX
#include <vcl/canvastools.hxx>
#endif
#ifndef _BGFX_TOOLS_CANVASTOOLS_HXX
#include <basegfx/tools/canvastools.hxx>
#endif
#ifndef _CANVAS_CANVASTOOLS_HXX
#include <canvas/canvastools.hxx>
#endif
#include "mtftools.hxx"
using namespace ::com::sun::star;
using namespace ::drafts::com::sun::star;
namespace cppcanvas
{
namespace internal
{
PointAction::PointAction( const ::Point& rPoint,
const CanvasSharedPtr& rCanvas,
const OutDevState& rState ) :
maPoint( rPoint ),
mpCanvas( rCanvas ),
maState()
{
tools::initRenderState(maState,rState);
maState.DeviceColor = rState.lineColor;
}
PointAction::PointAction( const ::Point& rPoint,
const CanvasSharedPtr& rCanvas,
const OutDevState& rState,
const ::Color& rAltColor ) :
maPoint( rPoint ),
mpCanvas( rCanvas ),
maState()
{
tools::initRenderState(maState,rState);
maState.DeviceColor = ::vcl::unotools::colorToDoubleSequence( rCanvas->getUNOCanvas()->getDevice(),
rAltColor );
}
PointAction::~PointAction()
{
}
bool PointAction::render() const
{
mpCanvas->getUNOCanvas()->drawPoint( ::vcl::unotools::point2DFromPoint(maPoint),
mpCanvas->getViewState(),
maState );
return true;
}
}
}
/*************************************************************************
*
* $RCSfile: pointaction.hxx,v $
*
* $Revision: 1.2 $
*
* last change: $Author: thb $ $Date: 2004-03-18 10:41:06 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef _CPPCANVAS_POINTACTION_HXX
#define _CPPCANVAS_POINTACTION_HXX
#ifndef _DRAFTS_COM_SUN_STAR_RENDERING_RENDERSTATE_HPP__
#include <drafts/com/sun/star/rendering/RenderState.hpp>
#endif
#ifndef _SV_GEN_HXX
#include <tools/gen.hxx>
#endif
#include "action.hxx"
#include <cppcanvas/canvas.hxx>
class Color;
/* Definition of internal::PointAction class */
namespace cppcanvas
{
namespace internal
{
struct OutDevState;
class PointAction : public Action
{
public:
PointAction( const ::Point&,
const CanvasSharedPtr&,
const OutDevState& );
PointAction( const ::Point&,
const CanvasSharedPtr&,
const OutDevState&,
const ::Color& );
virtual ~PointAction();
virtual bool render() const;
private:
// default: disabled copy/assignment
PointAction(const PointAction&);
PointAction& operator = ( const PointAction& );
::Point maPoint;
CanvasSharedPtr mpCanvas;
::drafts::com::sun::star::rendering::RenderState maState;
};
}
}
#endif /* _CPPCANVAS_POINTACTION_HXX */
/*************************************************************************
*
* $RCSfile: polypolyaction.cxx,v $
*
* $Revision: 1.2 $
*
* last change: $Author: thb $ $Date: 2004-03-18 10:41:06 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#include "polypolyaction.hxx"
#include "outdevstate.hxx"
#ifndef _SV_GEN_HXX
#include <tools/gen.hxx>
#endif
#ifndef _VCL_CANVASTOOLS_HXX
#include <vcl/canvastools.hxx>
#endif
#ifndef _BGFX_TOOLS_CANVASTOOLS_HXX
#include <basegfx/tools/canvastools.hxx>
#endif
#ifndef _CANVAS_CANVASTOOLS_HXX
#include <canvas/canvastools.hxx>
#endif
#include "mtftools.hxx"
using namespace ::com::sun::star;
using namespace ::drafts::com::sun::star;
namespace cppcanvas
{
namespace internal
{
PolyPolyAction::PolyPolyAction( const ::PolyPolygon& rPolyPoly,
const CanvasSharedPtr& rCanvas,
const OutDevState& rState ) :
mxPolyPoly( ::vcl::unotools::xPolyPolygonFromPolyPolygon( rCanvas->getUNOCanvas()->getDevice(),
rPolyPoly ) ),
mpCanvas( rCanvas ),
maState(),
maFillColor(),
maStrokeColor(),
mbFill( rState.isFillColorSet ),
mbStroke( rState.isLineColorSet )
{
tools::initRenderState(maState,rState);
if( mbFill )
maFillColor = rState.fillColor;
if( mbStroke )
maStrokeColor = rState.lineColor;
}
PolyPolyAction::PolyPolyAction( const ::PolyPolygon& rPolyPoly,
const CanvasSharedPtr& rCanvas,
const OutDevState& rState,
Mode mode ) :
mxPolyPoly( ::vcl::unotools::xPolyPolygonFromPolyPolygon( rCanvas->getUNOCanvas()->getDevice(),
rPolyPoly ) ),
mpCanvas( rCanvas ),
maState(),
maFillColor(),
maStrokeColor(),
mbFill( false ),
mbStroke( rState.isLineColorSet )
{
tools::initRenderState(maState,rState);
if( mbStroke )
maStrokeColor = rState.lineColor;
}
PolyPolyAction::PolyPolyAction( const ::PolyPolygon& rPolyPoly,
const CanvasSharedPtr& rCanvas,
const OutDevState& rState,
int nTransparency ) :
mxPolyPoly( ::vcl::unotools::xPolyPolygonFromPolyPolygon( rCanvas->getUNOCanvas()->getDevice(),
rPolyPoly ) ),
mpCanvas( rCanvas ),
maState(),
maFillColor(),
maStrokeColor(),
mbFill( rState.isFillColorSet ),
mbStroke( rState.isLineColorSet )
{
tools::initRenderState(maState,rState);
if( mbFill )
{
maFillColor = rState.fillColor;
// TODO: Color management
// adapt fill color transparency
maFillColor[3] = 1.0 - nTransparency / 100.0;
}
if( mbStroke )
{
maStrokeColor = rState.lineColor;
// TODO: Color management
// adapt fill color transparency
maStrokeColor[3] = 1.0 - nTransparency / 100.0;
}
}
PolyPolyAction::~PolyPolyAction()
{
}
bool PolyPolyAction::render() const
{
if( mbFill )
{
// don't want to have full maState mutable, thus
// selectively casting away const here.
const_cast<PolyPolyAction*>(this)->maState.DeviceColor = maFillColor;
// TODO: implement caching
mpCanvas->getUNOCanvas()->fillPolyPolygon( mxPolyPoly,
mpCanvas->getViewState(),
maState );
}
if( mbStroke )
{
// don't want to have full maState mutable, thus
// selectively casting away const here.
const_cast<PolyPolyAction*>(this)->maState.DeviceColor = maStrokeColor;
// TODO: implement caching
mpCanvas->getUNOCanvas()->drawPolyPolygon( mxPolyPoly,
mpCanvas->getViewState(),
maState );
}
return true;
}
}
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment