summaryrefslogtreecommitdiff
path: root/canvas/source/cairo
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2006-03-22 09:58:48 +0000
committerOliver Bolte <obo@openoffice.org>2006-03-22 09:58:48 +0000
commita6916acfed11ec74b456d428662e8d8cfda5575d (patch)
tree027b497a13d2d9f4d300bf834832d04d378bb5cc /canvas/source/cairo
parent5dbd185d18721a436f260978d956bc9860a67382 (diff)
INTEGRATION: CWS cairofixes01 (1.2.2); FILE MERGED
2006/03/02 17:56:17 radekdoulik 1.2.2.4: Issue number: 62722 Submitted by: radekdoulik Reviewed by: radekdoulik 2006-02-22 Radek Doulik <rodo@novell.com> * build/src680-m152/canvas/source/cairo/cairo_canvashelper_text.cxx (cairocanvas): use depth of surface when creating virtual vcl device * build/src680-m152/canvas/source/cairo/cairo_cairo.cxx (cairo): new function, returns surface bit depth 2006/03/02 17:40:59 radekdoulik 1.2.2.3: Issue number: 62722 Submitted by: radekdoulik Reviewed by: radekdoulik optimize resizing of cairo surfaces 2006/03/02 17:36:39 thb 1.2.2.2: #i62712# Correcting cairo include statements 2006/03/02 17:32:03 thb 1.2.2.1: #unsigned short [1]#
Diffstat (limited to 'canvas/source/cairo')
-rw-r--r--canvas/source/cairo/cairo_cairo.cxx19
1 files changed, 17 insertions, 2 deletions
diff --git a/canvas/source/cairo/cairo_cairo.cxx b/canvas/source/cairo/cairo_cairo.cxx
index d1e35bfeb2f9..a7c01c150900 100644
--- a/canvas/source/cairo/cairo_cairo.cxx
+++ b/canvas/source/cairo/cairo_cairo.cxx
@@ -6,8 +6,8 @@
namespace cairo
{
-#include <cairo/cairo-xlib.h>
-#include <cairo/cairo-xlib-xrender.h>
+#include <cairo-xlib.h>
+#include <cairo-xlib-xrender.h>
Surface::Surface( const void* pSysData, int x, int y, int width, int height )
: mnRefCount( 1 ),
@@ -74,4 +74,19 @@ namespace cairo
} else
return new Surface( mpSysData, mpDisplay, 0, NULL, cairo_surface_create_similar( mpSurface, aContent, width, height ) );
}
+
+ void
+ Surface::Resize( int width, int height )
+ {
+ cairo_xlib_surface_set_size( mpSurface, width, height );
+ }
+
+ int
+ Surface::getDepth()
+ {
+ if( mpRenderFormat )
+ return ( ( XRenderPictFormat * ) mpRenderFormat )->depth;
+
+ return -1;
+ }
}