summaryrefslogtreecommitdiff
path: root/canvas
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2005-04-18 08:09:20 +0000
committerOliver Bolte <obo@openoffice.org>2005-04-18 08:09:20 +0000
commit66008eceed159631dba534c7b5825598071342ff (patch)
tree1f72ff6673ec77552474e4264076870ce790356a /canvas
parent1f6d7ccf48737b3d3460e30fc5e88c4cf9d18ebc (diff)
INTEGRATION: CWS presfixes03 (1.5.4); FILE MERGED
2005/04/01 15:48:07 thb 1.5.4.1: #i36190#, #i37793#, #i39245#, #i46023# Fixes for open/close polygon stroking; beefed up the canvas tools; moved try/catch block around configuration in cf_factory (to facilitate canvasdemo with broken/incomplete services.rdb; enhanced TextLayout to cope with new Action::getBounds() functionality in cppcanvas (needed for proper mtf bounds calculation); removed extra pixel right and bottom for filled polygons; avoiding uno::Sequence::operator[] for non-const cases, but using the naked mem ptr instead (performance)
Diffstat (limited to 'canvas')
-rw-r--r--canvas/source/tools/canvastools.cxx32
1 files changed, 30 insertions, 2 deletions
diff --git a/canvas/source/tools/canvastools.cxx b/canvas/source/tools/canvastools.cxx
index 2d9b4261f79c..035e86fa9d52 100644
--- a/canvas/source/tools/canvastools.cxx
+++ b/canvas/source/tools/canvastools.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: canvastools.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: vg $ $Date: 2005-03-10 11:55:14 $
+ * last change: $Author: obo $ $Date: 2005-04-18 09:09:20 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -270,6 +270,34 @@ namespace canvas
return matrix;
}
+ void setDeviceColor( ::com::sun::star::rendering::RenderState& o_renderState,
+ const double& rColor0,
+ const double& rColor1,
+ const double& rColor2,
+ const double& rColor3 )
+ {
+ o_renderState.DeviceColor.realloc( 4 );
+ double* pColors = o_renderState.DeviceColor.getArray();
+
+ pColors[0] = rColor0;
+ pColors[1] = rColor1;
+ pColors[2] = rColor2;
+ pColors[3] = rColor3;
+ }
+
+ void getDeviceColor( double& o_rColor0,
+ double& o_rColor1,
+ double& o_rColor2,
+ double& o_rColor3,
+ const ::com::sun::star::rendering::RenderState& rRenderState )
+ {
+ o_rColor0 = rRenderState.DeviceColor[0];
+ o_rColor1 = rRenderState.DeviceColor[1];
+ o_rColor2 = rRenderState.DeviceColor[2];
+ o_rColor3 = rRenderState.DeviceColor.getLength() > 3 ?
+ rRenderState.DeviceColor[3] : 1.0;
+ }
+
bool operator==( const rendering::RenderState& renderState1,
const rendering::RenderState& renderState2 )
{