summaryrefslogtreecommitdiff
path: root/include/vcl/alpha.hxx
blob: e9439069e1c09c37a67fab9970e33c96318ea5b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 * This file is part of the LibreOffice project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * This file incorporates work covered by the following license notice:
 *
 *   Licensed to the Apache Software Foundation (ASF) under one or more
 *   contributor license agreements. See the NOTICE file distributed
 *   with this work for additional information regarding copyright
 *   ownership. The ASF licenses this file to you under the Apache
 *   License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 .
 */

#ifndef INCLUDED_VCL_ALPHA_HXX
#define INCLUDED_VCL_ALPHA_HXX

#include <vcl/dllapi.h>
#include <vcl/bitmap.hxx>


class ImageList;
class BitmapEx;

class VCL_DLLPUBLIC AlphaMask : private Bitmap
{
public:

                AlphaMask();
                AlphaMask( const Bitmap& rBitmap );
                AlphaMask( const AlphaMask& rAlphaMask );
                AlphaMask( const Size& rSizePixel, sal_uInt8* pEraseTransparency = NULL );
    virtual     ~AlphaMask();

    AlphaMask&  operator=( const Bitmap& rBitmap );
    AlphaMask&  operator=( const AlphaMask& rAlphaMask ) { return static_cast<AlphaMask&>( Bitmap::operator=( rAlphaMask ) ); }
    bool        operator!() const { return Bitmap::operator!(); }
    bool        operator==( const AlphaMask& rAlphaMask ) const { return Bitmap::operator==( rAlphaMask ); }
    bool        operator!=( const AlphaMask& rAlphaMask ) const { return Bitmap::operator!=( rAlphaMask ); }

    void        SetPrefMapMode( const MapMode& rMapMode ) { Bitmap::SetPrefMapMode( rMapMode ); }

    void        SetPrefSize( const Size& rSize ) { Bitmap::SetPrefSize( rSize ); }

    Size        GetSizePixel() const { return Bitmap::GetSizePixel(); }

    BitmapChecksum   GetChecksum() const { return Bitmap::GetChecksum(); }

    Bitmap      GetBitmap() const;

    bool        Erase( sal_uInt8 cTransparency );
    bool        Replace( const Bitmap& rMask, sal_uInt8 rReplaceTransparency );
    bool        Replace( sal_uInt8 cSearchTransparency, sal_uInt8 cReplaceTransparency, sal_uLong nTol = 0UL );

    BitmapReadAccess*  AcquireReadAccess() { return Bitmap::AcquireReadAccess(); }
    BitmapWriteAccess* AcquireWriteAccess() { return Bitmap::AcquireWriteAccess(); }

    void        ReleaseAccess( BitmapReadAccess* pAccess );

    typedef vcl::ScopedBitmapAccess< BitmapReadAccess, AlphaMask, &AlphaMask::AcquireReadAccess >
        ScopedReadAccess;
    typedef vcl::ScopedBitmapAccess< BitmapWriteAccess, AlphaMask, &AlphaMask::AcquireWriteAccess >
        ScopedWriteAccess;

private:
    friend class BitmapEx;
    friend class ::OutputDevice;
    friend bool VCL_DLLPUBLIC ReadDIBBitmapEx(BitmapEx& rTarget, SvStream& rIStm);

    SAL_DLLPRIVATE const Bitmap&    ImplGetBitmap() const;
    SAL_DLLPRIVATE void             ImplSetBitmap( const Bitmap& rBitmap );

};

#endif // INCLUDED_VCL_ALPHA_HXX

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ommit/icon-themes/sukapura_svg/sw/res?id=72268f475d9c5f85c1c2195218cc41cf273f7dc6'>tdf#135265 Add icon variants in Manage Changes dialogRizal Muttaqin Change-Id: Ifcffc928040fc5e3f82f005d977bf3f6df8bd786 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100633 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <riz_17_oke@yahoo.co.id> 2020-06-06Sukapura:^some Pivot Table action icons, etcRizal Muttaqin Change-Id: I6396e50a654a6edfd9a3cc05832ac6dd88b4fd57 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95626 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> 2020-03-25Sukapura: Update many style iconsRizal Muttaqin - Update Curve & Freeform icons - Add larger Cell Styles icons - Update Navigation Data icons - Update Numeric Field icons - Update to Curve & to Polygon icons - etc Change-Id: Iffa13ee13fac13ba5b95f14496efa5419154b1a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91028 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <riz_17_oke@yahoo.co.id> 2020-03-24Sukapura: Add more 32px and independent iconsRizal Muttaqin - Update Impress's hover image - Fix for wrong named icon - etc Change-Id: I1ad1f74a1b6ee4658b55fdb25d85d08e42e9a138 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90933 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <riz_17_oke@yahoo.co.id> 2020-03-22Sukapura: Add Fill Cell iconsRizal Muttaqin - Update hide related icons, etc Change-Id: I053a628f58f9a3eeb2690b74ea50ce4c5320b64c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90867 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <riz_17_oke@yahoo.co.id> 2020-03-11Sukapura: Add shadow to icons, add many more icons:rizmut - QR code, Apply Style, Zoom 200% - Delete wrong placed SVG icons in PNG dir - Update Index Entry, Show Formatting, Toggle Extrusion, DB Sorting & Grouping - Update/add slide related icons - etc Change-Id: I29a05e1b39cee5972299f21d083021cb1ef54b62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90342 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <riz_17_oke@yahoo.co.id> 2020-02-26Sukapura: Fix envelope position, make darker chart iconsrizmut Change-Id: I341eed4d2eaf152380cc97ec24b4caeb3e46d108 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89553 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <riz_17_oke@yahoo.co.id> 2020-02-26Removed executable permission on SVG fileAndrea Gelmini Change-Id: I912a023ed77475fc98b74f24ac8bc0ef182ecd8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89554 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> 2020-02-26Resolves tdf#130500 - Sukapura icon themeHeiko Tietze Added to core and made default on macOS Change-Id: I1c1e8caab514198717cf6cd7e8c00a1c1d5c15da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89183 Tested-by: Jenkins Tested-by: Rizal Muttaqin <riz_17_oke@yahoo.co.id> Reviewed-by: Rizal Muttaqin <riz_17_oke@yahoo.co.id> Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>