LCOV - code coverage report
Current view: top level - canvas/source/cairo - cairo_surfaceprovider.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 2 2 100.0 %
Date: 2015-06-13 12:38:46 Functions: 2 3 66.7 %
Legend: Lines: hit not hit

          Line data    Source code
       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             : 
      26             : #include <vcl/cairo.hxx>
      27             : #include <cairo.h>
      28             : 
      29             : class OutputDevice;
      30             : class Bitmap;
      31             : 
      32             : namespace cairocanvas
      33             : {
      34             :     class Bitmap;
      35             : 
      36             :     /* Definition of RepaintTarget interface */
      37             : 
      38             :     /** Target interface for XCachedPrimitive implementations
      39             : 
      40             :         This interface must be implemented on all canvas
      41             :         implementations that hand out XCachedPrimitives
      42             :      */
      43           5 :     class SurfaceProvider : public ::com::sun::star::uno::XInterface
      44             :     {
      45             :     public:
      46           5 :         virtual ~SurfaceProvider() {}
      47             : 
      48             :         /** Query surface from this provider
      49             : 
      50             :             This should return the default surface to render on.
      51             :          */
      52             :         virtual ::cairo::SurfaceSharedPtr getSurface() = 0;
      53             : 
      54             :         /// create new surface in given size
      55             :         virtual ::cairo::SurfaceSharedPtr createSurface( const ::basegfx::B2ISize& rSize,
      56             :                                                          int aContent = CAIRO_CONTENT_COLOR_ALPHA ) = 0;
      57             :         /// create new surface from given bitmap
      58             :         virtual ::cairo::SurfaceSharedPtr createSurface( ::Bitmap& rBitmap ) = 0;
      59             : 
      60             :         /** convert surface between alpha and non-alpha
      61             :             channel. returns new surface on success, NULL otherwise
      62             :         */
      63             :         virtual ::cairo::SurfaceSharedPtr changeSurface( bool bHasAlpha, bool bCopyContent ) = 0;
      64             : 
      65             :         /** Provides the underlying vcl outputdevice this surface renders on
      66             :          */
      67             :         virtual OutputDevice* getOutputDevice() = 0;
      68             :     };
      69             : 
      70             :     typedef ::rtl::Reference< SurfaceProvider > SurfaceProviderRef;
      71             : }
      72             : 
      73             : #endif
      74             : 
      75             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11