LibreOffice Module canvas (master)  1
cairo_surfaceprovider.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #ifndef INCLUDED_CANVAS_SOURCE_CAIRO_CAIRO_SURFACEPROVIDER_HXX
21 #define INCLUDED_CANVAS_SOURCE_CAIRO_CAIRO_SURFACEPROVIDER_HXX
22 
23 #include <rtl/ref.hxx>
24 #include <com/sun/star/uno/XInterface.hpp>
25 
27 #include <vcl/cairo.hxx>
28 
29 class OutputDevice;
30 class Bitmap;
31 
32 namespace cairocanvas
33 {
34  /* Definition of RepaintTarget interface */
35 
41  class SurfaceProvider : public css::uno::XInterface
42  {
43  public:
44  virtual ~SurfaceProvider() {}
45 
50  virtual ::cairo::SurfaceSharedPtr getSurface() = 0;
51 
53  virtual ::cairo::SurfaceSharedPtr createSurface( const ::basegfx::B2ISize& rSize,
54  int aContent ) = 0;
56  virtual ::cairo::SurfaceSharedPtr createSurface( ::Bitmap& rBitmap ) = 0;
57 
61  virtual ::cairo::SurfaceSharedPtr changeSurface() = 0;
62 
65  virtual OutputDevice* getOutputDevice() = 0;
66  };
67 
68  typedef ::rtl::Reference< SurfaceProvider > SurfaceProviderRef;
69 }
70 
71 #endif
72 
73 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Target interface for XCachedPrimitive implementations.
virtual ::cairo::SurfaceSharedPtr createSurface(const ::basegfx::B2ISize &rSize, int aContent)=0
create new surface in given size
virtual OutputDevice * getOutputDevice()=0
Provides the underlying vcl outputdevice this surface renders on.
virtual ::cairo::SurfaceSharedPtr changeSurface()=0
convert surface from alpha to non-alpha, does not copy content channel.
virtual ::cairo::SurfaceSharedPtr getSurface()=0
Query surface from this provider.
::rtl::Reference< SurfaceProvider > SurfaceProviderRef