summaryrefslogtreecommitdiff
path: root/offapi/com/sun/star/geometry
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2005-03-10 11:21:18 +0000
committerVladimir Glazounov <vg@openoffice.org>2005-03-10 11:21:18 +0000
commit3423aa046cc4e54c7288821b0b62f25f4b9a59fd (patch)
tree29cebb85e01f5fdb9b865b3269fac1fe4f3b2e8c /offapi/com/sun/star/geometry
parentd50841d2247701e49533c65b56a829e98bbe9db0 (diff)
INTEGRATION: CWS presfixes01 (1.1.2); FILE ADDED
2005/02/16 11:27:08 fs 1.1.2.1: moved from drafts.css.geometry to css.geomery
Diffstat (limited to 'offapi/com/sun/star/geometry')
-rw-r--r--offapi/com/sun/star/geometry/Matrix2D.idl124
-rw-r--r--offapi/com/sun/star/geometry/RealBezierSegment2D.idl101
2 files changed, 225 insertions, 0 deletions
diff --git a/offapi/com/sun/star/geometry/Matrix2D.idl b/offapi/com/sun/star/geometry/Matrix2D.idl
new file mode 100644
index 000000000000..f23e63501d91
--- /dev/null
+++ b/offapi/com/sun/star/geometry/Matrix2D.idl
@@ -0,0 +1,124 @@
+/*************************************************************************
+ *
+ * $RCSfile: Matrix2D.idl,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: vg $ $Date: 2005-03-10 12:21: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 __com_sun_star_geometry_Matrix2D_idl__
+#define __com_sun_star_geometry_Matrix2D_idl__
+
+module com { module sun { module star { module geometry {
+
+/** This structure defines a 2 by 2 matrix.<p>
+
+ This constitutes a linear mapping of a point in 2D to another
+ point in 2D.<p>
+
+ The matrix defined by this structure constitutes a linear
+ mapping of a point in 2D to another point in 2D. In contrast to
+ the <type>drafts.com.sun.star.geometry.AffineMatrix2D</type>, this
+ matrix does not include any translational components.<p>
+
+ A linear mapping, as performed by this matrix, can be written out
+ as follows, where <code>xs</code> and <code>ys</code> are the source, and
+ <code>xd</code> and <code>yd</code> the corresponding result coordinates:
+
+ <code>
+ xd = m00*xs + m01*ys;
+ yd = m10*xs + m11*ys;
+ </code><p>
+
+ Thus, in common matrix language, with M being the
+ <type>Matrix2D</type> and vs=[xs,ys]^T, vd=[xd,yd]^T two 2D
+ vectors, the linear mapping is written as
+ vd=M*vs. Concatenation of transformations amounts to
+ multiplication of matrices, i.e. a scaling, given by S,
+ followed by a rotation, given by R, is expressed as vd=R*(S*vs) in
+ the above notation. Since matrix multiplication is associative,
+ this can be shortened to vd=(R*S)*vs=M'*vs. Therefore, a set of
+ consecutive transformations can be accumulated into a single
+ Matrix2D, by multiplying the current transformation with the
+ additional transformation from the left.<p>
+
+ Due to this transformational approach, all geometry data types are
+ points in abstract integer or real coordinate spaces, without any
+ physical dimensions attached to them. This physical measurement
+ units are typically only added when using these data types to
+ render something onto a physical output device, like a screen or a
+ printer. Then, the total transformation matrix and the device
+ resolution determine the actual measurement unit.<p>
+
+ @since #110496#
+ */
+struct Matrix2D
+{
+ /// The top, left matrix entry.
+ double m00;
+
+ /// The top, right matrix entry.
+ double m01;
+
+ /// The bottom, left matrix entry.
+ double m10;
+
+ /// The bottom, right matrix entry.
+ double m11;
+};
+
+}; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/geometry/RealBezierSegment2D.idl b/offapi/com/sun/star/geometry/RealBezierSegment2D.idl
new file mode 100644
index 000000000000..8a2ac1093222
--- /dev/null
+++ b/offapi/com/sun/star/geometry/RealBezierSegment2D.idl
@@ -0,0 +1,101 @@
+/*************************************************************************
+ *
+ * $RCSfile: RealBezierSegment2D.idl,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: vg $ $Date: 2005-03-10 12:21:18 $
+ *
+ * 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 __com_sun_star_geometry_RealBezierSegment2D_idl__
+#define __com_sun_star_geometry_RealBezierSegment2D_idl__
+
+module com { module sun { module star { module geometry {
+
+/** This structure contains the relevant data for a cubic Bezier
+ curve.<p>
+
+ The data is stored real-valued. The last point of the segment is
+ taken from the first point of the following segment, and thus not
+ included herein. That is, when forming a polygon out of cubic
+ Bezier segments, each two consecutive IntegerBezierSegment2Ds
+ define the actual curve, with the very last segment providing only
+ the end point of the last curve, and the remaining members
+ ignored.<p>
+
+ @see drafts.com.sun.star.rendering.XBezierPolyPolygon2D
+ @since #110496#
+ */
+struct RealBezierSegment2D
+{
+ /// The x coordinate of the start point.
+ double Px;
+ /// The y coordinate of the start point.
+ double Py;
+
+ /// The x coordinate of the first control point.
+ double C1x;
+ /// The y coordinate of the first control point.
+ double C1y;
+
+ /// The x coordinate of the second control point.
+ double C2x;
+ /// The y coordinate of the second control point.
+ double C2y;
+
+};
+
+}; }; }; };
+
+#endif