#ifndef com_sun_star_chart2_XPlotter_idl
#define com_sun_star_chart2_XPlotter_idl

#ifndef __com_sun_star_uno_XInterface_idl__
#include <com/sun/star/uno/XInterface.idl>
#endif

#ifndef __com_sun_star_drawing_XShapes_idl__
#include <com/sun/star/drawing/XShapes.idl>
#endif

#ifndef _com_sun_star_drawing_XShapeGrouper_idl_
#include <com/sun/star/drawing/XShapeGrouper.idl>
#endif

#ifndef _com_sun_star_lang_xmultiservicefactory_idl_
#include <com/sun/star/lang/XMultiServiceFactory.idl>
#endif

#ifndef com_sun_star_chart2_CoordinateSystemTypeID_idl
#include <com/sun/star/chart2/CoordinateSystemTypeID.idl>
#endif

#ifndef com_sun_star_chart2_ScaleData_idl
#include <com/sun/star/chart2/ScaleData.idl>
#endif

#ifndef com_sun_star_chart2_XTransformation_idl
#include <com/sun/star/chart2/XTransformation.idl>
#endif

//=============================================================================

module com {  module sun {  module star {  module chart2 {

//=============================================================================

/** The main task of a Plotter is to create graphic objects which have a certain
    logic place within a coordinate system. For example the bars of a bar chart
    are such graphic objects. The created graphic objects need to be of type
    com::sun::star::drawing::Shape.

    <p>
    Within the chart application we differentiate between two 'types' of shapes
    which can be created by a Plotter.
    The first type are shapes which are completely defined by coordinates
    in the logic coordinate system and will be positioned within this logic
    coordinate system. Those shapes are called 'logic shapes'
    or 'logically placed shapes'. For example a rectangle of a bar chart
    is a 'logic shape'.
    </p>

    <p>
    The second type of shapes are those who can not or should not
    be placed in the logic coordinate system. For example consider a three
    dimensional bar chart with text labels for each data point. You probably
    would not like to place the text shapes as three dimensional objects within
    the logic coordinate system, rather you would like to position the texts as
    two dimensional objects on the two dimensional final page. Those shapes are
    called 'illogic shapes' in contrast to 'logic shapes'.
    'Illogic shapes' are always two dimensional and placed on the documents page.
    </p>

    <p>
    For each type of shapes the Plotter gets one Target where it can add
    or remove shapes.
    </p>

    <p> A Plotter is not allowed to set the property 'Transformation' on a
    shape as this will be done elsewhere.
    </p>
*/

//@ todo ? should this be a XComponent?
interface XPlotter : ::com::sun::star::uno::XInterface
{
    //-------------------------------------------------------------------------
    /** Each Plotter implicit uses a certain type of logic coordinate
        system for interpreting data as coordinates.
        For example a bar-chart uses a Cartesian coordinate system for
        interpreting x- and y-values from a spreadsheet as Cartesian
        coordinates. In contrast the pie chart assumes a polar coordinate
        system.
        The type of this implicit used source coordinate system has to be
        returned here.
        The returned type of an implementation never changes.
    */
    CoordinateSystemTypeID getCoordinateSystemTypeID();

    //-------------------------------------------------------------------------
    /** For each type of shapes ('logic' or 'illogic') there exists one
    container. The Plotter will create shapes and then add (or remove)
    them from these containers.

    <p>
    The lifetime of the container has to be handled by the calling object. The
    calling object must assure that the container will exist longer than the
    XPlotter Object.
    </p>
    ...
    */
    void init( [in] com::sun::star::drawing::XShapes xLogicTarget
             , [in] com::sun::star::drawing::XShapes xFinalTarget
             , [in] com::sun::star::lang::XMultiServiceFactory xFactory );

    //-------------------------------------------------------------------------
    /** For each dimension of the 'logic source coordinate system' the
    XPlotter object needs a Scale to decide which shapes
    need to be created and maybe logically clipped. The XPlotter object
    becomes the new owner of the given scales and directions and needs to keep
    them alive. Nobody else will change them.
    Pay attention that a 'Scale' can have several breaks.
    */
    void setScales( [in] sequence< ScaleData > rScales);

    //-------------------------------------------------------------------------
    /**
    */
    void setTransformation( [in] XTransformation xTransformationToLogicTarget
                        , [in] XTransformation xTransformationToFinalPage );
};

//=============================================================================

}; }; }; };

#endif

