LibreOffice Module sd (master) 1
SlsFramePainter.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#pragma once
21
22#include <vcl/bitmapex.hxx>
23
24namespace sd::slidesorter::view {
25
27{
28public:
29 explicit FramePainter (const BitmapEx& rBitmap);
31
35 void PaintFrame (OutputDevice&rDevice, const ::tools::Rectangle& rBox) const;
36
42 void AdaptColor (const Color aNewColor);
43
44private:
48 public:
51
68 const BitmapEx& rBitmap,
69 const sal_Int32 nHorizontalPosition,
70 const sal_Int32 nVerticalPosition);
71
75 void PaintCorner (OutputDevice& rDevice, const Point& rAnchor) const;
76
82 void PaintSide (
83 OutputDevice& rDevice,
84 const Point& rAnchor1,
85 const Point& rAnchor2,
86 const OffsetBitmap& rCornerBitmap1,
87 const OffsetBitmap& rCornerBitmap2) const;
88
91 void PaintCenter (
92 OutputDevice& rDevice,
93 const ::tools::Rectangle& rBox) const;
94 };
105};
106
107} // end of namespace sd::slidesorter::view
108
109/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Bitmap with offset that is used when the bitmap is painted.
OffsetBitmap(const BitmapEx &rBitmap, const sal_Int32 nHorizontalPosition, const sal_Int32 nVerticalPosition)
Create one of the eight shadow bitmaps from one that combines them all.
void PaintSide(OutputDevice &rDevice, const Point &rAnchor1, const Point &rAnchor2, const OffsetBitmap &rCornerBitmap1, const OffsetBitmap &rCornerBitmap2) const
Use the given device to paint the bitmap stretched between the two given locations.
void PaintCenter(OutputDevice &rDevice, const ::tools::Rectangle &rBox) const
Fill the given rectangle with the bitmap.
void PaintCorner(OutputDevice &rDevice, const Point &rAnchor) const
Use the given device to paint the bitmap at the location that is the sum of the given anchor and the ...
void AdaptColor(const Color aNewColor)
Special functionality that takes the color from the center bitmap and replaces that color in all bitm...
void PaintFrame(OutputDevice &rDevice, const ::tools::Rectangle &rBox) const
Paint a border around the given box by using a set of bitmaps for the corners and sides.
FramePainter(const BitmapEx &rBitmap)